Does anyone understand the syntax of this? [closed] - android-emulator

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
Closed 9 years ago.
05-18 03:36:42.250: E/Trace(3525): error opening trace file: No such file or directory (2)
05-18 03:36:42.640: D/AndroidRuntime(3525): Shutting down VM
05-18 03:36:42.640: W/dalvikvm(3525): threadid=1: thread exiting with uncaught exception (group=0x40a71930)
05-18 03:36:42.732: E/AndroidRuntime(3525): FATAL EXCEPTION: main
05-18 03:36:42.732: E/AndroidRuntime(3525): java.lang.RuntimeException: Unable to instantiate application android.app.Application: java.lang.NullPointerException
05-18 03:36:42.732: E/AndroidRuntime(3525): at android.app.LoadedApk.makeApplication(LoadedApk.java:504)
05-18 03:36:42.732: E/AndroidRuntime(3525): at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4364)
05-18 03:36:42.732: E/AndroidRuntime(3525): at android.app.ActivityThread.access$1300(ActivityThread.java:141)
05-18 03:36:42.732: E/AndroidRuntime(3525): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1294)
05-18 03:36:42.732: E/AndroidRuntime(3525): at android.os.Handler.dispatchMessage(Handler.java:99)
05-18 03:36:42.732: E/AndroidRuntime(3525): at android.os.Looper.loop(Looper.java:137)
05-18 03:36:42.732: E/AndroidRuntime(3525): at android.app.ActivityThread.main(ActivityThread.java:5041)
05-18 03:36:42.732: E/AndroidRuntime(3525): at java.lang.reflect.Method.invokeNative(Native Method)
05-18 03:36:42.732: E/AndroidRuntime(3525): at java.lang.reflect.Method.invoke(Method.java:511)
05-18 03:36:42.732: E/AndroidRuntime(3525): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
05-18 03:36:42.732: E/AndroidRuntime(3525): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
05-18 03:36:42.732: E/AndroidRuntime(3525): at dalvik.system.NativeStart.main(Native Method)
05-18 03:36:42.732: E/AndroidRuntime(3525): Caused by: java.lang.NullPointerException
05-18 03:36:42.732: E/AndroidRuntime(3525): at android.app.LoadedApk.initializeJavaContextClassLoader(LoadedApk.java:379)
05-18 03:36:42.732: E/AndroidRuntime(3525): at android.app.LoadedApk.getClassLoader(LoadedApk.java:322)
05-18 03:36:42.732: E/AndroidRuntime(3525): at android.app.LoadedApk.makeApplication(LoadedApk.java:496)
05-18 03:36:42.732: E/AndroidRuntime(3525): ... 11 more
05-18 03:36:56.010: D/gralloc_goldfish(3558): Emulator without GPU emulation detected.
05-18 03:47:25.183: I/Choreographer(3558): Skipped 45 frames! The application may be doing too much work on its main thread.
05-18 03:47:39.080: D/gralloc_goldfish(3613): Emulator without GPU emulation detected.
05-18 03:47:41.770: D/dalvikvm(3613): GC_CONCURRENT freed 84K, 7% free 2781K/2988K, paused 72ms+10ms, total 196ms
05-18 03:47:41.770: D/dalvikvm(3613): WAIT_FOR_CONCURRENT_GC blocked 55ms
05-18 03:47:45.579: D/dalvikvm(3613): GC_CONCURRENT freed 100K, 7% free 3083K/3300K, paused 5ms+20ms, total 226ms
05-18 03:47:53.329: I/Choreographer(3613): Skipped 111 frames! The application may be doing too much work on its main thread.
I know this is the second time I'm posting error messages, but please bear with me as I will eventually fully understand how to decipher these logs. But could someone help me understand why my log began with errors and then began to say that my emulation started to work?

What you've posted is a stack trace. It's a trace of what's happened most recently, and tracing back to what happened to get you there.
You need to read this in reverse. What happens at the top (the first line of what you posted) is what happened most recently.
Think of it like this:
I feel pain in my finger.
Just before that, my finger touched a hot burner.
Just before that, my hand stopped moving.
Just before that, my hand was moving down toward the burner.
Just before that, my hand was over the stove.
Just before that, my hand was just in front of the stove.
Just before that, my hand was near the stove.
Just before that, my hand was near my body.
Just before that, my hand was by my side.

Your problem has nothing to do with the fact that the emulator started running, your problem is this line:
Caused by: java.lang.NullPointerException at android.app.LoadedApk.initializeJavaContextClassLoader(LoadedApk.java:379)
This means that somewhere in your code (as the error states: on line 379 if LoadedApk is you class) you are trying to access something that wasn't created first or it's creation failed and those it holds Null instead of an actual value or an Object.

Related

Error during Android Execution on device

I am new to programming. Please bear with me. I tried developing spinner class on an existing activity with other views. However due to some error, the execution failed. I deleted all stuffs related to spinner class in
activitymain.java
main_activity.xml (in my case different name, this for easier
understanding)
and every other detail related to spinner view
Now, when I am trying to execute the activity with existing views, I am getting the following error. Still not getting a hint of what happened and how this can be resolved
So here's what the logcat is displaying
02-14 04:41:29.341 20105-20105/com.example.bharathduraiswamy.comboedittext E/AndroidRuntime﹕ FATAL EXCEPTION: main
java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.example.bharathduraiswamy.comboedittext/com.example.bharathduraiswamy.comboedittext.MainActivity}: java.lang.InstantiationException: can't instantiate class com.example.bharathduraiswamy.comboedittext.MainActivity
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2239)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2365)
at android.app.ActivityThread.access$600(ActivityThread.java:156)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:153)
at android.app.ActivityThread.main(ActivityThread.java:5336)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:833)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.InstantiationException: can't instantiate class com.example.bharathduraiswamy.comboedittext.MainActivity
at java.lang.Class.newInstanceImpl(Native Method)
at java.lang.Class.newInstance(Class.java:1319)
at android.app.Instrumentation.newActivity(Instrumentation.java:1054)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2230)
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2365)
            at android.app.ActivityThread.access$600(ActivityThread.java:156)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
            at android.os.Handler.dispatchMessage(Handler.java:99)
            at android.os.Looper.loop(Looper.java:153)
            at android.app.ActivityThread.main(ActivityThread.java:5336)
            at java.lang.reflect.Method.invokeNative(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:511)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:833)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
            at dalvik.system.NativeStart.main(Native Method)
Your activity lacks default (with no parameters) constructor or throws some exception in the constructor.
ok, i am good. Overcame the errors and got the reason behind the error. Defined mainactivity.java as abstract but abstract classes can't be instantiated.
I believe the abstract was created when trying to implement onItemSelectListener() and I failed to delete it when deleting everything related to spinner view
Regards

Porting Android App to BB10 OS (BlackBerry)

I am trying to port a native Android app to BB10 OS (BlackBerry). I was able to install the app but when I launch it, I see this error:
FATAL EXCEPTION: main
java.lang.RuntimeException: Unable to create application com.example.MyApplication: java.lang.SecurityException: Failed to open /dev/urandom for writing
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4454)
at android.app.ActivityThread.access$1300(ActivityThread.java:141)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1316)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5116)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:787)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.SecurityException: Failed to open /dev/urandom for writing
at o.dD$if.Ë‹(:279)
at o.dD$if.engineSetSeed(:215)
at java.security.SecureRandom.setSeed(SecureRandom.java:243)
at java.security.SecureRandom.setSeed(SecureRandom.java:258)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at o.ff$Õ™.<clinit>(Unknown Source)
at o.dA.ËŠ(:285)
at o.dA.<init>(:99)
at o.dA.ËŠ(:151)
at com.example.MyApplication.ͺ(:182)
at com.example.MyApplication.onCreate(:66)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1007)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4451)
... 10 more
Caused by: java.io.FileNotFoundException: /dev/urandom: open failed: EACCES (Permission denied)
at libcore.io.IoBridge.open(IoBridge.java:409)
at java.io.FileOutputStream.<init>(FileOutputStream.java:88)
at java.io.FileOutputStream.<init>(FileOutputStream.java:73)
at o.dD$if.Ë‹(:277)
... 23 more
Caused by: libcore.io.ErrnoException: open failed: EACCES (Permission denied)
at libcore.io.Posix.open(Native Method)
at libcore.io.BlockGuardOs.open(BlockGuardOs.java:110)
at libcore.io.IoBridge.open(IoBridge.java:393)
... 26 more
W/ActivityManager(6766745): Force finishing activity com.example.android.agent/com.example.agent.activities.LaunchActivity
E/OrientationUtil(6766745): Unable to read sensor data. errno 11
D/dalvikvm(20689057): GC_CONCURRENT freed 307K, 5% free 10097K/10576K, paused 1ms+1ms, total 48ms
Any insights into addressing this issue is highly appreciated.

Communication with jmdns.jar

I am using jmdns library to discover mDNS service advertise by other devices in network. I am using Android 4.2. I have downloaded demo application from jmdns official website and AndroidDnssdDiscoveryEclipse application is getting crashed at..
jmdns = JmDNS.create();
Here is the log..
07-25 18:15:57.343: W/dalvikvm(26977): threadid=1: thread exiting with uncaught exception (group=0x41526930)
07-25 18:16:11.703: D/dalvikvm(26977): Debugger has detached; object registry had 480 entries
07-25 18:16:11.703: I/dalvikvm(26977): ignoring registerObject request in thread=1
07-25 18:16:11.703: I/dalvikvm(26977): ignoring registerObject request in thread=1
07-25 18:16:11.726: E/AndroidRuntime(26977): FATAL EXCEPTION: main
07-25 18:16:11.726: E/AndroidRuntime(26977): java.lang.NoClassDefFoundError: javax.jmdns.JmDNS
07-25 18:16:11.726: E/AndroidRuntime(26977): at com.heeere.android.dnssdtuto.DnssdDiscovery.setUp(DnssdDiscovery.java:44)
07-25 18:16:11.726: E/AndroidRuntime(26977): at com.heeere.android.dnssdtuto.DnssdDiscovery.access$0(DnssdDiscovery.java:38)
07-25 18:16:11.726: E/AndroidRuntime(26977): at com.heeere.android.dnssdtuto.DnssdDiscovery$1.run(DnssdDiscovery.java:27)
07-25 18:16:11.726: E/AndroidRuntime(26977): at android.os.Handler.handleCallback(Handler.java:725)
07-25 18:16:11.726: E/AndroidRuntime(26977): at android.os.Handler.dispatchMessage(Handler.java:92)
07-25 18:16:11.726: E/AndroidRuntime(26977): at android.os.Looper.loop(Looper.java:137)
07-25 18:16:11.726: E/AndroidRuntime(26977): at android.app.ActivityThread.main(ActivityThread.java:5061)
07-25 18:16:11.726: E/AndroidRuntime(26977): at java.lang.reflect.Method.invokeNative(Native Method)
07-25 18:16:11.726: E/AndroidRuntime(26977): at java.lang.reflect.Method.invoke(Method.java:511)
07-25 18:16:11.726: E/AndroidRuntime(26977): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:833)
07-25 18:16:11.726: E/AndroidRuntime(26977): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
07-25 18:16:11.726: E/AndroidRuntime(26977): at dalvik.system.NativeStart.main(Native Method)
07-25 18:16:11.796: D/dalvikvm(26977): GC_CONCURRENT freed 237K, 13% free 2560K/2932K, paused 5ms+9ms, total 80ms
07-25 18:21:11.921: I/Process(26977): Sending signal. PID: 26977 SIG: 9
Here (jmdns.jar not working on android 4.0 or later), it is mentioned that jmdns.jar does not work with Android 4.0 or later but I have used ZeroConf Browser (uses jmdns) on my device and works perfectly.
While debugging application I have found that my application can not find jmdns.jar file. I have not done anything to jmdns.jar file accept I have removed original jmdns.jar file(1kb) from application directory and in place of it I have put jmdns.jar file(200kb) which comes along with download.
I had the same problem.
jmsdn-3.4.1.jar downloaded from SourceForge.net was compiled not for Dalvik vm (Android).
I solved dowloading source files from SourceForge.net and rebuild jmdns.jar to use with Android projets.

Issue : Trying to register my Emulator (Google cloud messaging)?

I have downloaded some Google cloud messaging sample application. If I run my example application. unfortunately, gcm-client-demo has stopped. I got this kind of problem.
I have sender id, app key and server url.
compulsory I need to sig-in for google account for my emulator. Right now my emulator not
sign-in
why i am facing this problem please explain me..
logcat:
02-28 14:48:03.189: D/AndroidRuntime(976): Shutting down VM
02-28 14:48:03.189: W/dalvikvm(976): threadid=1: thread exiting with uncaught exception (group=0x40a13300)
02-28 14:48:03.229: E/AndroidRuntime(976): FATAL EXCEPTION: main
02-28 14:48:03.229: E/AndroidRuntime(976): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.google.android.gcm.demo.app/com.google.android.gcm.demo.app.DemoActivity}: java.lang.UnsupportedOperationException: Device does not have package com.google.android.gsf
02-28 14:48:03.229: E/AndroidRuntime(976): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2059)
02-28 14:48:03.229: E/AndroidRuntime(976): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
02-28 14:48:03.229: E/AndroidRuntime(976): at android.app.ActivityThread.access$600(ActivityThread.java:130)
02-28 14:48:03.229: E/AndroidRuntime(976): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
02-28 14:48:03.229: E/AndroidRuntime(976): at android.os.Handler.dispatchMessage(Handler.java:99)
02-28 14:48:03.229: E/AndroidRuntime(976): at android.os.Looper.loop(Looper.java:137)
02-28 14:48:03.229: E/AndroidRuntime(976): at android.app.ActivityThread.main(ActivityThread.java:4745)
02-28 14:48:03.229: E/AndroidRuntime(976): at java.lang.reflect.Method.invokeNative(Native Method)
02-28 14:48:03.229: E/AndroidRuntime(976): at java.lang.reflect.Method.invoke(Method.java:511)
02-28 14:48:03.229: E/AndroidRuntime(976): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
02-28 14:48:03.229: E/AndroidRuntime(976): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
02-28 14:48:03.229: E/AndroidRuntime(976): at dalvik.system.NativeStart.main(Native Method)
02-28 14:48:03.229: E/AndroidRuntime(976): Caused by: java.lang.UnsupportedOperationException: Device does not have package com.google.android.gsf
02-28 14:48:03.229: E/AndroidRuntime(976): at com.google.android.gcm.GCMRegistrar.checkDevice(GCMRegistrar.java:98)
02-28 14:48:03.229: E/AndroidRuntime(976): at com.google.android.gcm.demo.app.DemoActivity.onCreate(DemoActivity.java:51)
02-28 14:48:03.229: E/AndroidRuntime(976): at android.app.Activity.performCreate(Activity.java:5008)
02-28 14:48:03.229: E/AndroidRuntime(976): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
02-28 14:48:03.229: E/AndroidRuntime(976): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2023)
02-28 14:48:03.229: E/AndroidRuntime(976): ... 11 more
02-28 14:48:03.260: W/ActivityManager(372): Force finishing activity com.google.android.gcm.demo.app/.DemoActivity
02-28 14:48:03.279: W/WindowManager(372): Failure taking screenshot for (343x201) to layer 21010
02-28 14:48:03.719: I/Choreographer(372): Skipped 39 frames! The application may be doing too much work on its main thread.
02-28 14:48:03.809: W/ActivityManager(372): Activity pause timeout for ActivityRecord{4125ba80 com.google.android.gcm.demo.app/.DemoActivity}
02-28 14:48:04.718: I/Choreographer(930): Skipped 95 frames! The application may be doing too much work on its main thread.
02-28 14:48:05.369: I/ARMAssembler(36): generated scanline__00000077:03515104_00008001_00000000 [113 ipp] (134 ins) at [0x41407610:0x41407828] in 8278218 ns
02-28 14:48:06.488: I/ActivityManager(372): No longer want com.android.contacts (pid 544): hidden #16
02-28 14:48:16.499: W/ActivityManager(372): Activity destroy timeout for ActivityRecord{4125ba80 com.google.android.gcm.demo.app/.DemoActivity}
02-28 14:52:21.518: D/dalvikvm(456): GC_CONCURRENT freed 397K, 9% free 6557K/7175K, paused 32ms+13ms, total 125ms
02-28 14:53:03.318: I/Process(976): Sending signal. PID: 976 SIG: 9
02-28 14:53:03.378: I/ActivityManager(372): Process com.google.android.gcm.demo.app (pid 976) has died.
02-28 14:53:03.428: W/InputMethodManagerService(372): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy#41317c60 attribute=null
02-28 14:53:17.979: E/ThrottleService(372): problem during onPollAlarm: java.lang.IllegalStateException: problem parsing stats: java.io.FileNotFoundException: /proc/net/xt_qtaguid/iface_stat_all: open failed: ENOENT (No such file or directory)
02-28 14:59:57.108: D/dalvikvm(456): GC_CONCURRENT freed 385K, 9% free 6555K/7175K, paused 17ms+9ms, total 98ms
It sounds as though your emulator does not have the Google API's installed, based on this error message:
Device does not have package com.google.android.gsf
You can read about the GCM client requirements in the Google GCM docs: http://developer.android.com/google/gcm/demo.html#requirements
The important part being this:
For the Android application:
Emulator (or device) running Android 2.2 with Google APIs.
The Google API project number of the account registered to use GCM.
So when you create your emulator make sure that the target has the Google API's installed. E.g.:
Google APIs (Google Inc.) - API Level 10

Android: Published App crashes with ClassNotFoundException

I have just published my first app today but for some reason when I use the published version I keep getting a ClassNotFoundException error when it starts up. It works fine when I test it in debug mode on my phone so I'm not sure whats causing this.
java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.androidProjects.personal/com.androidProjects.personal.GAAClubFinderActivity}: java.lang.ClassNotFoundException: com.androidProjects.personal.GAAClubFinderActivity
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2141)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2260)
at android.app.ActivityThread.access$600(ActivityThread.java:139)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1277)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:156)
at android.app.ActivityThread.main(ActivityThread.java:5045)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ClassNotFoundException: com.androidProjects.personal.GAAClubFinderActivity
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)
at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
at android.app.Instrumentation.newActivity(Instrumentation.java:1039)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2132)
... 11 more
Any Ideas?