libQtDeclarative.so not found - android

I'm new to QT Programming
Here's what I did,
I export photo from photoshop to QT
after that I create new QT QUICK PROJECT ( ANDROID )
and open QT DESIGNER FILE which I exported earlier from photoshop
run through ministro,
but my this error occurred
>
Starting remote process ...
D/dalvikvm( 2148): Not late-enabling CheckJNI (already on)
I/dalvikvm( 2148): threadid=3: reacting to signal 3
I/dalvikvm( 2148): Wrote stack traces to '/data/anr/traces.txt'
I/dalvikvm( 2148): threadid=3: reacting to signal 3
I/dalvikvm( 2148): Wrote stack traces to '/data/anr/traces.txt'
I/dalvikvm( 2148): threadid=3: reacting to signal 3
I/dalvikvm( 2148): Wrote stack traces to '/data/anr/traces.txt'
I/dalvikvm( 2148): threadid=3: reacting to signal 3
I/dalvikvm( 2148): Wrote stack traces to '/data/anr/traces.txt'
D/dalvikvm( 2148): GC_FOR_ALLOC freed 45K, 3% free 9074K/9347K, paused 133ms
I/dalvikvm-heap( 2148): Grow heap (frag case) to 10.393MB for 1536016-byte allocation
I/dalvikvm( 2148): threadid=3: reacting to signal 3
D/dalvikvm( 2148): GC_CONCURRENT freed <1K, 3% free 10573K/10887K, paused 6ms+134ms
I/dalvikvm( 2148): Wrote stack traces to '/data/anr/traces.txt'
I/dalvikvm( 2148): threadid=3: reacting to signal 3
I/dalvikvm( 2148): Wrote stack traces to '/data/anr/traces.txt'
D/dalvikvm( 2148): GC_FOR_ALLOC freed 0K, 3% free 10573K/10887K, paused 49ms
I/dalvikvm-heap( 2148): Grow heap (frag case) to 13.688MB for 3456016-byte allocation
I/dalvikvm( 2148): threadid=3: reacting to signal 3
D/dalvikvm( 2148): GC_CONCURRENT freed 0K, 3% free 13948K/14279K, paused 8ms+7ms
I/dalvikvm( 2148): Wrote stack traces to '/data/anr/traces.txt'
I/dalvikvm( 2148): threadid=3: reacting to signal 3
I/dalvikvm( 2148): Wrote stack traces to '/data/anr/traces.txt'
I/dalvikvm( 2148): threadid=3: reacting to signal 3
I/dalvikvm( 2148): Wrote stack traces to '/data/anr/traces.txt'
D/gralloc_goldfish( 2148): Emulator without GPU emulation detected.
I/dalvikvm( 2148): threadid=3: reacting to signal 3
I/dalvikvm( 2148): Wrote stack traces to '/data/anr/traces.txt'
D/dalvikvm( 2148): DexOpt: --- BEGIN 'QtIndustrius-14.jar' (bootstrap=0) ---
D/dalvikvm( 2148): DexOpt: --- END 'QtIndustrius-14.jar' (success) ---
D/dalvikvm( 2148): DEX prep '/data/data/org.kde.necessitas.ministro/files/qt/jar/QtIndustrius-14.jar': unzip in 159ms, rewrite 749ms
D/dalvikvm( 2148): Trying to load lib /data/data/org.kde.necessitas.ministro/files/qt/lib/libQtCore.so 0x412a98f0
D/dalvikvm( 2148): Added shared lib /data/data/org.kde.necessitas.ministro/files/qt/lib/libQtCore.so 0x412a98f0
D/dalvikvm( 2148): No JNI_OnLoad found in /data/data/org.kde.necessitas.ministro/files/qt/lib/libQtCore.so 0x412a98f0, skipping init
D/dalvikvm( 2148): Trying to load lib /data/data/org.kde.necessitas.ministro/files/qt/lib/libQtGui.so 0x412a98f0
D/dalvikvm( 2148): Added shared lib /data/data/org.kde.necessitas.ministro/files/qt/lib/libQtGui.so 0x412a98f0
D/dalvikvm( 2148): No JNI_OnLoad found in /data/data/org.kde.necessitas.ministro/files/qt/lib/libQtGui.so 0x412a98f0, skipping init
D/dalvikvm( 2148): Trying to load lib /data/data/org.kde.necessitas.ministro/files/qt/plugins/platforms/android/libandroid-9.so 0x412a98f0
D/dalvikvm( 2148): Added shared lib /data/data/org.kde.necessitas.ministro/files/qt/plugins/platforms/android/libandroid-9.so 0x412a98f0
I/Qt ( 2148): qt start
D/dalvikvm( 2148): Trying to load lib /data/data/org.kde.necessitas.example.HOME/lib/libHOME.so 0x412a98f0
W/System.err( 2148): java.lang.reflect.InvocationTargetException
W/System.err( 2148): at java.lang.reflect.Method.invokeNative(Native Method)
W/System.err( 2148): at java.lang.reflect.Method.invoke(Method.java:511)
W/System.err( 2148): at org.kde.necessitas.origo.QtActivity.loadApplication(QtActivity.java:144)
W/System.err( 2148): at org.kde.necessitas.origo.QtActivity.access$200(QtActivity.java:77)
W/System.err( 2148): at org.kde.necessitas.origo.QtActivity$3$1$1.run(QtActivity.java:201)
W/System.err( 2148): at android.os.Handler.handleCallback(Handler.java:605)
W/System.err( 2148): at android.os.Handler.dispatchMessage(Handler.java:92)
W/System.err( 2148): at android.os.Looper.loop(Looper.java:137)
W/System.err( 2148): at android.app.ActivityThread.main(ActivityThread.java:4424)
W/System.err( 2148): at java.lang.reflect.Method.invokeNative(Native Method)
W/System.err( 2148): at java.lang.reflect.Method.invoke(Method.java:511)
W/System.err( 2148): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
W/System.err( 2148): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
W/System.err( 2148): at dalvik.system.NativeStart.main(Native Method)
W/System.err( 2148): Caused by: java.lang.UnsatisfiedLinkError: Cannot load library: link_image[1936]: 36 could not load needed library 'libQtDeclarative.so' for 'libHOME.so' (load_library[1091]: Library 'libQtDeclarative.so' not found)
W/System.err( 2148): at java.lang.Runtime.load(Runtime.java:340)
W/System.err( 2148): at java.lang.System.load(System.java:521)
W/System.err( 2148): at org.kde.necessitas.industrius.QtNative.loadBundledLibraries(QtNative.java:125)
W/System.err( 2148): at org.kde.necessitas.industrius.QtActivityDelegate.loadApplication(QtActivityDelegate.java:245)
W/System.err( 2148): ... 14 more
> Blockquote
and I think It is because of this
36 could not load needed library 'libQtDeclarative.so' for 'libHOME.so' (load_library[1091]: Library 'libQtDeclarative.so' not found)
I Use
ARMV5
Android Emulator
Someone help me please.
Thank you!

A couple questions:
Did you select Qt Quick Application in Necessitas? Looking at the output it seems as if its not packaging the Declarative module with the application.
What you can try is going into the run settings tab, extending the dropdowns and navigating to the package area. make sure QDeclarative is included. it should do this by default, but without knowing exactly how it was setup, its hard to guess why it did.
Key point, in the 'Package Configuration' area of the run settings, you will see a tab called libraries. Make sure QDeclarative is included.
Also, make sure the declarative module is declared in the .pro file
Hope this helps

Related

App does not start on Android and force close

I have created a test scene in Unity which has only one cube and a directional lightening. When installed in AVD just the name of app is display and shows up nothing...
I could not figure out what is the error.. or what is making my application to stop running
AVD setting that is used are
Target: 4.0.3 API Level 15
Skin: HVGA
RAM: 512 VM: 32
Internal Storage: 200MB
SDCARD:2GB
I/AndroidRuntime( 474): NOTE: attach of thread 'Binder Thread #3' failed
D/AndroidRuntime( 549):
D/AndroidRuntime( 549): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<
D/AndroidRuntime( 549): CheckJNI is ON
D/AndroidRuntime( 549): Calling main entry com.android.commands.am.Am
I/ActivityManager( 77): START {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.asdasd.cd/com.unity3d.player.UnityPlayerNativeActivity} from pid 549
D/PermissionCache( 36): checking android.permission.READ_FRAME_BUFFER for uid=1000 => granted (22624 us)
W/WindowManager( 77): Failure taking screenshot for (130x195) to layer 21005
D/AndroidRuntime( 549): Shutting down VM
D/dalvikvm( 549): GC_CONCURRENT freed 99K, 77% free 480K/2048K, paused 0ms+1ms
I/AndroidRuntime( 549): NOTE: attach of thread 'Binder Thread #3' failed
I/ActivityManager( 77): Start proc com.asdasd.cd for activity com.asdasd.cd/com.unity3d.player.UnityPlayerNativeActivity: pid=559 uid=10041 gids={}
W/NetworkManagementSocketTagger( 77): setKernelCountSet(10041, 1) failed with errno -2
I/dalvikvm( 77): Jit: resizing JitTable from 4096 to 8192
I/ARMAssembler( 36): generated scanline__00000077:03515104_00009002_00000000 [127 ipp] (149 ins) at [0x413fba80:0x413fbcd4] in 869530 ns
I/Process ( 77): Sending signal. PID: 559 SIG: 3
I/dalvikvm( 559): threadid=3: reacting to signal 3
I/dalvikvm( 559): Wrote stack traces to '/data/anr/traces.txt'
D/dalvikvm( 559): Trying to load lib /mnt/asec/com.asdasd.cd-2/lib/libmain.so 0x41023f78
D/dalvikvm( 559): Added shared lib /mnt/asec/com.asdasd.cd-2/lib/libmain.so 0x41023f78
I/Process ( 77): Sending signal. PID: 559 SIG: 3
I/dalvikvm( 559): threadid=3: reacting to signal 3
I/dalvikvm( 559): Wrote stack traces to '/data/anr/traces.txt'
I/Process ( 77): Sending signal. PID: 559 SIG: 3
I/dalvikvm( 559): threadid=3: reacting to signal 3
I/dalvikvm( 559): Wrote stack traces to '/data/anr/traces.txt'
I/Process ( 77): Sending signal. PID: 559 SIG: 3
I/dalvikvm( 559): threadid=3: reacting to signal 3
I/dalvikvm( 559): Wrote stack traces to '/data/anr/traces.txt'
I/Process ( 77): Sending signal. PID: 559 SIG: 3
I/dalvikvm( 559): threadid=3: reacting to signal 3
I/dalvikvm( 559): Wrote stack traces to '/data/anr/traces.txt'
I/Process ( 77): Sending signal. PID: 559 SIG: 3
I/dalvikvm( 559): threadid=3: reacting to signal 3
I/dalvikvm( 559): Wrote stack traces to '/data/anr/traces.txt'
I/Process ( 77): Sending signal. PID: 559 SIG: 3
I/dalvikvm( 559): threadid=3: reacting to signal 3
I/dalvikvm( 559): Wrote stack traces to '/data/anr/traces.txt'
I/Process ( 77): Sending signal. PID: 559 SIG: 3
I/dalvikvm( 559): threadid=3: reacting to signal 3
I/dalvikvm( 559): Wrote stack traces to '/data/anr/traces.txt'
I/Process ( 77): Sending signal. PID: 559 SIG: 3
I/dalvikvm( 559): threadid=3: reacting to signal 3
I/dalvikvm( 559): Wrote stack traces to '/data/anr/traces.txt'
I/Process ( 77): Sending signal. PID: 559 SIG: 3
I/dalvikvm( 559): threadid=3: reacting to signal 3
I/dalvikvm( 559): Wrote stack traces to '/data/anr/traces.txt'
I/Process ( 77): Sending signal. PID: 559 SIG: 3
I/dalvikvm( 559): threadid=3: reacting to signal 3
I/dalvikvm( 559): Wrote stack traces to '/data/anr/traces.txt'
I/Process ( 77): Sending signal. PID: 559 SIG: 3
I/dalvikvm( 559): threadid=3: reacting to signal 3
I/dalvikvm( 559): Wrote stack traces to '/data/anr/traces.txt'
I/Process ( 77): Sending signal. PID: 559 SIG: 3
I/dalvikvm( 559): threadid=3: reacting to signal 3
I/dalvikvm( 559): Wrote stack traces to '/data/anr/traces.txt'
I/Process ( 77): Sending signal. PID: 559 SIG: 3
I/dalvikvm( 559): threadid=3: reacting to signal 3
I/dalvikvm( 559): Wrote stack traces to '/data/anr/traces.txt'
I/Process ( 77): Sending signal. PID: 559 SIG: 3
I/dalvikvm( 559): threadid=3: reacting to signal 3
I/dalvikvm( 559): Wrote stack traces to '/data/anr/traces.txt'
I/Process ( 77): Sending signal. PID: 559 SIG: 3
I/dalvikvm( 559): threadid=3: reacting to signal 3
I/dalvikvm( 559): Wrote stack traces to '/data/anr/traces.txt'
I/Process ( 77): Sending signal. PID: 559 SIG: 3
I/dalvikvm( 559): threadid=3: reacting to signal 3
I/dalvikvm( 559): Wrote stack traces to '/data/anr/traces.txt'
I/Process ( 77): Sending signal. PID: 559 SIG: 3
I/dalvikvm( 559): threadid=3: reacting to signal 3
I/dalvikvm( 559): Wrote stack traces to '/data/anr/traces.txt'
I/Process ( 77): Sending signal. PID: 559 SIG: 3
I/dalvikvm( 559): threadid=3: reacting to signal 3
I/dalvikvm( 559): Wrote stack traces to '/data/anr/traces.txt'
W/ActivityManager( 77): Launch timeout has expired, giving up wake lock!
W/ActivityManager( 77): Activity idle timeout for ActivityRecord{411e1ab0 com.asdasd.cd/com.unity3d.player.UnityPlayerNativeActivity}
D/dalvikvm( 77): GC_CONCURRENT freed 294K, 11% free 8687K/9671K, paused 5ms+7ms
D/dalvikvm( 160): GC_CONCURRENT freed 436K, 8% free 6992K/7559K, paused 4ms+4ms
On Installing on Android the app so similar behavior and generates same similar log
I/ActivityManager( 289): START {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.asdasd.cd/com.unity3d.player.UnityPlayerNativeActivity bnds=[12,433][125,592]} from pid 546
I/ActivityManager( 289): Start proc com.asdasd.cd for activity com.asdasd.cd/com.unity3d.player.UnityPlayerNativeActivity: pid=4268 uid=10130 gids={}
W/ResourceType( 289): Skipping entry 0x7f040010 in package table 0 because it is not complex!
W/ResourceType( 289): Skipping entry 0x7f04003d in package table 0 because it is not complex!
D/dalvikvm( 4268): Trying to load lib /mnt/asec/com.asdasd.cd-1/lib/libmain.so 0x2bde3080
D/dalvikvm( 4268): Added shared lib /mnt/asec/com.asdasd.cd-1/lib/libmain.so 0x2bde3080
D/SurfaceFlinger( 136): Release buffer at 0xcddd0
W/ActivityManager( 289): Launch timeout has expired, giving up wake lock!
W/ActivityManager( 289): Activity idle timeout for ActivityRecord{2c57c1e8 com.asdasd.cd/com.unity3d.player.UnityPlayerNativeActivity}
For gaming better to use genymotion dont use AVD that doesn't support EGL rendering and in android 4.4 use dalvik instead of ART ...
Hope you get my point.
Finally my app is working..!:D Problem is solved by updating and applying latest patch unity 4.6.6p1.. which removes the bug from older version .Hope this will help someone having a similar problem

Android - Intent makes my app crash

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

Cant add action bar to preference activity

I want to add customized action bar in my Filter Activity which is a PreferenceActivity.
Can I use addPreferencesFromResource() method with ActionBarActivity ???
Every thing is working fine as my java file and xml file is correct. But there is no action bar, and when i attempt to call getActionBar().setBackgroundDrawable(R.drawable.xyz); there is a crash.
Please help me out.
here is my java code of the preference screen
import android.graphics.drawable.Drawable;
import android.support.v7.app.ActionBarActivity;
import android.os.Bundle;
import android.preference.PreferenceActivity;
public class Filter extends PreferenceActivity {
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
addPreferencesFromResource(R.xml.filter_screen);
Drawable d=getResources().getDrawable(R.drawable.abfilter);
getActionBar().setBackgroundDrawable(d);
}
}
here is the logcat
11-22 16:18:13.377 7460-7460/com.example.avinash.swipetab D/dalvikvm﹕ Late-enabling CheckJNI
11-22 16:18:13.481 7460-7460/com.example.avinash.swipetab W/ActivityThread﹕ Application com.example.avinash.swipetab is waiting for the debugger on port 8100...
11-22 16:18:13.487 7460-7460/com.example.avinash.swipetab I/System.out﹕ Sending WAIT chunk
11-22 16:18:13.494 7460-7468/com.example.avinash.swipetab I/dalvikvm﹕ Debugger is active
11-22 16:18:13.687 7460-7460/com.example.avinash.swipetab I/System.out﹕ Debugger has connected
11-22 16:18:13.688 7460-7460/com.example.avinash.swipetab I/System.out﹕ waiting for debugger to settle...
11-22 16:18:13.888 7460-7460/com.example.avinash.swipetab I/System.out﹕ waiting for debugger to settle...
11-22 16:18:14.088 7460-7460/com.example.avinash.swipetab I/System.out﹕ waiting for debugger to settle...
11-22 16:18:14.289 7460-7460/com.example.avinash.swipetab I/System.out﹕ waiting for debugger to settle...
11-22 16:18:14.489 7460-7460/com.example.avinash.swipetab I/System.out﹕ waiting for debugger to settle...
11-22 16:18:14.689 7460-7460/com.example.avinash.swipetab I/System.out﹕ waiting for debugger to settle...
11-22 16:18:14.889 7460-7460/com.example.avinash.swipetab I/System.out﹕ waiting for debugger to settle...
11-22 16:18:15.090 7460-7460/com.example.avinash.swipetab I/System.out﹕ waiting for debugger to settle...
11-22 16:18:15.290 7460-7460/com.example.avinash.swipetab I/System.out﹕ debugger has settled (1413)
11-22 16:18:15.713 7460-7460/com.example.avinash.swipetab I/dalvikvm﹕ Could not find method android.view.ViewGroup.onNestedScrollAccepted, referenced from method android.support.v7.internal.widget.ActionBarOverlayLayout.onNestedScrollAccepted
11-22 16:18:15.713 7460-7460/com.example.avinash.swipetab W/dalvikvm﹕ VFY: unable to resolve virtual method 11365: Landroid/view/ViewGroup;.onNestedScrollAccepted (Landroid/view/View;Landroid/view/View;I)V
11-22 16:18:15.713 7460-7460/com.example.avinash.swipetab D/dalvikvm﹕ VFY: replacing opcode 0x6f at 0x0000
11-22 16:18:15.714 7460-7460/com.example.avinash.swipetab I/dalvikvm﹕ Could not find method android.view.ViewGroup.onStopNestedScroll, referenced from method android.support.v7.internal.widget.ActionBarOverlayLayout.onStopNestedScroll
11-22 16:18:15.714 7460-7460/com.example.avinash.swipetab W/dalvikvm﹕ VFY: unable to resolve virtual method 11371: Landroid/view/ViewGroup;.onStopNestedScroll (Landroid/view/View;)V
11-22 16:18:15.714 7460-7460/com.example.avinash.swipetab D/dalvikvm﹕ VFY: replacing opcode 0x6f at 0x0000
11-22 16:18:15.716 7460-7460/com.example.avinash.swipetab I/dalvikvm﹕ Could not find method android.support.v7.internal.widget.ActionBarOverlayLayout.stopNestedScroll, referenced from method android.support.v7.internal.widget.ActionBarOverlayLayout.setHideOnContentScrollEnabled
11-22 16:18:15.716 7460-7460/com.example.avinash.swipetab W/dalvikvm﹕ VFY: unable to resolve virtual method 9059: Landroid/support/v7/internal/widget/ActionBarOverlayLayout;.stopNestedScroll ()V
11-22 16:18:15.716 7460-7460/com.example.avinash.swipetab D/dalvikvm﹕ VFY: replacing opcode 0x6e at 0x000e
11-22 16:18:15.734 7460-7460/com.example.avinash.swipetab I/dalvikvm﹕ Could not find method android.content.res.TypedArray.getChangingConfigurations, referenced from method android.support.v7.internal.widget.TintTypedArray.getChangingConfigurations
11-22 16:18:15.734 7460-7460/com.example.avinash.swipetab W/dalvikvm﹕ VFY: unable to resolve virtual method 367: Landroid/content/res/TypedArray;.getChangingConfigurations ()I
11-22 16:18:15.734 7460-7460/com.example.avinash.swipetab D/dalvikvm﹕ VFY: replacing opcode 0x6e at 0x0002
11-22 16:18:15.736 7460-7460/com.example.avinash.swipetab I/dalvikvm﹕ Could not find method android.content.res.TypedArray.getType, referenced from method android.support.v7.internal.widget.TintTypedArray.getType
11-22 16:18:15.736 7460-7460/com.example.avinash.swipetab W/dalvikvm﹕ VFY: unable to resolve virtual method 389: Landroid/content/res/TypedArray;.getType (I)I
11-22 16:18:15.736 7460-7460/com.example.avinash.swipetab D/dalvikvm﹕ VFY: replacing opcode 0x6e at 0x0002
11-22 16:18:15.886 7460-7460/com.example.avinash.swipetab D/dalvikvm﹕ GC_FOR_ALLOC freed 177K, 10% free 3028K/3328K, paused 10ms, total 10ms
11-22 16:18:15.887 7460-7460/com.example.avinash.swipetab I/dalvikvm-heap﹕ Grow heap (frag case) to 3.681MB for 635812-byte allocation
11-22 16:18:15.900 7460-7473/com.example.avinash.swipetab D/dalvikvm﹕ GC_FOR_ALLOC freed 8K, 8% free 3640K/3952K, paused 8ms, total 8ms
11-22 16:18:16.124 7460-7460/com.example.avinash.swipetab D/dalvikvm﹕ GC_FOR_ALLOC freed 49K, 6% free 4040K/4272K, paused 10ms, total 10ms
11-22 16:18:16.155 7460-7460/com.example.avinash.swipetab D/dalvikvm﹕ GC_FOR_ALLOC freed 323K, 13% free 3897K/4448K, paused 8ms, total 8ms
11-22 16:18:16.220 7460-7460/com.example.avinash.swipetab D/dalvikvm﹕ GC_FOR_ALLOC freed 1K, 6% free 4220K/4448K, paused 9ms, total 9ms
11-22 16:18:16.256 7460-7460/com.example.avinash.swipetab D/dalvikvm﹕ GC_FOR_ALLOC freed 318K, 12% free 4227K/4768K, paused 9ms, total 9ms
11-22 16:18:16.297 7460-7460/com.example.avinash.swipetab D/dalvikvm﹕ GC_FOR_ALLOC freed <1K, 5% free 4550K/4768K, paused 9ms, total 9ms
11-22 16:18:16.375 7460-7460/com.example.avinash.swipetab D/dalvikvm﹕ GC_FOR_ALLOC freed 1K, 4% free 4887K/5088K, paused 9ms, total 9ms
11-22 16:18:16.436 7460-7460/com.example.avinash.swipetab D/dalvikvm﹕ GC_FOR_ALLOC freed <1K, 4% free 5217K/5408K, paused 9ms, total 9ms
11-22 16:18:16.584 7460-7460/com.example.avinash.swipetab D/dalvikvm﹕ GC_FOR_ALLOC freed 1K, 3% free 5889K/6048K, paused 9ms, total 9ms
11-22 16:18:16.641 7460-7460/com.example.avinash.swipetab E/﹕ appName=com.example.avinash.swipetab, acAppName=/system/bin/surfaceflinger
11-22 16:18:16.641 7460-7460/com.example.avinash.swipetab E/﹕ 0
11-22 16:18:16.645 7460-7460/com.example.avinash.swipetab I/MaliEGL﹕ [Mali]window_type=1, is_framebuffer=0, errnum = 0
11-22 16:18:16.645 7460-7460/com.example.avinash.swipetab I/MaliEGL﹕ [Mali]surface->num_buffers=4, surface->num_frames=3, win_min_undequeued=1
11-22 16:18:16.645 7460-7460/com.example.avinash.swipetab I/MaliEGL﹕ [Mali]max_allowed_dequeued_buffers=3
11-22 16:18:16.649 7460-7460/com.example.avinash.swipetab D/OpenGLRenderer﹕ Enabling debug mode 0
11-22 16:18:17.386 7460-7460/com.example.avinash.swipetab D/dalvikvm﹕ GC_FOR_ALLOC freed 173K, 5% free 6246K/6544K, paused 10ms, total 10ms
11-22 16:18:17.471 7460-7460/com.example.avinash.swipetab D/dalvikvm﹕ GC_FOR_ALLOC freed 32K, 5% free 6989K/7312K, paused 9ms, total 9ms
11-22 16:18:17.572 7460-7460/com.example.avinash.swipetab I/Choreographer﹕ Skipped 94 frames! The application may be doing too much work on its main thread.
11-22 16:18:21.307 7460-7460/com.example.avinash.swipetab D/dalvikvm﹕ GC_FOR_ALLOC freed 94K, 3% free 8280K/8500K, paused 12ms, total 12ms
11-22 16:18:21.451 7460-7460/com.example.avinash.swipetab D/AndroidRuntime﹕ Shutting down VM
11-22 16:18:21.451 7460-7460/com.example.avinash.swipetab W/dalvikvm﹕ threadid=1: thread exiting with uncaught exception (group=0x41541ba8)
11-22 16:18:21.467 7460-7460/com.example.avinash.swipetab E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: com.example.avinash.swipetab, PID: 7460
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.avinash.swipetab/com.example.avinash.swipetab.Filter}: java.lang.NullPointerException
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2184)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2233)
at android.app.ActivityThread.access$800(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5001)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException
at com.example.avinash.swipetab.Filter.onCreate(Filter.java:17)
at android.app.Activity.performCreate(Activity.java:5231)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2148)
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2233)
            at android.app.ActivityThread.access$800(ActivityThread.java:135)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
            at android.os.Handler.dispatchMessage(Handler.java:102)
            at android.os.Looper.loop(Looper.java:136)
            at android.app.ActivityThread.main(ActivityThread.java:5001)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:515)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
            at dalvik.system.NativeStart.main(Native Method)
Thanks in advance.

I can not run the application on the emulator genymotion using Android Studio

When I push "Run", will come out this:
Waiting for device.
Target device: genymotion-custom_phone_7___4_1_1___api_16___1024x600-192.168.48.101:5555
Uploading file
local path: C:\Users\п\Messenger\app\build\outputs\apk\app-debug.apk
remote path: /data/local/tmp/org.iWi.messenger
Installing org.iWi.messenger
DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/org.iWi.messenger"
pkg: /data/local/tmp/org.iWi.messenger
Failure [INSTALL_FAILED_UID_CHANGED]
Here he writes in the log:
10-03 16:15:10.090 3456-3456/? D/AndroidRuntime﹕ >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
10-03 16:15:10.090 3456-3456/? D/AndroidRuntime﹕ CheckJNI is OFF
10-03 16:15:10.090 3456-3456/? D/dalvikvm﹕ Unable to stat classpath element '/system/framework/filterfw.jar'
10-03 16:15:10.090 3456-3456/? D/dalvikvm﹕ Trying to load lib libjavacore.so 0x0
10-03 16:15:10.090 3456-3456/? D/dalvikvm﹕ Added shared lib libjavacore.so 0x0
10-03 16:15:10.090 3456-3456/? D/dalvikvm﹕ Trying to load lib libnativehelper.so 0x0
10-03 16:15:10.090 3456-3456/? D/dalvikvm﹕ Added shared lib libnativehelper.so 0x0
10-03 16:15:10.118 3456-3456/? D/AndroidRuntime﹕ Calling main entry com.android.commands.pm.Pm
10-03 16:15:10.138 298-364/system_process W/ActivityManager﹕ No content provider found for permission revoke: file:///data/local/tmp/org.iWi.messenger
10-03 16:15:10.138 298-364/system_process W/ActivityManager﹕ No content provider found for permission revoke: file:///data/local/tmp/org.iWi.messenger
10-03 16:15:10.186 298-301/system_process D/dalvikvm﹕ GC_CONCURRENT freed 1340K, 38% free 11740K/18823K, paused 11ms+1ms, total 21ms
10-03 16:15:10.610 298-301/system_process D/dalvikvm﹕ GC_CONCURRENT freed 1417K, 38% free 11760K/18823K, paused 12ms+54ms, total 402ms
10-03 16:15:10.610 298-364/system_process D/dalvikvm﹕ WAIT_FOR_CONCURRENT_GC blocked 268ms
10-03 16:15:10.798 298-301/system_process D/dalvikvm﹕ GC_CONCURRENT freed 1436K, 38% free 11765K/18823K, paused 16ms+1ms, total 139ms
10-03 16:15:10.798 298-364/system_process D/dalvikvm﹕ WAIT_FOR_CONCURRENT_GC blocked 64ms
10-03 16:15:10.818 298-364/system_process D/dalvikvm﹕ WAIT_FOR_CONCURRENT_GC blocked 0ms
10-03 16:15:10.818 298-364/system_process W/PackageManager﹕ Package couldn't be installed in /data/app/org.iWi.messenger-1.apk
10-03 16:15:10.834 298-364/system_process D/dalvikvm﹕ GC_EXPLICIT freed 522K, 38% free 11742K/18823K, paused 0ms+3ms, total 16ms
10-03 16:15:10.834 3456-3456/? D/AndroidRuntime﹕ Shutting down VM
10-03 16:15:10.834 3456-3460/? D/dalvikvm﹕ GC_CONCURRENT freed 122K, 78% free 461K/2048K, paused 0ms+0ms, total 1ms
10-03 16:15:10.834 3456-3462/? D/jdwp﹕ Got wake-up signal, bailing out of select
10-03 16:15:10.834 3456-3462/? D/dalvikvm﹕ Debugger has detached; object registry had 1 entries
10-03 16:15:10.834 3456-3466/? I/AndroidRuntime﹕ NOTE: attach of thread 'Binder_3' failed
Earlier at me everything worked, suddenly appeared a problem. For several days, I can not solve this problem.

Android: Strange Out of Memory Exception [closed]

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.
Closed 10 years ago.
i have a problem with a strange out of memory exception that only occurs on some devices (mostly HTC Desire). It happens there every time a user starts a certain activity (no matter how - there are two paths to that activity) and i'm really puzzled as to why (i checked for leaks and couldn't find any)...
The error is either thrown when calling setContentView or shortly after.
This is the code block that throws the error:
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if(DebugFlags.LOG_MEMORY)
{
MemoryAnalyser.logHeap(this.getClass());
}
setContentView(R.layout.activity_stats);
try
{
monthsAvailable = getMonthTimeStamps();
Spinner xSpin = (Spinner) findViewById(R.id.spinnerTimespan);
m_adapterForSpinner = new ArrayAdapter<CharSequence>(this, android.R.layout.simple_spinner_item);
m_adapterForSpinner.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
xSpin.setAdapter(m_adapterForSpinner);
for(Iterator<monthObject> i = monthsAvailable.iterator();i.hasNext();)
{
monthObject xObj = i.next();
String dateString = String.format("%1$te.%1$tm.%1$tY - %2$te.%2$tm.%2$tY", xObj.fromDate, xObj.toDate);
m_adapterForSpinner.add(dateString);
}
xSpin.setSelection(xSpin.getCount()-1);
xSpin.setOnItemSelectedListener(this);
//setupStatData(null, null);
checkStatsAvailable();
//throw(new java.lang.OutOfMemoryError());
}
catch(java.lang.OutOfMemoryError e)
{
MemoryAnalyser.dumpHeap();
MemoryAnalyser.logHeap(this.getClass());
Toast xToast = Toast.makeText(getApplicationContext(), "OutOfMemoryException - bitte Log und Datei com.eventkontor.networkcheck.hprof auf SD-Karte an Entwickler senden", 5000);
xToast.show();
this.finish();
}
if(DebugFlags.LOG_MEMORY)
{
MemoryAnalyser.logHeap(this.getClass());
}
}
as i said - the error is usually thrown when calling setContentView or when calling getMonthTimeStamps()
getMonthTimeStamps is a helper function which creates a list of dates available in the internal database. It creates a couple of (small objects) and returns an ArrayList. Here is the function
private ArrayList<monthObject> getMonthTimeStamps()
{
ArrayList<monthObject> dates = new ArrayList<monthObject>();
Cursor c = getContentResolver().query(CallLogTableMetaData.CONTENT_URI, new String[]{CallLogTableMetaData.CALLOG_DATE}, null, null, CallLogTableMetaData._ID + " asc");
try{
if(c.moveToFirst())
{
SharedPreferences prefs = Utils.getPreferences(this);
int resetDay = prefs.getInt("pref_callog_reset_day", 1);
prefs = null;
long starttime = c.getLong(0);
c.close();
c=null;
Date startDate = new Date(starttime);
GregorianCalendar today = new GregorianCalendar();
GregorianCalendar xCal = new GregorianCalendar();
xCal.setTime(startDate);
xCal.set(GregorianCalendar.DAY_OF_MONTH, resetDay);
while(xCal.before(today))
{
monthObject xObj = new monthObject();
xObj.setTimestamp(xCal.getTimeInMillis());
xObj.setFromDate(xCal.getTime());
xCal.add(GregorianCalendar.MONTH, 1);
xCal.set(GregorianCalendar.DAY_OF_MONTH, resetDay);
xCal.set(Calendar.HOUR_OF_DAY, 0);
xCal.set(Calendar.MINUTE, 0);
xCal.set(Calendar.SECOND, 0);
xCal.set(Calendar.MILLISECOND, 0);
xObj.setToDate(xCal.getTime());
xObj.setToTimestamp(xCal.getTimeInMillis());
dates.add(xObj);
xObj = null;
}
xCal = null;
today = null;
return dates;
}
else
{
return dates;
}
}
finally{
try
{
c.close();
}
catch(Exception e)
{
}
}
}
I'm not claiming that my code is flawless or perfect, but i really don't understand why this error is thrown. The XML-layout doesn't contain any references to images and not very complicated (textview, spinner, tablelayout).
Here is the error log i received from one user:
I/ActivityManager(16789): Starting activity: Intent { cmp=com.eventkontor.networkcheck/.StatActivity }
D/dalvikvm( 5053): GC freed 8267 objects / 556152 bytes in 45ms
D/dalvikvm( 5053): GC freed 1716 objects / 371240 bytes in 45ms
D/dalvikvm( 5053): GC freed 15 objects / 62936 bytes in 56ms
D/dalvikvm( 5053): GC freed 4 objects / 233856 bytes in 77ms
D/dalvikvm( 5053): GC freed 14 objects / 544 bytes in 83ms
W/ActivityManager(16789): Launch timeout has expired, giving up wake lock!
W/ActivityManager(16789): Activity idle timeout for HistoryRecord{46a4b878 com.eventkontor.networkcheck/.StatActivity}
D/dalvikvm( 5053): GC freed 3 objects / 210456 bytes in 107ms
D/dalvikvm( 5053): GC freed 3 objects / 315656 bytes in 118ms
D/dalvikvm( 5210): GC freed 7752 objects / 904320 bytes in 1116ms
D/dalvikvm( 5053): GC freed 2 objects / 48 bytes in 136ms
D/dalvikvm( 5053): GC freed 3 objects / 473448 bytes in 155ms
D/dalvikvm( 641): GC freed 4397 objects / 781024 bytes in 1246ms
D/dalvikvm( 5053): GC freed 2 objects / 48 bytes in 175ms
D/dalvikvm( 5053): GC freed 2 objects / 56 bytes in 203ms
I/dalvikvm-heap( 5053): Clamp target GC heap from 24.522MB to 24.000MB
D/dalvikvm( 5053): GC freed 3 objects / 710120 bytes in 207ms
I/dalvikvm-heap( 5053): Clamp target GC heap from 26.012MB to 24.000MB
D/dalvikvm( 5053): GC freed 2 objects / 56 bytes in 220ms
I/dalvikvm-heap( 5053): Clamp target GC heap from 24.012MB to 24.000MB
I/dalvikvm-heap( 5053): Grow heap (frag case) to 24.000MB for 16-byte allocation
I/dalvikvm-heap( 5053): Clamp target GC heap from 26.012MB to 24.000MB
D/dalvikvm( 5053): GC freed 0 objects / 0 bytes in 238ms
I/dalvikvm-heap( 5053): Forcing collection of SoftReferences for 24-byte allocation
I/dalvikvm-heap( 5053): Clamp target GC heap from 26.012MB to 24.000MB
D/dalvikvm( 5053): GC freed 0 objects / 0 bytes in 220ms
E/dalvikvm-heap( 5053): Out of memory on a 24-byte allocation.
I/dalvikvm( 5053): "HeapWorker" daemon prio=5 tid=5 RUNNABLE
I/dalvikvm( 5053): | group="system" sCount=0 dsCount=0 s=N obj=0x44e0eab8 self=0x14a298
I/dalvikvm( 5053): | sysTid=5054 nice=0 sched=0/0 cgrp=default handle=1351480
I/dalvikvm( 5053): at com.android.internal.os.BinderInternal$GcWatcher.finalize(BinderInternal.java:~48)
I/dalvikvm( 5053): at dalvik.system.NativeStart.run(Native Method)
I/dalvikvm( 5053):
E/dalvikvm( 5053): Out of memory: Heap Size=22791KB, Allocated=22204KB, Bitmap Size=1806KB
I/dalvikvm-heap( 5053): Clamp target GC heap from 26.012MB to 24.000MB
D/dalvikvm( 5053): GC freed 0 objects / 0 bytes in 291ms
I/dalvikvm-heap( 5053): Forcing collection of SoftReferences for 40-byte allocation
I/dalvikvm-heap( 5053): Clamp target GC heap from 26.012MB to 24.000MB
D/dalvikvm( 5053): GC freed 0 objects / 0 bytes in 220ms
E/dalvikvm-heap( 5053): Out of memory on a 40-byte allocation.
I/dalvikvm( 5053): "main" prio=5 tid=3 RUNNABLE
I/dalvikvm( 5053): | group="main" sCount=0 dsCount=0 s=N obj=0x4001b470 self=0xbdd0
I/dalvikvm( 5053): | sysTid=5053 nice=0 sched=0/0 cgrp=default handle=-1343993180
I/dalvikvm( 5053): at com.eventkontor.networkcheck.StatActivity.getMonthTimeStamps(StatActivity.java:~270)
I/dalvikvm( 5053): at com.eventkontor.networkcheck.StatActivity.onCreate(StatActivity.java:119)
I/dalvikvm( 5053): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
I/dalvikvm( 5053): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2544)
I/dalvikvm( 5053): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2621)
I/dalvikvm( 5053): at android.app.ActivityThread.access$2200(ActivityThread.java:126)
I/dalvikvm( 5053): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1932)
I/dalvikvm( 5053): at android.os.Handler.dispatchMessage(Handler.java:99)
I/dalvikvm( 5053): at android.os.Looper.loop(Looper.java:123)
I/dalvikvm( 5053): at android.app.ActivityThread.main(ActivityThread.java:4595)
I/dalvikvm( 5053): at java.lang.reflect.Method.invokeNative(Native Method)
I/dalvikvm( 5053): at java.lang.reflect.Method.invoke(Method.java:521)
I/dalvikvm( 5053): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
I/dalvikvm( 5053): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
I/dalvikvm( 5053): at dalvik.system.NativeStart.main(Native Method)
I/dalvikvm( 5053):
E/dalvikvm( 5053): Out of memory: Heap Size=22791KB, Allocated=22204KB, Bitmap Size=1806KB
I/dalvikvm-heap( 5053): Clamp target GC heap from 26.012MB to 24.000MB
D/dalvikvm( 5053): GC freed 0 objects / 0 bytes in 231ms
I/dalvikvm-heap( 5053): Forcing collection of SoftReferences for 24-byte allocation
I/dalvikvm-heap( 5053): Clamp target GC heap from 26.012MB to 24.000MB
D/dalvikvm( 5053): GC freed 0 objects / 0 bytes in 220ms
E/dalvikvm-heap( 5053): Out of memory on a 24-byte allocation.
I/dalvikvm( 5053): "HeapWorker" daemon prio=5 tid=5 RUNNABLE
I/dalvikvm( 5053): | group="system" sCount=0 dsCount=0 s=N obj=0x44e0eab8 self=0x14a298
I/dalvikvm( 5053): | sysTid=5054 nice=0 sched=0/0 cgrp=default handle=1351480
I/dalvikvm( 5053): at com.android.internal.os.BinderInternal$GcWatcher.finalize(BinderInternal.java:~48)
I/dalvikvm( 5053): at dalvik.system.NativeStart.run(Native Method)
I/dalvikvm( 5053):
E/dalvikvm( 5053): Out of memory: Heap Size=22791KB, Allocated=22204KB, Bitmap Size=1806KB
I/dalvikvm-heap( 5053): Clamp target GC heap from 26.012MB to 24.000MB
I/dalvikvm( 5053): Uncaught exception thrown by finalizer (will be discarded):
I/dalvikvm( 5053): Ljava/lang/OutOfMemoryError;: [memory exhausted]
I/dalvikvm( 5053): at dalvik.system.NativeStart.main(Native Method)
D/dalvikvm( 5053): GC freed 0 objects / 0 bytes in 237ms
I/dalvikvm-heap( 5053): Forcing collection of SoftReferences for 24-byte allocation
I/dalvikvm-heap( 5053): Clamp target GC heap from 26.012MB to 24.000MB
D/dalvikvm( 5053): GC freed 1 objects / 16 bytes in 220ms
E/dalvikvm-heap( 5053): Out of memory on a 24-byte allocation.
I/dalvikvm( 5053): "main" prio=5 tid=3 RUNNABLE
I/dalvikvm( 5053): | group="main" sCount=0 dsCount=0 s=N obj=0x4001b470 self=0xbdd0
I/dalvikvm( 5053): | sysTid=5053 nice=0 sched=0/0 cgrp=default handle=-1343993180
I/dalvikvm( 5053): at com.eventkontor.networkcheck.StatActivity.getMonthTimeStamps(StatActivity.java:~270)
I/dalvikvm( 5053): at com.eventkontor.networkcheck.StatActivity.onCreate(StatActivity.java:119)
I/dalvikvm( 5053): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
I/dalvikvm( 5053): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2544)
I/dalvikvm( 5053): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2621)
I/dalvikvm( 5053): at android.app.ActivityThread.access$2200(ActivityThread.java:126)
I/dalvikvm( 5053): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1932)
I/dalvikvm( 5053): at android.os.Handler.dispatchMessage(Handler.java:99)
I/dalvikvm( 5053): at android.os.Looper.loop(Looper.java:123)
I/dalvikvm( 5053): at android.app.ActivityThread.main(ActivityThread.java:4595)
I/dalvikvm( 5053): at java.lang.reflect.Method.invokeNative(Native Method)
I/dalvikvm( 5053): at java.lang.reflect.Method.invoke(Method.java:521)
I/dalvikvm( 5053): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
I/dalvikvm( 5053): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
I/dalvikvm( 5053): at dalvik.system.NativeStart.main(Native Method)
I/dalvikvm( 5053):
E/dalvikvm( 5053): Out of memory: Heap Size=22791KB, Allocated=22204KB, Bitmap Size=1806KB
I/dalvikvm-heap( 5053): Clamp target GC heap from 26.011MB to 24.000MB
D/dalvikvm( 5053): GC freed 11 objects / 728 bytes in 221ms
I/dalvikvm-heap( 5053): Clamp target GC heap from 24.011MB to 24.000MB
I/dalvikvm-heap( 5053): Grow heap (frag case) to 24.000MB for 24-byte allocation
I/dalvikvm-heap( 5053): Clamp target GC heap from 26.011MB to 24.000MB
D/dalvikvm( 5053): GC freed 0 objects / 0 bytes in 221ms
I/dalvikvm-heap( 5053): Clamp target GC heap from 24.011MB to 24.000MB
I/dalvikvm-heap( 5053): Grow heap (frag case) to 24.000MB for 136-byte allocation
I/dalvikvm-heap( 5053): Clamp target GC heap from 26.011MB to 24.000MB
D/dalvikvm( 5053): GC freed 0 objects / 0 bytes in 219ms
I/dalvikvm-heap( 5053): Clamp target GC heap from 24.011MB to 24.000MB
I/dalvikvm-heap( 5053): Grow heap (frag case) to 24.000MB for 24-byte allocation
I/dalvikvm-heap( 5053): Clamp target GC heap from 26.011MB to 24.000MB
D/dalvikvm( 5053): GC freed 0 objects / 0 bytes in 220ms
I/dalvikvm-heap( 5053): Clamp target GC heap from 24.011MB to 24.000MB
I/dalvikvm-heap( 5053): Grow heap (frag case) to 24.000MB for 54-byte allocation
I/dalvikvm-heap( 5053): Clamp target GC heap from 26.011MB to 24.000MB
D/dalvikvm( 5053): GC freed 4 objects / 272 bytes in 221ms
I/dalvikvm-heap( 5053): Clamp target GC heap from 24.011MB to 24.000MB
I/dalvikvm-heap( 5053): Grow heap (frag case) to 24.000MB for 24-byte allocation
I/dalvikvm-heap( 5053): Clamp target GC heap from 26.011MB to 24.000MB
D/dalvikvm( 5053): GC freed 0 objects / 0 bytes in 240ms
I/dalvikvm-heap( 5053): Clamp target GC heap from 24.011MB to 24.000MB
I/dalvikvm-heap( 5053): Grow heap (frag case) to 24.000MB for 68-byte allocation
D/dalvikvm( 5053): GC freed 589340 objects / 19930400 bytes in 180ms
I/dalvikvm( 5053): hprof: dumping VM heap to "/sdcard/com.eventkontor.networkcheck.hprof-hptemp".
I/dalvikvm( 5053): hprof: dumping heap strings to "/sdcard/com.eventkontor.networkcheck.hprof".
I/dalvikvm( 5053): hprof: heap dump completed, temp file removed
D/dalvikvm( 5053): GC freed 8 objects / 616 bytes in 1056ms
D/NetworkCheck( 5053): debug. =================================
D/NetworkCheck( 5053): debug.heap native: allocated 5,81MB of 6,94MB (0,61MB free) in [com.eventkontor.networkcheck.StatActivity]
D/NetworkCheck( 5053): debug.memory: allocated: 22,00MB of 24,00MB (19,00MB free)
D/dalvikvm( 5053): GC freed 148 objects / 7608 bytes in 34ms
D/dalvikvm( 5053): GC freed 5 objects / 264 bytes in 33ms
E/dalvikvm-heap( 5053): 32980-byte external allocation too large for this process.
E/dalvikvm( 5053): Out of memory: Heap Size=22791KB, Allocated=2743KB, Bitmap Size=1806KB
E/ ( 5053): VM won't let us allocate 32980 bytes
D/skia ( 5053): --- decoder->decode returned false
D/AndroidRuntime( 5053): Shutting down VM
W/dalvikvm( 5053): threadid=3: thread exiting with uncaught exception (group=0x4001b390)
D/UNHANDLED_EXCEPTION( 5053): Writing unhandled exception to: /data/data/com.eventkontor.networkcheck/files/1.5-55980.stacktrace
I/global ( 5053): Default buffer size used in BufferedWriter constructor. It would be better to be explicit if an 8k-char buffer is required.
D/UNHANDLED_EXCEPTION( 5053): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.eventkontor.networkcheck/com.eventkontor.networkcheck.StatActivity}: android.view.InflateException: Binary XML file line #21: Error inflating class <unknown>
D/UNHANDLED_EXCEPTION( 5053): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2596)
D/UNHANDLED_EXCEPTION( 5053): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2621)
D/UNHANDLED_EXCEPTION( 5053): at android.app.ActivityThread.access$2200(ActivityThread.java:126)
D/UNHANDLED_EXCEPTION( 5053): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1932)
D/UNHANDLED_EXCEPTION( 5053): at android.os.Handler.dispatchMessage(Handler.java:99)
D/UNHANDLED_EXCEPTION( 5053): at android.os.Looper.loop(Looper.java:123)
D/UNHANDLED_EXCEPTION( 5053): at android.app.ActivityThread.main(ActivityThread.java:4595)
D/UNHANDLED_EXCEPTION( 5053): at java.lang.reflect.Method.invokeNative(Native Method)
D/UNHANDLED_EXCEPTION( 5053): at java.lang.reflect.Method.invoke(Method.java:521)
D/UNHANDLED_EXCEPTION( 5053): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
D/UNHANDLED_EXCEPTION( 5053): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
D/UNHANDLED_EXCEPTION( 5053): at dalvik.system.NativeStart.main(Native Method)
D/UNHANDLED_EXCEPTION( 5053): Caused by: android.view.InflateException: Binary XML file line #21: Error inflating class <unknown>
D/UNHANDLED_EXCEPTION( 5053): at android.view.LayoutInflater.createView(LayoutInflater.java:513)
D/UNHANDLED_EXCEPTION( 5053): at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
D/UNHANDLED_EXCEPTION( 5053): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:563)
D/UNHANDLED_EXCEPTION( 5053): at android.view.LayoutInflater.inflate(LayoutInflater.java:385)
D/UNHANDLED_EXCEPTION( 5053): at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
D/UNHANDLED_EXCEPTION( 5053): at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
D/UNHANDLED_EXCEPTION( 5053): at android.widget.Toast.makeText(Toast.java:235)
D/UNHANDLED_EXCEPTION( 5053): at com.eventkontor.networkcheck.StatActivity.onCreate(StatActivity.java:140)
D/UNHANDLED_EXCEPTION( 5053): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
D/UNHANDLED_EXCEPTION( 5053): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2544)
D/UNHANDLED_EXCEPTION( 5053): ... 11 more
D/UNHANDLED_EXCEPTION( 5053): Caused by: java.lang.reflect.InvocationTargetException
D/UNHANDLED_EXCEPTION( 5053): at android.widget.LinearLayout.<init>(LinearLayout.java:92)
D/UNHANDLED_EXCEPTION( 5053): at java.lang.reflect.Constructor.constructNative(Native Method)
D/UNHANDLED_EXCEPTION( 5053): at java.lang.reflect.Constructor.newInstance(Constructor.java:446)
D/UNHANDLED_EXCEPTION( 5053): at android.view.LayoutInflater.createView(LayoutInflater.java:500)
D/UNHANDLED_EXCEPTION( 5053): ... 20 more
D/UNHANDLED_EXCEPTION( 5053): Caused by: java.lang.OutOfMemoryError: bitmap size exceeds VM budget
D/UNHANDLED_EXCEPTION( 5053): at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
D/UNHANDLED_EXCEPTION( 5053): at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:464)
D/UNHANDLED_EXCEPTION( 5053): at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:340)
D/UNHANDLED_EXCEPTION( 5053): at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:697)
D/UNHANDLED_EXCEPTION( 5053): at android.content.res.Resources.loadDrawable(Resources.java:1705)
D/UNHANDLED_EXCEPTION( 5053): at android.content.res.TypedArray.getDrawable(TypedArray.java:548)
D/UNHANDLED_EXCEPTION( 5053): at android.view.View.<init>(View.java:1850)
D/UNHANDLED_EXCEPTION( 5053): at android.view.View.<init>(View.java:1799)
D/UNHANDLED_EXCEPTION( 5053): at android.view.ViewGroup.<init>(ViewGroup.java:296)
D/UNHANDLED_EXCEPTION( 5053): ... 24 more
Thanks
Andreas
It was an infinite loop caused by GregorianCalendar not incrementing the date. Still investigating the issue, but this one has been resolved.
Just reading the stacktrace you problem seems to be of you trying to load some bitmap. That is stated as a root cause Are you loading bunch of images? That exception prevents inflating of your layout. You need ether cache or reduce size of your images.
Look and debug through these
D/UNHANDLED_EXCEPTION( 5053): Caused by: java.lang.OutOfMemoryError: bitmap size exceeds VM budget
D/UNHANDLED_EXCEPTION( 5053): at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
D/UNHANDLED_EXCEPTION( 5053): at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:464)
D/UNHANDLED_EXCEPTION( 5053): at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:340)
D/UNHANDLED_EXCEPTION( 5053): at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:697)
D/UNHANDLED_EXCEPTION( 5053): at android.content.res.Resources.loadDrawable(Resources.java:1705)
D/UNHANDLED_EXCEPTION( 5053): at android.content.res.TypedArray.getDrawable(TypedArray.java:548)
D/UNHANDLED_EXCEPTION( 5053): at android.view.View.<init>(View.java:1850)
D/UNHANDLED_EXCEPTION( 5053): at android.view.View.<init>(View.java:1799)
D/UNHANDLED_EXCEPTION( 5053): at android.view.ViewGroup.<init>(ViewGroup.java:296)
Have you looked at related questions? Here's a relevant SO search. A few of these point back to this answer on using the BitmapFactory class. This approach down-samples each of the images to reduce their impact on memory. Hope it helps.

Categories

Resources