I am new to android coding. I am trying a simple code like clicking a button, and if clicked it opens Google. If I run my code, and if I click the button, the browser opens, and after sometime, it displays UNFORTUNATELY BROWSER STOPPED. please help me. thanks in advance.
package com.example.single_button_google;
import android.net.Uri;
import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.View;
import android.widget.Button;
public class MainActivity extends Activity {
Button b1;
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
b1= (Button) findViewById(R.id.button1);
b1.setOnClickListener(click);
}
View.OnClickListener click = new View.OnClickListener() {
#Override
public void onClick(View v) {
// TODO Auto-generated method stub
Intent intent = new Intent(Intent.ACTION_VIEW,Uri.parse("https://www.google.co.in/"));
startActivity(intent);
}
};
#Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.main, menu);
return true;
}
}
My logcat:
02-04 04:50:19.910: D/AndroidRuntime(1174): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
02-04 04:50:19.920: D/AndroidRuntime(1174): CheckJNI is ON
02-04 04:50:20.000: D/dalvikvm(1174): Trying to load lib libjavacore.so 0x0
02-04 04:50:20.010: D/dalvikvm(1174): Added shared lib libjavacore.so 0x0
02-04 04:50:20.040: D/dalvikvm(1174): Trying to load lib libnativehelper.so 0x0
02-04 04:50:20.040: D/dalvikvm(1174): Added shared lib libnativehelper.so 0x0
02-04 04:50:20.050: D/dalvikvm(1174): No JNI_OnLoad found in libnativehelper.so 0x0, skipping init
02-04 04:50:20.270: D/dalvikvm(1174): Note: class Landroid/app/ActivityManagerNative; has 179 unimplemented (abstract) methods
02-04 04:50:20.840: E/memtrack(1174): Couldn't load memtrack module (No such file or directory)
02-04 04:50:20.840: E/android.os.Debug(1174): failed to load memtrack module: -2
02-04 04:50:21.200: D/AndroidRuntime(1174): Calling main entry com.android.commands.pm.Pm
02-04 04:50:21.240: D/AndroidRuntime(1174): Shutting down VM
02-04 04:50:21.240: D/dalvikvm(1174): Debugger has detached; object registry had 1 entries
02-04 04:50:22.040: D/AndroidRuntime(1185): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
02-04 04:50:22.050: D/AndroidRuntime(1185): CheckJNI is ON
02-04 04:50:22.120: D/dalvikvm(1185): Trying to load lib libjavacore.so 0x0
02-04 04:50:22.130: D/dalvikvm(1185): Added shared lib libjavacore.so 0x0
02-04 04:50:22.160: D/dalvikvm(1185): Trying to load lib libnativehelper.so 0x0
02-04 04:50:22.160: D/dalvikvm(1185): Added shared lib libnativehelper.so 0x0
02-04 04:50:22.160: D/dalvikvm(1185): No JNI_OnLoad found in libnativehelper.so 0x0, skipping init
02-04 04:50:22.380: D/dalvikvm(1185): Note: class Landroid/app/ActivityManagerNative; has 179 unimplemented (abstract) methods
02-04 04:50:22.960: E/memtrack(1185): Couldn't load memtrack module (No such file or directory)
02-04 04:50:22.960: E/android.os.Debug(1185): failed to load memtrack module: -2
02-04 04:50:23.290: D/AndroidRuntime(1185): Calling main entry com.android.commands.am.Am
02-04 04:50:23.380: I/ActivityManager(363): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.example.single_button_google/.MainActivity} from pid 1185
02-04 04:50:23.410: D/AndroidRuntime(1185): Shutting down VM
02-04 04:50:23.420: D/jdwp(1185): Got wake-up signal, bailing out of select
02-04 04:50:23.420: D/dalvikvm(1185): Debugger has detached; object registry had 1 entries
02-04 04:50:23.930: W/ActivityManager(363): Activity pause timeout for ActivityRecord{b4f82e48 u0 com.android.browser/.BrowserActivity t8}
02-04 04:50:24.000: W/InputMethodManagerService(363): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy#b505f218 attribute=null, token = android.os.BinderProxy#b51975c8
02-04 04:50:24.100: I/Choreographer(363): Skipped 51 frames! The application may be doing too much work on its main thread.
02-04 04:50:24.190: I/Choreographer(363): Skipped 58 frames! The application may be doing too much work on its main thread.
02-04 04:50:24.390: I/Choreographer(363): Skipped 48 frames! The application may be doing too much work on its main thread.
02-04 04:50:24.440: I/Choreographer(899): Skipped 288 frames! The application may be doing too much work on its main thread.
02-04 04:50:24.640: I/Choreographer(363): Skipped 50 frames! The application may be doing too much work on its main thread.
02-04 04:50:24.970: I/Choreographer(363): Skipped 52 frames! The application may be doing too much work on its main thread.
02-04 04:50:25.370: I/Choreographer(363): Skipped 51 frames! The application may be doing too much work on its main thread.
02-04 04:50:25.480: I/Choreographer(363): Skipped 58 frames! The application may be doing too much work on its main thread.
02-04 04:50:25.570: I/Choreographer(363): Skipped 54 frames! The application may be doing too much work on its main thread.
02-04 04:50:25.680: I/Choreographer(363): Skipped 69 frames! The application may be doing too much work on its main thread.
02-04 04:50:25.810: I/Choreographer(363): Skipped 72 frames! The application may be doing too much work on its main thread.
02-04 04:50:34.460: E/NativeDaemonConnector.ResponseQueue(363): Timeout waiting for response
02-04 04:50:34.460: E/VoldConnector(363): timed-out waiting for response to 12 volume mkdirs /storage/sdcard/Android/data/com.android.browser/files/
02-04 04:50:34.460: D/AndroidRuntime(1157): Shutting down VM
02-04 04:50:34.460: W/dalvikvm(1157): threadid=1: thread exiting with uncaught exception (group=0xb4adab90)
02-04 04:50:34.490: E/AndroidRuntime(1157): FATAL EXCEPTION: main
02-04 04:50:34.490: E/AndroidRuntime(1157): Process: com.android.browser, PID: 1157
02-04 04:50:34.490: E/AndroidRuntime(1157): java.lang.RuntimeException: Unable to get provider com.android.browser.provider.SnapshotProvider: java.lang.NullPointerException
02-04 04:50:34.490: E/AndroidRuntime(1157): at android.app.ActivityThread.installProvider(ActivityThread.java:4774)
02-04 04:50:34.490: E/AndroidRuntime(1157): at android.app.ActivityThread.installContentProviders(ActivityThread.java:4366)
02-04 04:50:34.490: E/AndroidRuntime(1157): at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4306)
02-04 04:50:34.490: E/AndroidRuntime(1157): at android.app.ActivityThread.access$1400(ActivityThread.java:135)
02-04 04:50:34.490: E/AndroidRuntime(1157): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1457)
02-04 04:50:34.490: E/AndroidRuntime(1157): at android.os.Handler.dispatchMessage(Handler.java:102)
02-04 04:50:34.490: E/AndroidRuntime(1157): at android.os.Looper.loop(Looper.java:137)
02-04 04:50:34.490: E/AndroidRuntime(1157): at android.app.ActivityThread.main(ActivityThread.java:4998)
02-04 04:50:34.490: E/AndroidRuntime(1157): at java.lang.reflect.Method.invokeNative(Native Method)
02-04 04:50:34.490: E/AndroidRuntime(1157): at java.lang.reflect.Method.invoke(Method.java:515)
02-04 04:50:34.490: E/AndroidRuntime(1157): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:777)
02-04 04:50:34.490: E/AndroidRuntime(1157): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:593)
02-04 04:50:34.490: E/AndroidRuntime(1157): at dalvik.system.NativeStart.main(Native Method)
02-04 04:50:34.490: E/AndroidRuntime(1157): Caused by: java.lang.NullPointerException
02-04 04:50:34.490: E/AndroidRuntime(1157): at android.os.Parcel.readException(Parcel.java:1467)
02-04 04:50:34.490: E/AndroidRuntime(1157): at android.os.Parcel.readException(Parcel.java:1415)
02-04 04:50:34.490: E/AndroidRuntime(1157): at android.os.storage.IMountService$Stub$Proxy.mkdirs(IMountService.java:750)
02-04 04:50:34.490: E/AndroidRuntime(1157): at android.app.ContextImpl.ensureDirsExistOrFilter(ContextImpl.java:2160)
02-04 04:50:34.490: E/AndroidRuntime(1157): at android.app.ContextImpl.getExternalFilesDirs(ContextImpl.java:856)
02-04 04:50:34.490: E/AndroidRuntime(1157): at android.app.ContextImpl.getExternalFilesDir(ContextImpl.java:839)
02-04 04:50:34.490: E/AndroidRuntime(1157): at android.content.ContextWrapper.getExternalFilesDir(ContextWrapper.java:210)
02-04 04:50:34.490: E/AndroidRuntime(1157): at com.android.browser.provider.SnapshotProvider.getOldDatabasePath(SnapshotProvider.java:116)
02-04 04:50:34.490: E/AndroidRuntime(1157): at com.android.browser.provider.SnapshotProvider.migrateToDataFolder(SnapshotProvider.java:123)
02-04 04:50:34.490: E/AndroidRuntime(1157): at com.android.browser.provider.SnapshotProvider.onCreate(SnapshotProvider.java:137)
02-04 04:50:34.490: E/AndroidRuntime(1157): at android.content.ContentProvider.attachInfo(ContentProvider.java:1589)
02-04 04:50:34.490: E/AndroidRuntime(1157): at android.content.ContentProvider.attachInfo(ContentProvider.java:1560)
02-04 04:50:34.490: E/AndroidRuntime(1157): at android.app.ActivityThread.installProvider(ActivityThread.java:4771)
02-04 04:50:34.490: E/AndroidRuntime(1157): ... 12 more
02-04 04:50:34.660: I/Choreographer(363): Skipped 45 frames! The application may be doing too much work on its main thread.
02-04 04:50:34.910: I/Choreographer(363): Skipped 64 frames! The application may be doing too much work on its main thread.
02-04 04:50:35.020: I/Choreographer(363): Skipped 65 frames! The application may be doing too much work on its main thread.
02-04 04:50:35.130: I/Choreographer(363): Skipped 64 frames! The application may be doing too much work on its main thread.
02-04 04:50:36.050: W/ActivityManager(363): Activity stop timeout for ActivityRecord{b4f82e48 u0 com.android.browser/.BrowserActivity t8}
Seems to be a problem related to the emulator and the SD card. Try to change some configuration on your emulator or try the app on a real device.
Related
I want to run my android app from ADB So I run this command
adb -s emulator-5554 shell am start -W -S -n com.example.myproj/.MainActivity
My application starts in emulator but it force closed and the message unfortunately stopped working showed on emulator screen. I try both genymotion and eclipse emulator and got same error.But when I run it from eclipse directly it does not any force close problem.
I should mention that I use ubuntu 14.04 32bit.
Please help me and say what is my mistake and how I can fix it?
ok I use logcat as result I have very long log I just put last part which I can see from command line and seems to relevant to my app
D/gralloc ( 51): Registering a buffer in the process that created it.
This may cause memory ordering problems.
E/libEGL ( 51): called unimplemented OpenGL ES API
E/libEGL ( 51): called unimplemented OpenGL ES API
E/libEGL ( 51): called unimplemented OpenGL ES API
E/libEGL ( 51): called unimplemented OpenGL ES API
E/SurfaceFlinger( 51): glCheckFramebufferStatusOES error 1304732677
E/SurfaceFlinger( 51): got GL_FRAMEBUFFER_COMPLETE_OES error while taking screenshot
E/libEGL ( 51): called unimplemented OpenGL ES API
E/libEGL ( 51): called unimplemented OpenGL ES API
W/WindowManager( 361): Screenshot failure taking screenshot for (266x425) to layer 21005
D/AndroidRuntime( 1133): Shutting down VM
I/ActivityManager( 361): Start proc com.example.myproj for activity com.example.myproj/.MainActivity: pid=1144 uid=10051 gids={50051, 1028, 1015}
D/dalvikvm( 1133): GC_CONCURRENT freed 96K, 15% free 585K/684K, paused 22ms+12ms, total 59ms
D/dalvikvm( 1144): Not late-enabling CheckJNI (already on)
I/Choreographer( 531): Skipped 32 frames! The application may be doing too much work on its main thread.
I/Choreographer( 361): Skipped 33 frames! The application may be doing too much work on its main thread.
W/dalvikvm( 1144): VFY: register1 v4 holds uninitialized ref
W/dalvikvm( 1144): VFY: bad arg 0 (into Ljava/lang/Object;)
W/dalvikvm( 1144): VFY: rejecting call to Lacteve/symbolic/Util;.write (Ljava/lang/Object;I)V
W/dalvikvm( 1144): VFY: rejecting opcode 0x71 at 0x000a
W/dalvikvm( 1144): VFY: rejected Lcom/example/myproj/MainActivity$1;.<init> (Lcom/example/myproj/MainActivity;)V
W/dalvikvm( 1144): Verifier rejected class Lcom/example/myproj/MainActivity$1;
D/AndroidRuntime( 1144): Shutting down VM
W/dalvikvm( 1144): threadid=1: thread exiting with uncaught exception (group=0xb3ae0b90)
E/AndroidRuntime( 1144): FATAL EXCEPTION: main
E/AndroidRuntime( 1144): Process: com.example.myproj, PID: 1144
E/AndroidRuntime( 1144): java.lang.VerifyError: com/example/myproj/MainActivity$1
E/AndroidRuntime( 1144): at com.example.myproj.MainActivity.dol(MainActivity.java:24)
E/AndroidRuntime( 1144): at com.example.myproj.MainActivity.onCreate(MainActivity.java:17)
E/AndroidRuntime( 1144): at android.app.Activity.performCreate(Activity.java:5243)
E/AndroidRuntime( 1144): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
E/AndroidRuntime( 1144): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2140)
E/AndroidRuntime( 1144): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2226)
E/AndroidRuntime( 1144): at android.app.ActivityThread.access$700(ActivityThread.java:135)
E/AndroidRuntime( 1144): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1397)
E/AndroidRuntime( 1144): at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime( 1144): at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime( 1144): at android.app.ActivityThread.main(ActivityThread.java:4998)
E/AndroidRuntime( 1144): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 1144): at java.lang.reflect.Method.invoke(Method.java:515)
E/AndroidRuntime( 1144): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:777)
E/AndroidRuntime( 1144): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:593)
E/AndroidRuntime( 1144): at dalvik.system.NativeStart.main(Native Method)
W/ActivityManager( 361): Force finishing activity com.example.myproj/.MainActivity
I/WindowManager( 361): Screenshot max retries 4 of Token{b40b44d0 ActivityRecord{b40181a0 u0 com.example.myproj/.MainActivity t7 f}} appWin=Window{b41a0fe8 u0 Starting com.example.myproj} drawState=4
W/WindowManager( 361): Screenshot failure taking screenshot for (800x1280) to layer 21010
W/ActivityManager( 361): Activity pause timeout for ActivityRecord{b40181a0 u0 com.example.myproj/.MainActivity t7 f}
I/Process ( 1144): Sending signal. PID: 1144 SIG: 9
I/ActivityManager( 361): Process com.example.myproj (pid 1144) has died.
E/SoundPool( 361): error loading /system/media/audio/ui/Effect_Tick.ogg
W/AudioService( 361): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
E/SoundPool( 361): error loading /system/media/audio/ui/Effect_Tick.ogg
W/AudioService( 361): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
E/SoundPool( 361): error loading /system/media/audio/ui/Effect_Tick.ogg
W/AudioService( 361): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
E/SoundPool( 361): error loading /system/media/audio/ui/Effect_Tick.ogg
W/AudioService( 361): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
E/SoundPool( 361): error loading /system/media/audio/ui/Effect_Tick.ogg
W/AudioService( 361): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
E/SoundPool( 361): error loading /system/media/audio/ui/KeypressStandard.ogg
W/AudioService( 361): Soundpool could not load file: /system/media/audio/ui/KeypressStandard.ogg
E/SoundPool( 361): error loading /system/media/audio/ui/KeypressSpacebar.ogg
W/AudioService( 361): Soundpool could not load file: /system/media/audio/ui/KeypressSpacebar.ogg
E/SoundPool( 361): error loading /system/media/audio/ui/KeypressDelete.ogg
W/AudioService( 361): Soundpool could not load file: /system/media/audio/ui/KeypressDelete.ogg
E/SoundPool( 361): error loading /system/media/audio/ui/KeypressReturn.ogg
W/AudioService( 361): Soundpool could not load file: /system/media/audio/ui/KeypressReturn.ogg
E/SoundPool( 361): error loading /system/media/audio/ui/KeypressInvalid.ogg
W/AudioService( 361): Soundpool could not load file: /system/media/audio/ui/KeypressInvalid.ogg
W/AudioService( 361): onLoadSoundEffects(), Error -1 while loading samples
I/Choreographer( 361): Skipped 40 frames! The application may be doing too much work on its main thread.
W/InputMethodManagerService( 361): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy#b417b3a0 attribute=null, token = android.os.BinderProxy#b404fb70
D/AndroidRuntime( 1161):
D/AndroidRuntime( 1161): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
D/AndroidRuntime( 1161): CheckJNI is ON
D/dalvikvm( 1161): Trying to load lib libjavacore.so 0x0
D/dalvikvm( 1161): Added shared lib libjavacore.so 0x0
D/dalvikvm( 1161): Trying to load lib libnativehelper.so 0x0
D/dalvikvm( 1161): Added shared lib libnativehelper.so 0x0
D/dalvikvm( 1161): No JNI_OnLoad found in libnativehelper.so 0x0, skipping init
D/dalvikvm( 1161): Note: class Landroid/app/ActivityManagerNative; has 179 unimplemented (abstract) methods
E/memtrack( 1161): Couldn't load memtrack module (No such file or directory)
E/android.os.Debug( 1161): failed to load memtrack module: -2
D/AndroidRuntime( 1161): Calling main entry com.android.commands.am.Am
I/ActivityManager( 361): Force stopping com.example.myproj appid=10051 user=0: from pid 1161
I/ActivityManager( 361): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.example.myproj/.MainActivity} from pid 1161
D/gralloc ( 51): Registering a buffer in the process that created it. This may cause memory ordering problems.
E/libEGL ( 51): called unimplemented OpenGL ES API
E/libEGL ( 51): called unimplemented OpenGL ES API
E/libEGL ( 51): called unimplemented OpenGL ES API
E/libEGL ( 51): called unimplemented OpenGL ES API
E/SurfaceFlinger( 51): glCheckFramebufferStatusOES error 1304732677
E/SurfaceFlinger( 51): got GL_FRAMEBUFFER_COMPLETE_OES error while taking screenshot
E/libEGL ( 51): called unimplemented OpenGL ES API
E/libEGL ( 51): called unimplemented OpenGL ES API
W/WindowManager( 361): Screenshot failure taking screenshot for (266x425) to layer 21005
D/AndroidRuntime( 1161): Shutting down VM
D/dalvikvm( 1161): GC_CONCURRENT freed 96K, 15% free 589K/688K, paused 23ms+32ms, total 71ms
D/dalvikvm( 1172): Not late-enabling CheckJNI (already on)
I/ActivityManager( 361): Start proc com.example.myproj for activity com.example.myproj/.MainActivity: pid=1172 uid=10051 gids={50051, 1028, 1015}
I/Choreographer( 361): Skipped 39 frames! The application may be doing too much work on its main thread.
I/Choreographer( 361): Skipped 34 frames! The application may be doing too much work on its main thread.
W/dalvikvm( 1172): VFY: register1 v4 holds uninitialized ref
W/dalvikvm( 1172): VFY: bad arg 0 (into Ljava/lang/Object;)
W/dalvikvm( 1172): VFY: rejecting call to Lacteve/symbolic/Util;.write (Ljava/lang/Object;I)V
W/dalvikvm( 1172): VFY: rejecting opcode 0x71 at 0x000a
W/dalvikvm( 1172): VFY: rejected Lcom/example/myproj/MainActivity$1;.<init> (Lcom/example/myproj/MainActivity;)V
W/dalvikvm( 1172): Verifier rejected class Lcom/example/myproj/MainActivity$1;
D/AndroidRuntime( 1172): Shutting down VM
W/dalvikvm( 1172): threadid=1: thread exiting with uncaught exception (group=0xb3ae0b90)
E/AndroidRuntime( 1172): FATAL EXCEPTION: main
E/AndroidRuntime( 1172): Process: com.example.myproj, PID: 1172
E/AndroidRuntime( 1172): java.lang.VerifyError: com/example/myproj/MainActivity$1
E/AndroidRuntime( 1172): at com.example.myproj.MainActivity.dol(MainActivity.java:24)
E/AndroidRuntime( 1172): at com.example.myproj.MainActivity.onCreate(MainActivity.java:17)
E/AndroidRuntime( 1172): at android.app.Activity.performCreate(Activity.java:5243)
E/AndroidRuntime( 1172): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
E/AndroidRuntime( 1172): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2140)
E/AndroidRuntime( 1172): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2226)
E/AndroidRuntime( 1172): at android.app.ActivityThread.access$700(ActivityThread.java:135)
E/AndroidRuntime( 1172): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1397)
E/AndroidRuntime( 1172): at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime( 1172): at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime( 1172): at android.app.ActivityThread.main(ActivityThread.java:4998)
E/AndroidRuntime( 1172): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 1172): at java.lang.reflect.Method.invoke(Method.java:515)
E/AndroidRuntime( 1172): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:777)
E/AndroidRuntime( 1172): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:593)
E/AndroidRuntime( 1172): at dalvik.system.NativeStart.main(Native Method)
W/ActivityManager( 361): Force finishing activity com.example.myproj/.MainActivity
I/WindowManager( 361): Screenshot max retries 4 of Token{b4186bf8 ActivityRecord{b4186a98 u0 com.example.myproj/.MainActivity t8 f}} appWin=Window{b417dc10 u0 Starting com.example.myproj} drawState=4
W/WindowManager( 361): Screenshot failure taking screenshot for (800x1280) to layer 21010
W/ActivityManager( 361): Activity pause timeout for ActivityRecord{b4186a98 u0 com.example.myproj/.MainActivity t8 f}
I/Process ( 1172): Sending signal. PID: 1172 SIG: 9
E/SoundPool( 361): error loading /system/media/audio/ui/Effect_Tick.ogg
W/AudioService( 361): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
E/SoundPool( 361): error loading /system/media/audio/ui/Effect_Tick.ogg
W/AudioService( 361): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
E/SoundPool( 361): error loading /system/media/audio/ui/Effect_Tick.ogg
W/AudioService( 361): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
E/SoundPool( 361): error loading /system/media/audio/ui/Effect_Tick.ogg
W/AudioService( 361): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
E/SoundPool( 361): error loading /system/media/audio/ui/Effect_Tick.ogg
W/AudioService( 361): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
E/SoundPool( 361): error loading /system/media/audio/ui/KeypressStandard.ogg
W/AudioService( 361): Soundpool could not load file: /system/media/audio/ui/KeypressStandard.ogg
E/SoundPool( 361): error loading /system/media/audio/ui/KeypressSpacebar.ogg
W/AudioService( 361): Soundpool could not load file: /system/media/audio/ui/KeypressSpacebar.ogg
E/SoundPool( 361): error loading /system/media/audio/ui/KeypressDelete.ogg
W/AudioService( 361): Soundpool could not load file: /system/media/audio/ui/KeypressDelete.ogg
I/dalvikvm( 361): Jit: resizing JitTable from 4096 to 8192
I/ActivityManager( 361): Process com.example.myproj (pid 1172) has died.
E/SoundPool( 361): error loading /system/media/audio/ui/KeypressReturn.ogg
W/AudioService( 361): Soundpool could not load file: /system/media/audio/ui/KeypressReturn.ogg
E/SoundPool( 361): error loading /system/media/audio/ui/KeypressInvalid.ogg
W/AudioService( 361): Soundpool could not load file: /system/media/audio/ui/KeypressInvalid.ogg
W/AudioService( 361): onLoadSoundEffects(), Error -1 while loading samples
D/LightsService( 361): Excessive delay setting light: 444ms
D/LightsService( 361): Excessive delay setting light: 102ms
W/InputMethodManagerService( 361): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy#b421b110 attribute=null, token = android.os.BinderProxy#b404fb70
D/dalvikvm( 361): GC_CONCURRENT freed 660K, 10% free 6734K/7468K, paused 7ms+17ms, total 344ms
D/AndroidRuntime( 1189):
D/AndroidRuntime( 1189): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
D/AndroidRuntime( 1189): CheckJNI is ON
D/dalvikvm( 1189): Trying to load lib libjavacore.so 0x0
D/dalvikvm( 1189): Added shared lib libjavacore.so 0x0
D/dalvikvm( 1189): Trying to load lib libnativehelper.so 0x0
D/dalvikvm( 1189): Added shared lib libnativehelper.so 0x0
D/dalvikvm( 1189): No JNI_OnLoad found in libnativehelper.so 0x0, skipping init
D/dalvikvm( 1189): Note: class Landroid/app/ActivityManagerNative; has 179 unimplemented (abstract) methods
E/memtrack( 1189): Couldn't load memtrack module (No such file or directory)
E/android.os.Debug( 1189): failed to load memtrack module: -2
D/AndroidRuntime( 1189): Calling main entry com.android.commands.am.Am
I/ActivityManager( 361): Force stopping com.example.myproj appid=10051 user=0: from pid 1189
I/ActivityManager( 361): START u0 {flg=0x10000000 cmp=com.example.myproj/.MainActivity} from pid 1189
D/gralloc ( 51): Registering a buffer in the process that created it. This may cause memory ordering problems.
E/libEGL ( 51): called unimplemented OpenGL ES API
E/libEGL ( 51): called unimplemented OpenGL ES API
E/libEGL ( 51): called unimplemented OpenGL ES API
E/libEGL ( 51): called unimplemented OpenGL ES API
E/SurfaceFlinger( 51): glCheckFramebufferStatusOES error 1304732677
E/SurfaceFlinger( 51): got GL_FRAMEBUFFER_COMPLETE_OES error while taking screenshot
E/libEGL ( 51): called unimplemented OpenGL ES API
E/libEGL ( 51): called unimplemented OpenGL ES API
W/WindowManager( 361): Screenshot failure taking screenshot for (266x425) to layer 21005
I/ActivityManager( 361): Start proc com.example.myproj for activity com.example.myproj/.MainActivity: pid=1200 uid=10051 gids={50051, 1028, 1015}
D/dalvikvm( 1200): Not late-enabling CheckJNI (already on)
I/Choreographer( 361): Skipped 37 frames! The application may be doing too much work on its main thread.
I/Choreographer( 361): Skipped 33 frames! The application may be doing too much work on its main thread.
I/Choreographer( 531): Skipped 84 frames! The application may be doing too much work on its main thread.
W/dalvikvm( 1200): VFY: register1 v4 holds uninitialized ref
W/dalvikvm( 1200): VFY: bad arg 0 (into Ljava/lang/Object;)
W/dalvikvm( 1200): VFY: rejecting call to Lacteve/symbolic/Util;.write (Ljava/lang/Object;I)V
W/dalvikvm( 1200): VFY: rejecting opcode 0x71 at 0x000a
W/dalvikvm( 1200): VFY: rejected Lcom/example/myproj/MainActivity$1;.<init> (Lcom/example/myproj/MainActivity;)V
W/dalvikvm( 1200): Verifier rejected class Lcom/example/myproj/MainActivity$1;
D/AndroidRuntime( 1200): Shutting down VM
W/dalvikvm( 1200): threadid=1: thread exiting with uncaught exception (group=0xb3ae0b90)
E/AndroidRuntime( 1200): FATAL EXCEPTION: main
E/AndroidRuntime( 1200): Process: com.example.myproj, PID: 1200
E/AndroidRuntime( 1200): java.lang.VerifyError: com/example/myproj/MainActivity$1
E/AndroidRuntime( 1200): at com.example.myproj.MainActivity.dol(MainActivity.java:24)
E/AndroidRuntime( 1200): at com.example.myproj.MainActivity.onCreate(MainActivity.java:17)
E/AndroidRuntime( 1200): at android.app.Activity.performCreate(Activity.java:5243)
E/AndroidRuntime( 1200): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
E/AndroidRuntime( 1200): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2140)
E/AndroidRuntime( 1200): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2226)
E/AndroidRuntime( 1200): at android.app.ActivityThread.access$700(ActivityThread.java:135)
E/AndroidRuntime( 1200): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1397)
E/AndroidRuntime( 1200): at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime( 1200): at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime( 1200): at android.app.ActivityThread.main(ActivityThread.java:4998)
E/AndroidRuntime( 1200): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 1200): at java.lang.reflect.Method.invoke(Method.java:515)
E/AndroidRuntime( 1200): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:777)
E/AndroidRuntime( 1200): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:593)
E/AndroidRuntime( 1200): at dalvik.system.NativeStart.main(Native Method)
W/ActivityManager( 361): Force finishing activity com.example.myproj/.MainActivity
I/WindowManager( 361): Screenshot max retries 4 of Token{b4083168 ActivityRecord{b3ffc9c8 u0 com.example.myproj/.MainActivity t9 f}} appWin=Window{b401a348 u0 Starting com.example.myproj} drawState=4
W/WindowManager( 361): Screenshot failure taking screenshot for (800x1280) to layer 21010
W/ActivityManager( 361): Activity pause timeout for ActivityRecord{b3ffc9c8 u0 com.example.myproj/.MainActivity t9 f}
I/Choreographer( 361): Skipped 31 frames! The application may be doing too much work on its main thread.
E/WindowManager( 361): Starting window AppWindowToken{b41c65a8 token=Token{b4083168 ActivityRecord{b3ffc9c8 u0 com.example.myproj/.MainActivity t9}}} timed out
W/ActivityManager( 361): Activity destroy timeout for ActivityRecord{b3ffc9c8 u0 com.example.myproj/.MainActivity t9 f}
D/dalvikvm( 531): GC_CONCURRENT freed 894K, 16% free 5380K/6392K, paused 78ms+17ms, total 167ms
D/dalvikvm( 515): GC_CONCURRENT freed 322K, 12% free 3340K/3780K, paused 6ms+7ms, total 64ms
I/Process ( 1200): Sending signal. PID: 1200 SIG: 9
W/InputMethodManagerService( 361): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy#b404f558 attribute=null, token = android.os.BinderProxy#b404fb70
I/ActivityManager( 361): Process com.example.myproj (pid 1200) has died.
D/ConnectivityService( 361): Sampling interval elapsed, updating statistics ..
D/ConnectivityService( 361): Done.
D/ConnectivityService( 361): Setting timer for 720seconds
D/dalvikvm( 515): GC_CONCURRENT freed 436K, 14% free 3290K/3792K, paused 4ms+5ms, total 41ms
D/AndroidRuntime( 1240):
D/AndroidRuntime( 1240): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
D/AndroidRuntime( 1240): CheckJNI is ON
D/dalvikvm( 1240): Trying to load lib libjavacore.so 0x0
D/dalvikvm( 1240): Added shared lib libjavacore.so 0x0
D/dalvikvm( 1240): Trying to load lib libnativehelper.so 0x0
D/dalvikvm( 1240): Added shared lib libnativehelper.so 0x0
D/dalvikvm( 1240): No JNI_OnLoad found in libnativehelper.so 0x0, skipping init
D/dalvikvm( 1240): Note: class Landroid/app/ActivityManagerNative; has 179 unimplemented (abstract) methods
E/memtrack( 1240): Couldn't load memtrack module (No such file or directory)
E/android.os.Debug( 1240): failed to load memtrack module: -2
D/AndroidRuntime( 1240): Calling main entry com.android.commands.am.Am
I/ActivityManager( 361): Force stopping com.example.myproj appid=10051 user=0: from pid 1240
I/ActivityManager( 361): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 pkg=logcat cmp=com.example.myproj/.MainActivity} from pid 1240
D/gralloc ( 51): Registering a buffer in the process that created it. This may cause memory ordering problems.
E/libEGL ( 51): called unimplemented OpenGL ES API
E/libEGL ( 51): called unimplemented OpenGL ES API
E/libEGL ( 51): called unimplemented OpenGL ES API
E/libEGL ( 51): called unimplemented OpenGL ES API
E/SurfaceFlinger( 51): glCheckFramebufferStatusOES error 1304732677
E/SurfaceFlinger( 51): got GL_FRAMEBUFFER_COMPLETE_OES error while taking screenshot
E/libEGL ( 51): called unimplemented OpenGL ES API
E/libEGL ( 51): called unimplemented OpenGL ES API
W/WindowManager( 361): Screenshot failure taking screenshot for (266x425) to layer 21005
I/ActivityManager( 361): Start proc com.example.myproj for activity com.example.myproj/.MainActivity: pid=1251 uid=10051 gids={50051, 1028, 1015}
D/dalvikvm( 1251): Not late-enabling CheckJNI (already on)
I/Choreographer( 361): Skipped 44 frames! The application may be doing too much work on its main thread.
W/dalvikvm( 1251): VFY: register1 v4 holds uninitialized ref
W/dalvikvm( 1251): VFY: bad arg 0 (into Ljava/lang/Object;)
W/dalvikvm( 1251): VFY: rejecting call to Lacteve/symbolic/Util;.write (Ljava/lang/Object;I)V
W/dalvikvm( 1251): VFY: rejecting opcode 0x71 at 0x000a
W/dalvikvm( 1251): VFY: rejected Lcom/example/myproj/MainActivity$1;.<init> (Lcom/example/myproj/MainActivity;)V
W/dalvikvm( 1251): Verifier rejected class Lcom/example/myproj/MainActivity$1;
D/AndroidRuntime( 1251): Shutting down VM
W/dalvikvm( 1251): threadid=1: thread exiting with uncaught exception (group=0xb3ae0b90)
E/AndroidRuntime( 1251): FATAL EXCEPTION: main
E/AndroidRuntime( 1251): Process: com.example.myproj, PID: 1251
E/AndroidRuntime( 1251): java.lang.VerifyError: com/example/myproj/MainActivity$1
E/AndroidRuntime( 1251): at com.example.myproj.MainActivity.dol(MainActivity.java:24)
E/AndroidRuntime( 1251): at com.example.myproj.MainActivity.onCreate(MainActivity.java:17)
E/AndroidRuntime( 1251): at android.app.Activity.performCreate(Activity.java:5243)
E/AndroidRuntime( 1251): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
E/AndroidRuntime( 1251): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2140)
E/AndroidRuntime( 1251): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2226)
E/AndroidRuntime( 1251): at android.app.ActivityThread.access$700(ActivityThread.java:135)
E/AndroidRuntime( 1251): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1397)
E/AndroidRuntime( 1251): at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime( 1251): at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime( 1251): at android.app.ActivityThread.main(ActivityThread.java:4998)
E/AndroidRuntime( 1251): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 1251): at java.lang.reflect.Method.invoke(Method.java:515)
E/AndroidRuntime( 1251): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:777)
E/AndroidRuntime( 1251): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:593)
E/AndroidRuntime( 1251): at dalvik.system.NativeStart.main(Native Method)
W/ActivityManager( 361): Force finishing activity com.example.myproj/.MainActivity
I/WindowManager( 361): Screenshot max retries 4 of Token{b41deb30 ActivityRecord{b4232990 u0 com.example.myproj/.MainActivity t10 f}} appWin=Window{b423e4b0 u0 Starting com.example.myproj} drawState=4
W/WindowManager( 361): Screenshot failure taking screenshot for (800x1280) to layer 21010
D/dalvikvm( 361): GC_CONCURRENT freed 1117K, 16% free 6529K/7720K, paused 16ms+34ms, total 347ms
W/ActivityManager( 361): Activity pause timeout for ActivityRecord{b4232990 u0 com.example.myproj/.MainActivity t10 f}
I/Choreographer( 531): Skipped 46 frames! The application may be doing too much work on its main thread.
D/LightsService( 361): Excessive delay setting light: 82ms
D/LightsService( 361): Excessive delay setting light: 426ms
I/Choreographer( 361): Skipped 37 frames! The application may be doing too much work on its main thread.
D/LightsService( 361): Excessive delay setting light: 1681ms
E/SoundPool( 361): error loading /system/media/audio/ui/Effect_Tick.ogg
W/AudioService( 361): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
E/SoundPool( 361): error loading /system/media/audio/ui/Effect_Tick.ogg
W/AudioService( 361): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
E/SoundPool( 361): error loading /system/media/audio/ui/Effect_Tick.ogg
W/AudioService( 361): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
E/SoundPool( 361): error loading /system/media/audio/ui/Effect_Tick.ogg
W/AudioService( 361): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
E/SoundPool( 361): error loading /system/media/audio/ui/Effect_Tick.ogg
W/AudioService( 361): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg
E/SoundPool( 361): error loading /system/media/audio/ui/KeypressStandard.ogg
W/AudioService( 361): Soundpool could not load file: /system/media/audio/ui/KeypressStandard.ogg
E/SoundPool( 361): error loading /system/media/audio/ui/KeypressSpacebar.ogg
W/AudioService( 361): Soundpool could not load file: /system/media/audio/ui/KeypressSpacebar.ogg
E/SoundPool( 361): error loading /system/media/audio/ui/KeypressDelete.ogg
W/AudioService( 361): Soundpool could not load file: /system/media/audio/ui/KeypressDelete.ogg
E/SoundPool( 361): error loading /system/media/audio/ui/KeypressReturn.ogg
W/AudioService( 361): Soundpool could not load file: /system/media/audio/ui/KeypressReturn.ogg
E/SoundPool( 361): error loading /system/media/audio/ui/KeypressInvalid.ogg
W/AudioService( 361): Soundpool could not load file: /system/media/audio/ui/KeypressInvalid.ogg
W/AudioService( 361): onLoadSoundEffects(), Error -1 while loading samples
I/Process ( 1251): Sending signal. PID: 1251 SIG: 9
D/LightsService( 361): Excessive delay setting light: 320ms
D/LightsService( 361): Excessive delay setting light: 190ms
D/LightsService( 361): Excessive delay setting light: 73ms
I/ActivityManager( 361): Process com.example.myproj (pid 1251) has died.
W/InputMethodManagerService( 361): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy#b3f8b170 attribute=null, token = android.os.BinderProxy#b404fb70
E/WindowManager( 361): Starting window AppWindowToken{b4233820 token=Token{b41deb30 ActivityRecord{b4232990 u0 com.example.myproj/.MainActivity t10}}} timed out
I/ActivityManager( 361): Killing 564:com.android.printspooler/u0a38 (adj 15): empty for 1807s
I/ProcessStatsService( 361): Prepared write state in 25ms
I/ProcessStatsService( 361): Prepared write state in 16ms
I am creating an app on Android, which involves an Activity and a service. One of the components of the service is meant to send a signal to the MainActivity, which will execute some specific code. The problem is, trying to send the intent makes the app crash.
Here is the code that sends the intent. Note that it resides in the inside of a doInBackground function of an AsyncTask object, which resides inside the said service:
#Override
protected String doInBackground(Socket... client) {
Intent received = new Intent();
received.setAction("com.mycompany.Messenger.MESSAGE_RECEIVED");
sendBroadcast(received);
}
Note that if I comment out sendBroadcast(received), the app does not crash.
Here is the handler of the Intent inside MainActivity (which has the name ChatBubbleActivity in my app):
public class MessageReceiver extends BroadcastReceiver {
#Override
public void onReceive(Context context, Intent intent) {
if(intent.getAction().equals(MESSAGE_RECEIVED)) {
String current_message = "Intent works!";
TextView textView = (TextView) findViewById(R.id.myText);
textView.setText(current_message);
}
}
}
And this is the declaration of the Receiver in manifest:
<receiver android:name=".ChatBubbleActivity$MessageReceiver">
<intent-filter>
<action android:name="com.mycompany.Messenger.MESSAGE_RECEIVED"/>
</intent-filter>
</receiver>
, inside the <activity> chunk.
What is it that I might be missing?
EDIT:New version of code based on answers, still crashing.
EDIT logcat:
02-04 16:17:32.444 487-489/? D/dalvikvm﹕ GC_CONCURRENT freed 1662K, 22% free 6885K/8728K, paused 2ms+2ms, total 42ms
02-04 16:17:32.876 1275-1275/? D/AndroidRuntime﹕ >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
02-04 16:17:32.912 1275-1275/? D/AndroidRuntime﹕ CheckJNI is OFF
02-04 16:17:32.960 1275-1275/? D/dalvikvm﹕ Trying to load lib libjavacore.so 0x0
02-04 16:17:32.964 1275-1275/? D/dalvikvm﹕ Added shared lib libjavacore.so 0x0
02-04 16:17:32.968 1275-1275/? D/dalvikvm﹕ Trying to load lib libnativehelper.so 0x0
02-04 16:17:32.972 1275-1275/? D/dalvikvm﹕ Added shared lib libnativehelper.so 0x0
02-04 16:17:32.972 1275-1275/? D/dalvikvm﹕ No JNI_OnLoad found in libnativehelper.so 0x0, skipping init
02-04 16:17:33.020 1275-1275/? D/dalvikvm﹕ Note: class Landroid/app/ActivityManagerNative; has 179 unimplemented (abstract) methods
02-04 16:17:33.128 1275-1275/? E/memtrack﹕ Couldn't load memtrack module (No such file or directory)
02-04 16:17:33.132 1275-1275/? E/android.os.Debug﹕ failed to load memtrack module: -2
02-04 16:17:33.264 1275-1275/? D/AndroidRuntime﹕ Calling main entry com.android.commands.am.Am
02-04 16:17:33.284 487-617/? I/ActivityManager﹕ START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.mycompany.messenger/com.mycompany.Messenger.ChatBubbleActivity} from pid 1275
02-04 16:17:33.692 1275-1275/? D/AndroidRuntime﹕ Shutting down VM
02-04 16:17:33.692 1275-1279/? D/dalvikvm﹕ GC_CONCURRENT freed 95K, 15% free 576K/676K, paused 1ms+0ms, total 1ms
02-04 16:17:33.884 487-538/? I/ActivityManager﹕ Start proc com.mycompany.messenger for activity com.mycompany.messenger/com.mycompany.Messenger.ChatBubbleActivity: pid=1286 uid=10059 gids={50059, 3003}
02-04 16:17:33.932 1286-1286/? D/dalvikvm﹕ Late-enabling CheckJNI
02-04 16:17:34.228 1286-1286/? D/dalvikvm﹕ GC_FOR_ALLOC freed 60K, 4% free 2873K/2992K, paused 6ms, total 7ms
02-04 16:17:34.236 1286-1286/? I/dalvikvm-heap﹕ Grow heap (frag case) to 3.338MB for 500412-byte allocation
02-04 16:17:34.248 1286-1295/? D/dalvikvm﹕ GC_FOR_ALLOC freed <1K, 4% free 3362K/3484K, paused 11ms, total 11ms
02-04 16:17:34.252 1286-1290/? D/dalvikvm﹕ GC_CONCURRENT freed 0K, 4% free 3362K/3484K, paused 1ms+0ms, total 5ms
02-04 16:17:34.696 1286-1286/? D/libEGL﹕ loaded /system/lib/egl/libEGL_genymotion.so
02-04 16:17:34.708 1286-1286/? D/﹕ HostConnection::get() New Host Connection established 0xb7944cb0, tid 1286
02-04 16:17:34.744 1286-1286/? D/libEGL﹕ loaded /system/lib/egl/libGLESv1_CM_genymotion.so
02-04 16:17:34.744 1286-1286/? D/libEGL﹕ loaded /system/lib/egl/libGLESv2_genymotion.so
02-04 16:17:34.816 1286-1286/? W/EGL_genymotion﹕ eglSurfaceAttrib not implemented
02-04 16:17:34.820 1286-1286/? E/OpenGLRenderer﹕ Getting MAX_TEXTURE_SIZE from GradienCache
02-04 16:17:34.824 1286-1286/? E/OpenGLRenderer﹕ MAX_TEXTURE_SIZE: 8192
02-04 16:17:34.848 1286-1286/? E/OpenGLRenderer﹕ Getting MAX_TEXTURE_SIZE from Caches::initConstraints()
02-04 16:17:34.848 1286-1286/? E/OpenGLRenderer﹕ MAX_TEXTURE_SIZE: 8192
02-04 16:17:34.852 1286-1286/? D/OpenGLRenderer﹕ Enabling debug mode 0
02-04 16:17:34.932 1286-1300/? W/dalvikvm﹕ threadid=12: thread exiting with uncaught exception (group=0xa4d31b20)
02-04 16:17:34.932 1286-1300/? E/AndroidRuntime﹕ FATAL EXCEPTION: AsyncTask #2
Process: com.mycompany.messenger, PID: 1286
java.lang.RuntimeException: An error occured while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:300)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355)
at java.util.concurrent.FutureTask.setException(FutureTask.java:222)
at java.util.concurrent.FutureTask.run(FutureTask.java:242)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:841)
Caused by: android.util.AndroidRuntimeException: Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want?
at android.app.ContextImpl.startActivity(ContextImpl.java:1050)
at android.app.ContextImpl.startActivity(ContextImpl.java:1037)
at android.content.ContextWrapper.startActivity(ContextWrapper.java:311)
at com.mycompany.Messenger.LocalService$DownloadWebpageTask2.doInBackground(LocalService.java:118)
at com.mycompany.Messenger.LocalService$DownloadWebpageTask2.doInBackground(LocalService.java:113)
at android.os.AsyncTask$2.call(AsyncTask.java:288)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:841)
02-04 16:17:34.936 487-617/? W/ActivityManager﹕ Force finishing activity com.mycompany.messenger/com.mycompany.Messenger.ChatBubbleActivity
02-04 16:17:35.180 487-840/? W/InputMethodManagerService﹕ Focus gain on non-focused client com.android.internal.view.IInputMethodClient$Stub$Proxy#529ef2ac (uid=10059 pid=1286)
02-04 16:17:35.288 487-617/? I/WindowManager﹕ Screenshot max retries 4 of Token{52998cec ActivityRecord{5294f214 u0 com.mycompany.messenger/com.mycompany.Messenger.ChatBubbleActivity t4 f}} appWin=Window{52948c58 u0 Starting com.mycompany.messenger} drawState=4
02-04 16:17:35.288 487-617/? W/WindowManager﹕ Screenshot failure taking screenshot for (800x1280) to layer 21015
02-04 16:17:38.512 487-502/? I/Choreographer﹕ Skipped 188 frames! The application may be doing too much work on its main thread.
02-04 16:17:38.516 711-711/? I/Choreographer﹕ Skipped 185 frames! The application may be doing too much work on its main thread.
02-04 16:17:39.708 117-117/? D/local_opengl﹕ Select interrupted or nothing to read
02-04 16:17:40.536 711-711/? W/EGL_genymotion﹕ eglSurfaceAttrib not implemented
02-04 16:17:41.260 487-502/? I/Choreographer﹕ Skipped 35 frames! The application may be doing too much work on its main thread.
02-04 16:17:49.560 1286-1300/? I/Process﹕ Sending signal. PID: 1286 SIG: 9
02-04 16:17:49.580 487-616/? W/InputMethodManagerService﹕ Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy#52963b68 attribute=null, token = android.os.BinderProxy#5290713c
02-04 16:17:49.644 487-840/? I/ActivityManager﹕ Process com.mycompany.messenger (pid 1286) has died.
02-04 16:17:49.716 117-117/? D/local_opengl﹕ Select interrupted or nothing to read
02-04 16:17:59.720 117-117/? D/local_opengl﹕ Select interrupted or nothing to read
02-04 16:18:09.728 117-117/? D/local_opengl﹕ Select interrupted or nothing to read
02-04 16:18:19.736 117-117/? D/local_opengl﹕ Select interrupted or nothing to read
02-04 16:18:29.744 117-117/? D/local_opengl﹕ Select interrupted or nothing to read
02-04 16:18:39.752 117-117/? D/local_opengl﹕ Select interrupted or nothing to read
02-04 16:18:49.756 117-117/? D/local_opengl﹕ Select interrupted or nothing to read
02-04 16:18:59.764 117-117/? D/local_opengl﹕ Select interrupted or nothing to read
02-04 16:19:09.772 117-117/? D/local_opengl﹕ Select interrupted or nothing to read
02-04 16:19:19.780 117-117/? D/local_opengl﹕ Select interrupted or nothing to read
02-04 16:19:29.788 117-117/? D/local_opengl﹕ Select interrupted or nothing to read
02-04 16:19:39.792 117-117/? D/local_opengl﹕ Select interrupted or nothing to read
02-04 16:19:49.800 117-117/? D/local_opengl﹕ Select interrupted or nothing to read
Do you want to start an activity or send a broadcast? I don't understand your code.
You are starting an activity from a background thread, that's not allowed.
In your AsyncTask, the method protected String doInBackground(Socket... client) is the only one that doesn't run in the UI thread.
When ever you want to start your Broadcast Receiver you don't call it as an acitivty
Your Method
Intent received = new Intent(ChatBubbleActivity.MESSAGE_RECEIVED);
received.putExtra("current", "Intent is working!!");
startActivity(received);
What it should be
Intent intent = new Intent();
intent.setAction("com.tutorialspoint.CUSTOM_INTENT");
sendBroadcast(intent);
Have a look at these tutorials
Vogella
TutorialsPoint
I have the following ImageView:
imageView.setBackgroundResource(R.drawable.create_user);
My create_user drawable looks like this:
<animation-list xmlns:android="http://schemas.android.com/apk/res/android" android:oneshot="false">
<item android:drawable="#drawable/create_user_0" android:duration="500" />
<item android:drawable="#drawable/create_user_1" android:duration="500" />
</animation-list>
But when the .xml is being set in imageView.setBacgroundResource(R.drawable.create_user), it launches the following exception:
02-04 10:49:07.994: E/AndroidRuntime(1379): FATAL EXCEPTION: main
02-04 10:49:07.994: E/AndroidRuntime(1379): java.lang.OutOfMemoryError
02-04 10:49:07.994: E/AndroidRuntime(1379): at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
02-04 10:49:07.994: E/AndroidRuntime(1379): at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:596)
02-04 10:49:07.994: E/AndroidRuntime(1379): at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:444)
02-04 10:49:07.994: E/AndroidRuntime(1379): at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:832)
02-04 10:49:07.994: E/AndroidRuntime(1379): at android.content.res.Resources.loadDrawable(Resources.java:2988)
02-04 10:49:07.994: E/AndroidRuntime(1379): at android.content.res.Resources.getDrawable(Resources.java:1558)
02-04 10:49:07.994: E/AndroidRuntime(1379): at android.graphics.drawable.AnimationDrawable.inflate(AnimationDrawable.java:282)
02-04 10:49:07.994: E/AndroidRuntime(1379): at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:937)
02-04 10:49:07.994: E/AndroidRuntime(1379): at android.graphics.drawable.Drawable.createFromXml(Drawable.java:873)
02-04 10:49:07.994: E/AndroidRuntime(1379): at android.content.res.Resources.loadDrawable(Resources.java:2970)
02-04 10:49:07.994: E/AndroidRuntime(1379): at android.content.res.Resources.getDrawable(Resources.java:1558)
02-04 10:49:07.994: E/AndroidRuntime(1379): at android.view.View.setBackgroundResource(View.java:15697)
02-04 10:49:07.994: E/AndroidRuntime(1379): at com.facephi.sdk.ui.FragmentCreatingStructure.onCreateView(FragmentCreatingStructu re.java:29)
02-04 10:49:07.994: E/AndroidRuntime(1379): at android.app.Fragment.performCreateView(Fragment.java:1699)
02-04 10:49:07.994: E/AndroidRuntime(1379): at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:903)
02-04 10:49:07.994: E/AndroidRuntime(1379): at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1075)
02-04 10:49:07.994: E/AndroidRuntime(1379): at android.app.BackStackRecord.run(BackStackRecord.java:682)
02-04 10:49:07.994: E/AndroidRuntime(1379): at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1455)
02-04 10:49:07.994: E/AndroidRuntime(1379): at android.app.FragmentManagerImpl$1.run(FragmentManager.java:441)
02-04 10:49:07.994: E/AndroidRuntime(1379): at android.os.Handler.handleCallback(Handler.java:730)
02-04 10:49:07.994: E/AndroidRuntime(1379): at android.os.Handler.dispatchMessage(Handler.java:92)
02-04 10:49:07.994: E/AndroidRuntime(1379): at android.os.Looper.loop(Looper.java:176)
02-04 10:49:07.994: E/AndroidRuntime(1379): at android.app.ActivityThread.main(ActivityThread.java:5419)
02-04 10:49:07.994: E/AndroidRuntime(1379): at java.lang.reflect.Method.invokeNative(Native Method)
02-04 10:49:07.994: E/AndroidRuntime(1379): at java.lang.reflect.Method.invoke(Method.java:525)
02-04 10:49:07.994: E/AndroidRuntime(1379): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1046)
02-04 10:49:07.994: E/AndroidRuntime(1379): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:862)
02-04 10:49:07.994: E/AndroidRuntime(1379): at dalvik.system.NativeStart.main(Native Method)
I have to say that I've been using this animation for a looong time. And yesterday was the first time it started crashing.
I can't imagine what's going on at this point... Can anyone help me find what I'm doing wrong?
NOTE: It says Out of memory on a 638416-byte allocation before the mistake is launched.
NOTE2: It also says this several times before the application crashes.
02-04 11:23:56.179: I/dalvikvm(7266): "Binder_1" prio=5 tid=9 RUNNABLE
02-04 11:23:56.179: I/dalvikvm(7266): | group="main" sCount=0 dsCount=0 obj=0x427f2200 self=0x4192fcd0
02-04 11:23:56.179: I/dalvikvm(7266): | sysTid=7277 nice=0 sched=0/0 cgrp=apps handle=1100151432
02-04 11:23:56.179: I/dalvikvm(7266): | state=R schedstat=( 504400204 75428596 671 ) utm=34 stm=15 core=2
02-04 11:23:56.179: I/dalvikvm(7266): at dalvik.system.NativeStart.run(Native Method)
02-04 11:23:56.179: E/Camera-JNI(7266): Couldn't allocate byte array for JPEG data
02-04 11:23:56.239: I/dalvikvm-heap(7266): Clamp target GC heap from 71.012MB to 64.000MB
02-04 11:23:56.239: D/dalvikvm(7266): threadid=1: still suspended after undo (sc=1 dc=1)
02-04 11:23:56.239: D/dalvikvm(7266): GC_FOR_ALLOC freed 21K, 3% free 63352K/65192K, paused 17ms, total 17ms
02-04 11:23:56.239: I/dalvikvm-heap(7266): Forcing collection of SoftReferences for 460816-byte allocation
02-04 11:23:56.259: I/dalvikvm-heap(7266): Clamp target GC heap from 71.012MB to 64.000MB
02-04 11:23:56.259: D/dalvikvm(7266): threadid=1: still suspended after undo (sc=1 dc=1)
02-04 11:23:56.259: D/dalvikvm(7266): GC_BEFORE_OOM freed 0K, 3% free 63352K/65192K, paused 20ms, total 20ms
02-04 11:23:56.259: E/dalvikvm-heap(7266): Out of memory on a 460816-byte allocation.
Try adding android:largeHeap="true", in the manifest to see if this solves it.
Or Use api inSampleSize of bitmapfactory to sample the images.
I also faced this kind of error once but when I re sized my images it got resolved.
Try to re-size your images.
You can try to resize your images to adapt them to the exact size of the view, as explained here. You can even try using libraries like universal image loader which make this task easier.
I have downloaded the code for android app from here
And i had run this code in my eclipse but i had recieved some errors.
Here i am giving you log cat of project.
11-27 11:15:59.549: I/Choreographer(913): Skipped 53 frames! The application may be doing too much work on its main thread.
11-27 11:15:59.589: D/gralloc_goldfish(913): Emulator without GPU emulation detected.
11-27 11:16:03.049: I/Choreographer(913): Skipped 57 frames! The application may be doing too much work on its main thread.
11-27 11:16:05.910: I/Choreographer(913): Skipped 90 frames! The application may be doing too much work on its main thread.
11-27 11:16:06.030: I/Choreographer(913): Skipped 53 frames! The application may be doing too much work on its main thread.
11-27 11:16:08.874: D/InputEventConsistencyVerifier(913): KeyEvent: ACTION_UP but key was not down.
11-27 11:16:08.874: D/InputEventConsistencyVerifier(913): in android.widget.EditText{40d0a440 VFED..CL .F....I. 8,99-232,129 #7f080002 app:id/txtEmail}
11-27 11:16:08.874: D/InputEventConsistencyVerifier(913): 0: sent at 138840000000, KeyEvent { action=ACTION_UP, keyCode=KEYCODE_TAB, scanCode=15, metaState=0, flags=0x8, repeatCount=0, eventTime=138840, downTime=138687, deviceId=0, source=0x101 }
11-27 11:16:11.334: I/Choreographer(913): Skipped 88 frames! The application may be doing too much work on its main thread.
11-27 11:16:11.846: I/Choreographer(913): Skipped 87 frames! The application may be doing too much work on its main thread.
11-27 11:16:12.374: I/Choreographer(913): Skipped 91 frames! The application may be doing too much work on its main thread.
11-27 11:16:12.775: I/Choreographer(913): Skipped 32 frames! The application may be doing too much work on its main thread.
11-27 11:16:15.032: I/Choreographer(913): Skipped 86 frames! The application may be doing too much work on its main thread.
11-27 11:16:15.815: D/dalvikvm(913): GC_CONCURRENT freed 206K, 13% free 2550K/2900K, paused 109ms+12ms, total 235ms
11-27 11:16:16.370: I/Choreographer(913): Skipped 90 frames! The application may be doing too much work on its main thread.
11-27 11:16:18.554: I/Choreographer(913): Skipped 90 frames! The application may be doing too much work on its main thread.
11-27 11:16:19.490: I/Choreographer(913): Skipped 90 frames! The application may be doing too much work on its main thread.
11-27 11:16:20.714: I/Choreographer(913): Skipped 69 frames! The application may be doing too much work on its main thread.
11-27 11:16:23.045: I/Choreographer(913): Skipped 90 frames! The application may be doing too much work on its main thread.
11-27 11:16:24.014: I/dalvikvm(913): Could not find method com.google.android.gcm.GCMRegistrar.checkDevice, referenced from method com.androidhive.pushnotifications.MainActivity.onCreate
11-27 11:16:24.014: W/dalvikvm(913): VFY: unable to resolve static method 110: Lcom/google/android/gcm/GCMRegistrar;.checkDevice (Landroid/content/Context;)V
11-27 11:16:24.014: D/dalvikvm(913): VFY: replacing opcode 0x71 at 0x0040
11-27 11:16:24.064: I/dalvikvm(913): Could not find method com.google.android.gcm.GCMRegistrar.onDestroy, referenced from method com.androidhive.pushnotifications.MainActivity.onDestroy
11-27 11:16:24.064: W/dalvikvm(913): VFY: unable to resolve static method 114: Lcom/google/android/gcm/GCMRegistrar;.onDestroy (Landroid/content/Context;)V
11-27 11:16:24.064: D/dalvikvm(913): VFY: replacing opcode 0x71 at 0x000f
11-27 11:16:24.394: D/AndroidRuntime(913): Shutting down VM
11-27 11:16:24.404: W/dalvikvm(913): threadid=1: thread exiting with uncaught exception (group=0x40a71930)
11-27 11:16:24.484: E/AndroidRuntime(913): FATAL EXCEPTION: main
11-27 11:16:24.484: E/AndroidRuntime(913): java.lang.NoClassDefFoundError: com.google.android.gcm.GCMRegistrar
11-27 11:16:24.484: E/AndroidRuntime(913): at com.androidhive.pushnotifications.MainActivity.onCreate(MainActivity.java:59)
11-27 11:16:24.484: E/AndroidRuntime(913): at android.app.Activity.performCreate(Activity.java:5104)
11-27 11:16:24.484: E/AndroidRuntime(913): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
11-27 11:16:24.484: E/AndroidRuntime(913): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144)
11-27 11:16:24.484: E/AndroidRuntime(913): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
11-27 11:16:24.484: E/AndroidRuntime(913): at android.app.ActivityThread.access$600(ActivityThread.java:141)
11-27 11:16:24.484: E/AndroidRuntime(913): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
11-27 11:16:24.484: E/AndroidRuntime(913): at android.os.Handler.dispatchMessage(Handler.java:99)
11-27 11:16:24.484: E/AndroidRuntime(913): at android.os.Looper.loop(Looper.java:137)
11-27 11:16:24.484: E/AndroidRuntime(913): at android.app.ActivityThread.main(ActivityThread.java:5041)
11-27 11:16:24.484: E/AndroidRuntime(913): at java.lang.reflect.Method.invokeNative(Native Method)
11-27 11:16:24.484: E/AndroidRuntime(913): at java.lang.reflect.Method.invoke(Method.java:511)
11-27 11:16:24.484: E/AndroidRuntime(913): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
11-27 11:16:24.484: E/AndroidRuntime(913): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
11-27 11:16:24.484: E/AndroidRuntime(913): at dalvik.system.NativeStart.main(Native Method)
11-27 11:21:24.635: I/Process(913): Sending signal. PID: 913 SIG: 9
11-27 11:31:23.594: E/Trace(1311): error opening trace file: No such file or directory (2)
11-27 11:31:24.385: I/Choreographer(1311): Skipped 53 frames! The application may be doing too much work on its main thread.
11-27 11:31:24.454: D/gralloc_goldfish(1311): Emulator without GPU emulation detected.
11-27 11:31:25.488: I/Choreographer(1311): Skipped 90 frames! The application may be doing too much work on its main thread.
11-27 11:31:27.606: I/Choreographer(1311): Skipped 90 frames! The application may be doing too much work on its main thread.
11-27 11:31:28.708: I/Choreographer(1311): Skipped 87 frames! The application may be doing too much work on its main thread.
11-27 11:31:29.264: I/Choreographer(1311): Skipped 90 frames! The application may be doing too much work on its main thread.
11-27 11:31:30.398: I/Choreographer(1311): Skipped 87 frames! The application may be doing too much work on its main thread.
11-27 11:31:32.590: I/Choreographer(1311): Skipped 87 frames! The application may be doing too much work on its main thread.
11-27 11:31:35.235: I/Choreographer(1311): Skipped 103 frames! The application may be doing too much work on its main thread.
11-27 11:31:36.295: I/Choreographer(1311): Skipped 91 frames! The application may be doing too much work on its main thread.
11-27 11:31:36.875: I/Choreographer(1311): Skipped 148 frames! The application may be doing too much work on its main thread.
11-27 11:31:40.458: I/Choreographer(1311): Skipped 92 frames! The application may be doing too much work on its main thread.
11-27 11:31:42.064: I/Choreographer(1311): Skipped 90 frames! The application may be doing too much work on its main thread.
11-27 11:31:43.116: I/Choreographer(1311): Skipped 91 frames! The application may be doing too much work on its main thread.
11-27 11:31:43.629: I/Choreographer(1311): Skipped 91 frames! The application may be doing too much work on its main thread.
11-27 11:31:44.166: I/Choreographer(1311): Skipped 91 frames! The application may be doing too much work on its main thread.
11-27 11:31:46.287: I/Choreographer(1311): Skipped 91 frames! The application may be doing too much work on its main thread.
11-27 11:31:47.344: I/Choreographer(1311): Skipped 98 frames! The application may be doing too much work on its main thread.
11-27 11:31:48.396: I/Choreographer(1311): Skipped 88 frames! The application may be doing too much work on its main thread.
11-27 11:31:49.486: I/Choreographer(1311): Skipped 88 frames! The application may be doing too much work on its main thread.
11-27 11:31:50.076: I/Choreographer(1311): Skipped 95 frames! The application may be doing too much work on its main thread.
11-27 11:31:51.190: I/Choreographer(1311): Skipped 97 frames! The application may be doing too much work on its main thread.
11-27 11:31:51.686: I/Choreographer(1311): Skipped 90 frames! The application may be doing too much work on its main thread.
11-27 11:31:57.468: I/Choreographer(1311): Skipped 91 frames! The application may be doing too much work on its main thread.
11-27 11:31:58.479: I/Choreographer(1311): Skipped 87 frames! The application may be doing too much work on its main thread.
11-27 11:32:01.720: I/Choreographer(1311): Skipped 86 frames! The application may be doing too much work on its main thread.
11-27 11:32:02.269: I/Choreographer(1311): Skipped 87 frames! The application may be doing too much work on its main thread.
11-27 11:32:03.344: I/Choreographer(1311): Skipped 91 frames! The application may be doing too much work on its main thread.
11-27 11:32:05.441: I/Choreographer(1311): Skipped 86 frames! The application may be doing too much work on its main thread.
11-27 11:32:06.005: I/Choreographer(1311): Skipped 91 frames! The application may be doing too much work on its main thread.
11-27 11:32:07.055: I/Choreographer(1311): Skipped 103 frames! The application may be doing too much work on its main thread.
11-27 11:32:13.433: I/Choreographer(1311): Skipped 87 frames! The application may be doing too much work on its main thread.
11-27 11:32:13.996: I/Choreographer(1311): Skipped 90 frames! The application may be doing too much work on its main thread.
11-27 11:32:14.524: I/Choreographer(1311): Skipped 91 frames! The application may be doing too much work on its main thread.
11-27 11:32:15.586: I/Choreographer(1311): Skipped 90 frames! The application may be doing too much work on its main thread.
11-27 11:32:18.745: I/Choreographer(1311): Skipped 90 frames! The application may be doing too much work on its main thread.
11-27 11:32:21.374: I/Choreographer(1311): Skipped 92 frames! The application may be doing too much work on its main thread.
11-27 11:32:22.457: I/Choreographer(1311): Skipped 92 frames! The application may be doing too much work on its main thread.
11-27 11:32:23.114: I/Choreographer(1311): Skipped 169 frames! The application may be doing too much work on its main thread.
11-27 11:32:23.614: I/Choreographer(1311): Skipped 96 frames! The application may be doing too much work on its main thread.
11-27 11:32:24.184: I/Choreographer(1311): Skipped 77 frames! The application may be doing too much work on its main thread.
11-27 11:32:25.338: I/Choreographer(1311): Skipped 91 frames! The application may be doing too much work on its main thread.
11-27 11:32:26.884: I/Choreographer(1311): Skipped 44 frames! The application may be doing too much work on its main thread.
11-27 11:32:27.114: I/Choreographer(1311): Skipped 151 frames! The application may be doing too much work on its main thread.
11-27 11:32:28.234: D/InputEventConsistencyVerifier(1311): KeyEvent: ACTION_UP but key was not down.
11-27 11:32:28.234: D/InputEventConsistencyVerifier(1311): in android.widget.EditText{40d0e9c8 VFED..CL .F....I. 8,99-232,129 #7f080002 app:id/txtEmail}
11-27 11:32:28.234: D/InputEventConsistencyVerifier(1311): 0: sent at 1118162000000, KeyEvent { action=ACTION_UP, keyCode=KEYCODE_TAB, scanCode=15, metaState=0, flags=0x8, repeatCount=0, eventTime=1118162, downTime=1117979, deviceId=0, source=0x101 }
11-27 11:32:28.234: D/InputEventConsistencyVerifier(1311): -- recent events --
11-27 11:32:28.234: D/InputEventConsistencyVerifier(1311): 1: sent at 1112966368000, MotionEvent { action=ACTION_UP, id[0]=0, x[0]=51.0, y[0]=14.0, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=1112966, downTime=1112882, deviceId=0, source=0x1002 }
11-27 11:32:28.234: D/InputEventConsistencyVerifier(1311): 2: sent at 1112882632000, MotionEvent { action=ACTION_DOWN, id[0]=0, x[0]=51.0, y[0]=14.0, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=1112882, downTime=1112882, deviceId=0, source=0x1002 }
11-27 11:32:28.404: D/dalvikvm(1311): GC_CONCURRENT freed 197K, 12% free 2555K/2896K, paused 99ms+4ms, total 166ms
11-27 11:32:28.624: I/Choreographer(1311): Skipped 106 frames! The application may be doing too much work on its main thread.
11-27 11:32:29.094: I/Choreographer(1311): Skipped 30 frames! The application may be doing too much work on its main thread.
11-27 11:32:29.268: I/Choreographer(1311): Skipped 87 frames! The application may be doing too much work on its main thread.
11-27 11:32:30.686: I/Choreographer(1311): Skipped 135 frames! The application may be doing too much work on its main thread.
11-27 11:32:32.865: I/Choreographer(1311): Skipped 122 frames! The application may be doing too much work on its main thread.
11-27 11:32:33.555: I/Choreographer(1311): Skipped 35 frames! The application may be doing too much work on its main thread.
11-27 11:32:34.355: I/Choreographer(1311): Skipped 91 frames! The application may be doing too much work on its main thread.
11-27 11:32:34.874: I/Choreographer(1311): Skipped 91 frames! The application may be doing too much work on its main thread.
11-27 11:32:38.534: I/Choreographer(1311): Skipped 87 frames! The application may be doing too much work on its main thread.
11-27 11:32:39.054: I/Choreographer(1311): Skipped 93 frames! The application may be doing too much work on its main thread.
11-27 11:32:39.555: I/Choreographer(1311): Skipped 60 frames! The application may be doing too much work on its main thread.
11-27 11:32:39.635: I/dalvikvm(1311): Could not find method com.google.android.gcm.GCMRegistrar.checkDevice, referenced from method com.androidhive.pushnotifications.MainActivity.onCreate
11-27 11:32:39.635: W/dalvikvm(1311): VFY: unable to resolve static method 110: Lcom/google/android/gcm/GCMRegistrar;.checkDevice (Landroid/content/Context;)V
11-27 11:32:39.635: D/dalvikvm(1311): VFY: replacing opcode 0x71 at 0x0040
11-27 11:32:39.635: I/dalvikvm(1311): Could not find method com.google.android.gcm.GCMRegistrar.onDestroy, referenced from method com.androidhive.pushnotifications.MainActivity.onDestroy
11-27 11:32:39.644: W/dalvikvm(1311): VFY: unable to resolve static method 114: Lcom/google/android/gcm/GCMRegistrar;.onDestroy (Landroid/content/Context;)V
11-27 11:32:39.644: D/dalvikvm(1311): VFY: replacing opcode 0x71 at 0x000f
11-27 11:32:40.015: D/AndroidRuntime(1311): Shutting down VM
11-27 11:32:40.025: W/dalvikvm(1311): threadid=1: thread exiting with uncaught exception (group=0x40a71930)
11-27 11:32:40.084: E/AndroidRuntime(1311): FATAL EXCEPTION: main
11-27 11:32:40.084: E/AndroidRuntime(1311): java.lang.NoClassDefFoundError: com.google.android.gcm.GCMRegistrar
11-27 11:32:40.084: E/AndroidRuntime(1311): at com.androidhive.pushnotifications.MainActivity.onCreate(MainActivity.java:59)
11-27 11:32:40.084: E/AndroidRuntime(1311): at android.app.Activity.performCreate(Activity.java:5104)
11-27 11:32:40.084: E/AndroidRuntime(1311): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
11-27 11:32:40.084: E/AndroidRuntime(1311): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144)
11-27 11:32:40.084: E/AndroidRuntime(1311): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
11-27 11:32:40.084: E/AndroidRuntime(1311): at android.app.ActivityThread.access$600(ActivityThread.java:141)
11-27 11:32:40.084: E/AndroidRuntime(1311): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
11-27 11:32:40.084: E/AndroidRuntime(1311): at android.os.Handler.dispatchMessage(Handler.java:99)
11-27 11:32:40.084: E/AndroidRuntime(1311): at android.os.Looper.loop(Looper.java:137)
11-27 11:32:40.084: E/AndroidRuntime(1311): at android.app.ActivityThread.main(ActivityThread.java:5041)
11-27 11:32:40.084: E/AndroidRuntime(1311): at java.lang.reflect.Method.invokeNative(Native Method)
11-27 11:32:40.084: E/AndroidRuntime(1311): at java.lang.reflect.Method.invoke(Method.java:511)
11-27 11:32:40.084: E/AndroidRuntime(1311): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
11-27 11:32:40.084: E/AndroidRuntime(1311): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
11-27 11:32:40.084: E/AndroidRuntime(1311): at dalvik.system.NativeStart.main(Native Method)
11-27 11:32:46.704: I/Process(1311): Sending signal. PID: 1311 SIG: 9
warnings
Description Resource Path Location Type
The method setLatestEventInfo(Context, CharSequence, CharSequence, PendingIntent) from the type Notification is deprecated GCMIntentService.java /AndroidPushNotificationsUsingGCM/src/com/androidhive/pushnotifications line 104 Java Problem
The method setButton(CharSequence, DialogInterface.OnClickListener) from the type AlertDialog is deprecated AlertDialogManager.java /AndroidPushNotificationsUsingGCM/src/com/androidhive/pushnotifications line 31 Java Problem
The constructor Notification(int, CharSequence, long) is deprecated GCMIntentService.java /AndroidPushNotificationsUsingGCM/src/com/androidhive/pushnotifications line 94 Java Problem
The field PowerManager.FULL_WAKE_LOCK is deprecated WakeLocker.java /AndroidPushNotificationsUsingGCM/src/com/androidhive/pushnotifications line 13 Java Problem
Please help
i want to play mp3 file which is streamed mp3 file. i tried below link example
http://blog.pocketjourney.com/2008/04/04/tutorial-custom-media-streaming-for-androids-mediaplayer/
but the bellow error is coming
02-04 20:22:48.960: ERROR/PlayerDriver(31): Command PLAYER_PREPARE completed with an error or info PVMFErrResource
02-04 20:22:48.970: ERROR/MediaPlayer(425): error (1, -17)
02-04 20:22:48.989: WARN/PlayerDriver(31): PVMFInfoErrorHandlingComplete
02-04 20:22:49.089: DEBUG/dalvikvm(425): GC freed 4622 objects / 982864 bytes in 120ms
02-04 20:22:49.350: ERROR/com.Boodang.StreamingMediaPlayer(425): Error updating to newly loaded content.
02-04 20:22:49.350: ERROR/com.Boodang.StreamingMediaPlayer(425): java.io.IOException: Prepare failed.: status=0x1
02-04 20:22:49.350: ERROR/com.Boodang.StreamingMediaPlayer(425): at android.media.MediaPlayer.prepare(Native Method)
02-04 20:22:49.350: ERROR/com.Boodang.StreamingMediaPlayer(425): at com.Boodang.StreamingMediaPlayer.createMediaPlayer(StreamingMediaPlayer.java:210)
02-04 20:22:49.350: ERROR/com.Boodang.StreamingMediaPlayer(425): at com.Boodang.StreamingMediaPlayer.transferBufferToMediaPlayer(StreamingMediaPlayer.java:239)
02-04 20:22:49.350: ERROR/com.Boodang.StreamingMediaPlayer(425): at com.Boodang.StreamingMediaPlayer.access$3(StreamingMediaPlayer.java:219)
02-04 20:22:49.350: ERROR/com.Boodang.StreamingMediaPlayer(425): at com.Boodang.StreamingMediaPlayer$2.run(StreamingMediaPlayer.java:160)
02-04 20:22:49.350: ERROR/com.Boodang.StreamingMediaPlayer(425): at android.os.Handler.handleCallback(Handler.java:587)
02-04 20:22:49.350: ERROR/com.Boodang.StreamingMediaPlayer(425): at android.os.Handler.dispatchMessage(Handler.java:92)
02-04 20:22:49.350: ERROR/com.Boodang.StreamingMediaPlayer(425): at android.os.Looper.loop(Looper.java:123)
02-04 20:22:49.350: ERROR/com.Boodang.StreamingMediaPlayer(425): at android.app.ActivityThread.main(ActivityThread.java:4363)
02-04 20:22:49.350: ERROR/com.Boodang.StreamingMediaPlayer(425): at java.lang.reflect.Method.invokeNative(Native Method)
02-04 20:22:49.350: ERROR/com.Boodang.StreamingMediaPlayer(425): at java.lang.reflect.Method.invoke(Method.java:521)
02-04 20:22:49.350: ERROR/com.Boodang.StreamingMediaPlayer(425): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
02-04 20:22:49.350: ERROR/com.Boodang.StreamingMediaPlayer(425): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
02-04 20:22:49.350: ERROR/com.Boodang.StreamingMediaPlayer(425): at dalvik.system.NativeStart.main(Native Method)
so please tell me what i will do and i hope there is better way to do this one . so please tell me how to stream the mp3 file and play the mp3 file.
Thank you.
Best Regards.
First, that blog post is nearly three years old. Never use Android blog posts from that long ago.
Second, at least through Android 2.2, streaming MP3 files was not supported over RTSP. I think it works over HTTP.
Beyond that, make sure the URL you are using actually is reachable from your device or emulator. For example, you need the INTERNET permission in your app, your emulator needs to have Internet access, etc.
In the future, you might consider supplying source code, as a stack trace alone is usually insufficient to get assistance from anyone.