I've completed and managed to install the app (i'm following a tutorial), but when running it on the emulator or real device, it gives me the error message, Unfortunately, has stopped.
Log cat
11-27 09:57:54.669: I/Process(1373): Sending signal. PID: 1373 SIG: 9
11-27 09:58:08.729: D/AndroidRuntime(1397): Shutting down VM
11-27 09:58:08.729: W/dalvikvm(1397): threadid=1: thread exiting with uncaught exception (group=0xb3aa4b90)
11-27 09:58:08.899: E/AndroidRuntime(1397): FATAL EXCEPTION: main
11-27 09:58:08.899: E/AndroidRuntime(1397): Process: com.davidgassner.plainolnotes, PID: 1397
11-27 09:58:08.899: E/AndroidRuntime(1397): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.davidgassner.plainolnotes/com.davidgassner.plainolnotes.Quick_Note_Taker} : java.lang.ClassNotFoundException: Didn't find class "com.davidgassner.plainolnotes.Quick_Note_Taker" on path: DexPathList[[zip file "/data/app/com.davidgassner.plainolnotes-2.apk"],nativeLibraryDirectories=[/data/app-lib/com.davidgassner.plainolnotes-2, /system/lib]]
11-27 09:58:08.899: E/AndroidRuntime(1397): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2102)
11-27 09:58:08.899: E/AndroidRuntime(1397): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2226)
11-27 09:58:08.899: E/AndroidRuntime(1397): at android.app.ActivityThread.access$700(ActivityThread.java:135)
11-27 09:58:08.899: E/AndroidRuntime(1397): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1397)
11-27 09:58:08.899: E/AndroidRuntime(1397): at android.os.Handler.dispatchMessage(Handler.java:102)
11-27 09:58:08.899: E/AndroidRuntime(1397): at android.os.Looper.loop(Looper.java:137)
11-27 09:58:08.899: E/AndroidRuntime(1397): at android.app.ActivityThread.main(ActivityThread.java:4998)
11-27 09:58:08.899: E/AndroidRuntime(1397): at java.lang.reflect.Method.invokeNative(Native Method)
11-27 09:58:08.899: E/AndroidRuntime(1397): at java.lang.reflect.Method.invoke(Method.java:515)
11-27 09:58:08.899: E/AndroidRuntime(1397): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:777)
11-27 09:58:08.899: E/AndroidRuntime(1397): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:593)
11-27 09:58:08.899: E/AndroidRuntime(1397): at dalvik.system.NativeStart.main(Native Method)
11-27 09:58:08.899: E/AndroidRuntime(1397): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.davidgassner.plainolnotes.Quick_Note_Taker" on path: DexPathList[[zip file "/data/app/com.davidgassner.plainolnotes-2.apk"],nativeLibraryDirectories=[/data/app-lib/com.davidgassner.plainolnotes-2, /system/lib]]
11-27 09:58:08.899: E/AndroidRuntime(1397): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
11-27 09:58:08.899: E/AndroidRuntime(1397): at java.lang.ClassLoader.loadClass(ClassLoader.java:497)
11-27 09:58:08.899: E/AndroidRuntime(1397): at java.lang.ClassLoader.loadClass(ClassLoader.java:457)
11-27 09:58:08.899: E/AndroidRuntime(1397): at android.app.Instrumentation.newActivity(Instrumentation.java:1061)
11-27 09:58:08.899: E/AndroidRuntime(1397): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2093)
11-27 09:58:08.899: E/AndroidRuntime(1397): ... 11 more
AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.davidgassner.plainolnotes"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="13"
android:targetSdkVersion="17" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label=" Quick Note Taker"
android:theme="#style/AppTheme" >
<activity
android:name="Quick_Note_Taker"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".NoteEditorActivity"/>
</application>
</manifest>
Could anyone help me figure out what the root of the problem is? If anything else is needed, tell me.
Thanks in advanced.
Your manifest (amongst other things) defines what Activites your app uses. One of those activities will be marked as the one to be started by the launcher. In this case it is:
<activity
android:name="Quick_Note_Taker"
So Android will attempt to instantiate an instance of Quick_Note_Taker.java. It will look for this class within the APK in a path equivalent to this one in your source code: src/com/davidgassner/plainolnotes/. Within Eclipse, that is the same as what is shown under the path ProjectName/src/com.davidgassner.plainolnotes/ in Package Explorer.
You say that you have no file named Quick_Note_Taker.java, hence this error. You do however have a file called MainActivity.java which is the default Activity class created for you when you create a new Android Application Project. When you created your project, you could/should have changed this to Quick_Note_Taker instead of MainActivity. But that's not a big deal.
You could replace MainActivity with a class file called Quick_Note_Taker instead. Or the easy (and perfectly valid) option is to change the activity name from Quick_Note_Taker to ActivityMain in the manifest.
Related
I am using Speech Recogniser in my app. If I am trying ok google and at the same time launching my app for speech recognition, then performing these steps repeatedly causing crash of google app. I am getting this an error dialog saying "Google has stopped" and log exception as :
FATAL EXCEPTION: LocalEngine0
11-27 17:33:21.801 E/AndroidRuntime( 4490): Process: com.google.android.googlequicksearchbox:search, PID: 4490
11-27 17:33:21.801 E/AndroidRuntime( 4490): java.lang.RuntimeException: Unchecked exception running task: ThreadChanger: a.a(w, b, c)
11-27 17:33:21.801 E/AndroidRuntime( 4490): at com.google.android.apps.gsa.shared.util.concurrent.a.ba.setException(SourceFile:20)
11-27 17:33:21.801 E/AndroidRuntime( 4490): at java.util.concurrent.FutureTask.run(FutureTask.java:242)
11-27 17:33:21.801 E/AndroidRuntime( 4490): at com.google.android.apps.gsa.shared.util.concurrent.a.ae.run(SourceFile:11)
11-27 17:33:21.801 E/AndroidRuntime( 4490): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
11-27 17:33:21.801 E/AndroidRuntime( 4490): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
11-27 17:33:21.801 E/AndroidRuntime( 4490): at java.lang.Thread.run(Thread.java:761)
11-27 17:33:21.801 E/AndroidRuntime( 4490): at com.google.android.apps.gsa.shared.util.concurrent.a.ak.run(SourceFile:6)
11-27 17:33:21.801 E/AndroidRuntime( 4490): Caused by: java.lang.IllegalStateException
11-27 17:33:21.801 E/AndroidRuntime( 4490): at com.google.common.base.Preconditions.checkState(SourceFile:33)
11-27 17:33:21.801 E/AndroidRuntime( 4490): at com.google.android.apps.gsa.speech.e.c.b.a(SourceFile:103)
11-27 17:33:21.801 E/AndroidRuntime( 4490): at com.google.android.apps.gsa.staticplugins.recognizer.c.a.a(SourceFile:31)
11-27 17:33:21.801 E/AndroidRuntime( 4490): at java.lang.reflect.Method.invoke(Native Method)
11-27 17:33:21.801 E/AndroidRuntime( 4490): at com.google.android.apps.gsa.shared.util.bn.run(SourceFile:9)
11-27 17:33:21.801 E/AndroidRuntime( 4490): at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:428)
11-27 17:33:21.801 E/AndroidRuntime( 4490): at java.util.concurrent.FutureTask.run(FutureTask.java:237)
11-27 17:33:21.801 E/AndroidRuntime( 4490): ... 5 more
11-27 17:33:21.805 W/ActivityManager( 3327): Force finishing activity com.google.android.googlequicksearchbox/com.google.android.apps.gsa.lockscreenentry.LockscreenEntryActivity
How can i overcome this error.
To prevent false positives, hotword detection is disabled when a spoken feedback service is enabled.
add android:accessibilityFeedbackType="feedbackAllMask"
configure the service using an XML file
<accessibility-service
android:accessibilityEventTypes="typeViewClicked|typeViewFocused"
android:packageNames="com.example.android.myFirstApp,com.example.android.mySecondApp"
android:accessibilityFeedbackType="feedbackAllMask"
android:notificationTimeout="100"
android:settingsActivity="com.example.android.apis.accessibility.TestBackActivity"
android:canRetrieveWindowContent="true"/>
You can also refer these link one,two
Hope it will to you!!
So, my game runs fine on several devices including Samsung Galaxy S4 and the NVIDIA Shield. But on Nexus 7 (and 5 have the symptoms on a colleague's device, but I haven't been able to confirm through the debugger).
The game consists of 14 shared native libraries plus main.so, all written in C++ and they all seem to load fine, except at least one of in house custom built libraries fails the symbol lookup when instantiating a class, but only when running on a Nexus.
One other symptom is that things seem to work fine if I inline the method that fails the symbol lookup in the header file (as opposed to being in the .cpp file). In this case, the failed symbol lookup just moved to other methods defined in the cpp file (I haven't tried moving everything into the header yet).
I have manually checked that the .so actually has the missing symbol, so I am sure the method is there. The missing symbol is in the libinput.so shown as loaded below.
I have pasted the last part of the log including callstack below. Any help would be greatly appreciated. I have looked around, and no questions I could find seemed to share exactly my symptoms..
... < cut out dynamic loads for other libraries similar to the below > ...
06-15 23:42:37.155: D/dalvikvm(11695): Trying to load lib /data/app-lib/com.kotoristudios.MULEReturns-1/libinput.so 0x41e1dd58
06-15 23:42:37.155: D/dalvikvm(11695): Added shared lib /data/app-lib/com.kotoristudios.MULEReturns-1/libinput.so 0x41e1dd58
06-15 23:42:37.155: D/dalvikvm(11695): No JNI_OnLoad found in /data/app-lib/com.kotoristudios.MULEReturns-1/libinput.so 0x41e1dd58, skipping init
... < cut out dynamic loads for other libraries similar to the above > ...
06-15 23:42:37.185: E/dalvikvm(11695): dlopen("/data/app-lib/com.kotoristudios.MULEReturns-1/libmain.so") failed: dlopen failed: cannot locate symbol "_ZN5Input12InputManager13ReceiveEventsERSt6vectorIPNS_5EventESaIS3_EE" referenced by "libmain.so"...
06-15 23:42:37.185: W/dalvikvm(11695): Exception Ljava/lang/UnsatisfiedLinkError; thrown while initializing Lcom/kotoristudios/MULEReturns/MULEReturnsActivity;
06-15 23:42:37.185: W/dalvikvm(11695): Class init failed in newInstance call (Lcom/kotoristudios/MULEReturns/MULEReturnsActivity;)
06-15 23:42:37.185: D/AndroidRuntime(11695): Shutting down VM
06-15 23:42:37.185: W/dalvikvm(11695): threadid=1: thread exiting with uncaught exception (group=0x4154bba8)
06-15 23:42:37.185: E/AndroidRuntime(11695): FATAL EXCEPTION: main
06-15 23:42:37.185: E/AndroidRuntime(11695): Process: com.kotoristudios.MULEReturns, PID: 11695
06-15 23:42:37.185: E/AndroidRuntime(11695): java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "_ZN5Input12InputManager13ReceiveEventsERSt6vectorIPNS_5EventESaIS3_EE" referenced by "libmain.so"...
06-15 23:42:37.185: E/AndroidRuntime(11695): at java.lang.Runtime.loadLibrary(Runtime.java:364)
06-15 23:42:37.185: E/AndroidRuntime(11695): at java.lang.System.loadLibrary(System.java:526)
06-15 23:42:37.185: E/AndroidRuntime(11695): at com.kotoristudios.MULEReturns.MULEReturnsActivity.(MULEReturnsActivity.java:28)
06-15 23:42:37.185: E/AndroidRuntime(11695): at java.lang.Class.newInstanceImpl(Native Method)
06-15 23:42:37.185: E/AndroidRuntime(11695): at java.lang.Class.newInstance(Class.java:1208)
06-15 23:42:37.185: E/AndroidRuntime(11695): at android.app.Instrumentation.newActivity(Instrumentation.java:1061)
06-15 23:42:37.185: E/AndroidRuntime(11695): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2112)
06-15 23:42:37.185: E/AndroidRuntime(11695): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
06-15 23:42:37.185: E/AndroidRuntime(11695): at android.app.ActivityThread.access$800(ActivityThread.java:135)
06-15 23:42:37.185: E/AndroidRuntime(11695): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
06-15 23:42:37.185: E/AndroidRuntime(11695): at android.os.Handler.dispatchMessage(Handler.java:102)
06-15 23:42:37.185: E/AndroidRuntime(11695): at android.os.Looper.loop(Looper.java:136)
06-15 23:42:37.185: E/AndroidRuntime(11695): at android.app.ActivityThread.main(ActivityThread.java:5017)
06-15 23:42:37.185: E/AndroidRuntime(11695): at java.lang.reflect.Method.invokeNative(Native Method)
06-15 23:42:37.185: E/AndroidRuntime(11695): at java.lang.reflect.Method.invoke(Method.java:515)
06-15 23:42:37.185: E/AndroidRuntime(11695): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
06-15 23:42:37.185: E/AndroidRuntime(11695): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
06-15 23:42:37.185: E/AndroidRuntime(11695): at dalvik.system.NativeStart.main(Native Method)
06-15 23:47:37.408: I/Process(11695): Sending signal. PID: 11695 SIG: 9
Im doing the following tutorial on creating an Android App using Google App Engine: https://cloud.google.com/developers/articles/how-to-build-mobile-app-with-app-engine-backend-tutorial
I am using Eclipse in Windows 7. I got to the part where you run the application to display the newly uploaded information from "places.csv". The problem is I'm getting the following error:
03-15 17:00:31.137: E/AndroidRuntime(1151): FATAL EXCEPTION: main
03-15 17:00:31.137: E/AndroidRuntime(1151): Process: com.apps.mobileassistant, PID: 1151
03-15 17:00:31.137: E/AndroidRuntime(1151): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.apps.mobileassistant/com.apps.mobileassistant.MainActivity}: java.lang.ClassNotFoundException: Didn't find class "com.apps.mobileassistant.MainActivity" on path: DexPathList[[zip file "/data/app/com.apps.mobileassistant-2.apk"],nativeLibraryDirectories=[/data/app-lib/com.apps.mobileassistant-2, /system/lib]]
03-15 17:00:31.137: E/AndroidRuntime(1151): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2102)
03-15 17:00:31.137: E/AndroidRuntime(1151): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2226)
03-15 17:00:31.137: E/AndroidRuntime(1151): at android.app.ActivityThread.access$700(ActivityThread.java:135)
03-15 17:00:31.137: E/AndroidRuntime(1151): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1397)
03-15 17:00:31.137: E/AndroidRuntime(1151): at android.os.Handler.dispatchMessage(Handler.java:102)
03-15 17:00:31.137: E/AndroidRuntime(1151): at android.os.Looper.loop(Looper.java:137)
03-15 17:00:31.137: E/AndroidRuntime(1151): at android.app.ActivityThread.main(ActivityThread.java:4998)
03-15 17:00:31.137: E/AndroidRuntime(1151): at java.lang.reflect.Method.invokeNative(Native Method)
03-15 17:00:31.137: E/AndroidRuntime(1151): at java.lang.reflect.Method.invoke(Method.java:515)
03-15 17:00:31.137: E/AndroidRuntime(1151): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:777)
03-15 17:00:31.137: E/AndroidRuntime(1151): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:593)
03-15 17:00:31.137: E/AndroidRuntime(1151): at dalvik.system.NativeStart.main(Native Method)
03-15 17:00:31.137: E/AndroidRuntime(1151): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.apps.mobileassistant.MainActivity" on path: DexPathList[[zip file "/data/app/com.apps.mobileassistant-2.apk"],nativeLibraryDirectories=[/data/app-lib/com.apps.mobileassistant-2, /system/lib]]
03-15 17:00:31.137: E/AndroidRuntime(1151): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
03-15 17:00:31.137: E/AndroidRuntime(1151): at java.lang.ClassLoader.loadClass(ClassLoader.java:497)
03-15 17:00:31.137: E/AndroidRuntime(1151): at java.lang.ClassLoader.loadClass(ClassLoader.java:457)
03-15 17:00:31.137: E/AndroidRuntime(1151): at android.app.Instrumentation.newActivity(Instrumentation.java:1061)
03-15 17:00:31.137: E/AndroidRuntime(1151): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2093)
MobileAssistant App Manifest.xml
<?xml version="1.0" encoding="utf-8" standalone="no"?><manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="com.apps.mobileassistant">
<uses-sdk android:minSdkVersion="10" android:targetSdkVersion="19"/>
<uses-permission android:name="android.permission.INTERNET"/>
<permission android:name="com.apps.mobileassistant.permission.C2D_MESSAGE" android:protectionLevel="signature"/>
<uses-permission android:name="com.apps.mobileassistant.permission.C2D_MESSAGE"/>
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE"/>
<uses-permission android:name="android.permission.WAKE_LOCK"/>
<uses-permission android:name="android.permission.GET_ACCOUNTS"/>
<uses-permission android:name="android.permission.USE_CREDENTIALS"/>
<application android:allowBackup="true" android:icon="#drawable/ic_launcher" android:label="#string/app_name" android:theme="#style/AppTheme">
<activity android:label="#string/app_name" android:name="com.apps.mobileassistant.MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<service android:name=".GCMIntentService"/>
<receiver android:name="com.google.android.gcm.GCMBroadcastReceiver" android:permission="com.google.android.c2dm.permission.SEND">
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE"/>
<category android:name="com.apps.mobileassistant"/>
</intent-filter>
<intent-filter>
<action android:name="com.google.android.c2dm.intent.REGISTRATION"/>
<category android:name="com.apps.mobileassistant"/>
</intent-filter>
</receiver>
<activity android:launchMode="singleTop" android:name=".RegisterActivity"/>
</application>
</manifest>
Also when in debug mode I get a "Source Not Found" error in Thread[<1> main].
Can someone help me with this?
Just as it is exactly what your current message error is saying to you:
ComponentInfo{com.apps.mobileassistant/com.apps.mobileassistant.MainActivity}:
java.lang.ClassNotFoundException:
Didn't find class "com.apps.mobileassistant.MainActivity"
on path: DexPathList[[zip file "/data/app/com.apps.mobileassistant-2.apk"],
nativeLibraryDirectories=[/data/app-lib/com.apps.mobileassistant-2
You either have made some mistake on setting up your project and required library, or simply has some class missing, or has not informed in your code the respective class through import and the class name.
I am building an app using Phonegap and Cordova. When I run the app in Eclipse emulator the apk gets installed successfully but after clicking on it I get an alert saying "Unfortunately AppName has Stopped" Any guidance or suggestion to solve this problem will be great, thanks.
Console:
[2013-11-13 12:18:47 - Challenger] Dx
trouble writing output: already prepared
[2013-11-13 12:18:48 - Challenger] ------------------------------
[2013-11-13 12:18:48 - Challenger] Android Launch!
[2013-11-13 12:18:48 - Challenger] adb is running normally.
[2013-11-13 12:18:48 - Challenger] Performing com.disciplinexgames.DisciplineXgames.Challenger activity launch
[2013-11-13 12:18:48 - Challenger] Automatic Target Mode: launching new emulator with compatible AVD 'testDevice'
[2013-11-13 12:18:48 - Challenger] Launching a new emulator with Virtual Device 'testDevice'
[2013-11-13 12:18:57 - Challenger] New emulator found: emulator-5554
[2013-11-13 12:18:57 - Challenger] Waiting for HOME ('android.process.acore') to be launched...
[2013-11-13 12:19:55 - Challenger] HOME is up on device 'emulator-5554'
[2013-11-13 12:19:55 - Challenger] Uploading Challenger.apk onto device 'emulator-5554'
[2013-11-13 12:20:09 - Challenger] Installing Challenger.apk...
[2013-11-13 12:21:33 - Challenger] Success!
[2013-11-13 12:21:33 - Challenger] Starting activity com.disciplinexgames.DisciplineXgames.Challenger on device emulator-5554
[2013-11-13 12:21:34 - Challenger] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.disciplinexgames.DisciplineXgames/.Challenger }
LogCat:
11-13 07:21:36.140: D/AndroidRuntime(837): Shutting down VM
11-13 07:21:36.140: W/dalvikvm(837): threadid=1: thread exiting with uncaught exception (group=0x41465700)
11-13 07:21:36.150: E/AndroidRuntime(837): FATAL EXCEPTION: main
11-13 07:21:36.150: E/AndroidRuntime(837): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.disciplinexgames.DisciplineXgames/com.disciplinexgames.DisciplineXgames.Challenger}: java.lang.ClassNotFoundException: Didn't find class "com.disciplinexgames.DisciplineXgames.Challenger" on path: DexPathList[[zip file "/data/app/com.disciplinexgames.DisciplineXgames-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.disciplinexgames.DisciplineXgames-1, /system/lib]]
11-13 07:21:36.150: E/AndroidRuntime(837): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2137)
11-13 07:21:36.150: E/AndroidRuntime(837): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2261)
11-13 07:21:36.150: E/AndroidRuntime(837): at android.app.ActivityThread.access$600(ActivityThread.java:141)
11-13 07:21:36.150: E/AndroidRuntime(837): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
11-13 07:21:36.150: E/AndroidRuntime(837): at android.os.Handler.dispatchMessage(Handler.java:99)
11-13 07:21:36.150: E/AndroidRuntime(837): at android.os.Looper.loop(Looper.java:137)
11-13 07:21:36.150: E/AndroidRuntime(837): at android.app.ActivityThread.main(ActivityThread.java:5103)
11-13 07:21:36.150: E/AndroidRuntime(837): at java.lang.reflect.Method.invokeNative(Native Method)
11-13 07:21:36.150: E/AndroidRuntime(837): at java.lang.reflect.Method.invoke(Method.java:525)
11-13 07:21:36.150: E/AndroidRuntime(837): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
11-13 07:21:36.150: E/AndroidRuntime(837): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
11-13 07:21:36.150: E/AndroidRuntime(837): at dalvik.system.NativeStart.main(Native Method)
11-13 07:21:36.150: E/AndroidRuntime(837): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.disciplinexgames.DisciplineXgames.Challenger" on path: DexPathList[[zip file "/data/app/com.disciplinexgames.DisciplineXgames-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.disciplinexgames.DisciplineXgames-1, /system/lib]]
11-13 07:21:36.150: E/AndroidRuntime(837): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:53)
11-13 07:21:36.150: E/AndroidRuntime(837): at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
11-13 07:21:36.150: E/AndroidRuntime(837): at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
11-13 07:21:36.150: E/AndroidRuntime(837): at android.app.Instrumentation.newActivity(Instrumentation.java:1061)
11-13 07:21:36.150: E/AndroidRuntime(837): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2128)
11-13 07:21:36.150: E/AndroidRuntime(837): ... 11 more
androidManifest.xml
<?xml version='1.0' encoding='utf-8'?>
<manifest android:hardwareAccelerated="true" android:versionCode="1" android:versionName="1.0.0" android:windowSoftInputMode="adjustPan" package="com.disciplinexgames.DisciplineXgames" xmlns:android="http://schemas.android.com/apk/res/android">
<supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:resizeable="true" android:smallScreens="true" android:xlargeScreens="true" />
<uses-permission android:name="android.permission.INTERNET" />
<application android:debuggable="true" android:hardwareAccelerated="true" android:icon="#drawable/icon" android:label="#string/app_name">
<activity android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale" android:label="#string/app_name" android:name="Challenger" android:theme="#android:style/Theme.Black.NoTitleBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="18" />
</manifest>
ClassNotFoundException. Your app is unable to find your class. check your all java files once. or post your manifest file.
Try going to Project -> Properties -> Java Build Path -> Order & Export and ensure Android Private Libraries are checked for your project and for all other library projects you are using. Clean all projects afterwards and see what happens.
Is it displaying the error when you click a button?
Try to avoid mixing upper- and lowercase-names in packagenames, it is destined for trouble. Especially if you are developing on a windows-machine.
So, instead of the package-name com.disciplinexgames.DisciplineXgames use com.disciplinexgames.disciplinexgames by renaming the package-directory and replacing the packagename in every file of your project.
FIXED
For some reason the special menu i created was killing it... THere was no API's or anything in that class. But thanks for the support guys
So this really isnt a question about a code but a very random error...
My app runs perfectly on my Nexus S rooted, but when it runs on any other phone or the emulator it will instantly FC.
The app does have root permissions but only if you choose to use it. Otherwise it is just a normal application.
Does anyone have a solution to why it would run on one device but not another?
-EDIT-
11-27 17:28:37.734: E/AndroidRuntime(7104): FATAL EXCEPTION: main
11-27 17:28:37.734: E/AndroidRuntime(7104): java.lang.VerifyError: com.SyndicateApps.OmegaLauncher.Launcher
11-27 17:28:37.734: E/AndroidRuntime(7104): at java.lang.Class.newInstanceImpl(Native Method)
11-27 17:28:37.734: E/AndroidRuntime(7104): at java.lang.Class.newInstance(Class.java:1429)
11-27 17:28:37.734: E/AndroidRuntime(7104): at android.app.Instrumentation.newActivity(Instrumentation.java:1056)
11-27 17:28:37.734: E/AndroidRuntime(7104): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2752)
11-27 17:28:37.734: E/AndroidRuntime(7104): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2859)
11-27 17:28:37.734: E/AndroidRuntime(7104): at android.app.ActivityThread.access$2300(ActivityThread.java:136)
11-27 17:28:37.734: E/AndroidRuntime(7104): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2179)
11-27 17:28:37.734: E/AndroidRuntime(7104): at android.os.Handler.dispatchMessage(Handler.java:99)
11-27 17:28:37.734: E/AndroidRuntime(7104): at android.os.Looper.loop(Looper.java:143)
11-27 17:28:37.734: E/AndroidRuntime(7104): at android.app.ActivityThread.main(ActivityThread.java:5073)
11-27 17:28:37.734: E/AndroidRuntime(7104): at java.lang.reflect.Method.invokeNative(Native Method)
11-27 17:28:37.734: E/AndroidRuntime(7104): at java.lang.reflect.Method.invoke(Method.java:521)
11-27 17:28:37.734: E/AndroidRuntime(7104): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:858)
11-27 17:28:37.734: E/AndroidRuntime(7104): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
11-27 17:28:37.734: E/AndroidRuntime(7104): at dalvik.system.NativeStart.main(Native Method)
EDIT 2 -
So its on 2.2 but same problem... Is there a way i can find the class using the api level 9?
LOGCAT 2 (on android 2.2)
EDIT 2 / SECOND LOGCAT ON 2.2 EMULATOR -
11-27 18:56:12.159: E/AndroidRuntime(258): FATAL EXCEPTION: main
11-27 18:56:12.159: E/AndroidRuntime(258): java.lang.VerifyError: com.SyndicateApps.OmegaLauncher.Launcher
11-27 18:56:12.159: E/AndroidRuntime(258): at java.lang.Class.newInstanceImpl(Native Method)
11-27 18:56:12.159: E/AndroidRuntime(258): at java.lang.Class.newInstance(Class.java:1429)
11-27 18:56:12.159: E/AndroidRuntime(258): at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
11-27 18:56:12.159: E/AndroidRuntime(258): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2577)
11-27 18:56:12.159: E/AndroidRuntime(258): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
11-27 18:56:12.159: E/AndroidRuntime(258): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
11-27 18:56:12.159: E/AndroidRuntime(258): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
11-27 18:56:12.159: E/AndroidRuntime(258): at android.os.Handler.dispatchMessage(Handler.java:99)
11-27 18:56:12.159: E/AndroidRuntime(258): at android.os.Looper.loop(Looper.java:123)
11-27 18:56:12.159: E/AndroidRuntime(258): at android.app.ActivityThread.main(ActivityThread.java:4627)
11-27 18:56:12.159: E/AndroidRuntime(258): at java.lang.reflect.Method.invokeNative(Native Method)
11-27 18:56:12.159: E/AndroidRuntime(258): at java.lang.reflect.Method.invoke(Method.java:521)
11-27 18:56:12.159: E/AndroidRuntime(258): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
11-27 18:56:12.159: E/AndroidRuntime(258): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
11-27 18:56:12.159: E/AndroidRuntime(258): at dalvik.system.NativeStart.main(Native Method)
A lot of the errors are when it comes to this... --> (new DialogInterface.OnShowListener()
java.lang.VerifyError typically means you're using a class or method that's not available on the current Java VM. Which Android version is on Nexus and which is on the other device? Android app manifest system allows for compiling against, say, API level 10 while allowing running against API level 6. There will be no warning against using backwards-incompatible classes until you run.
EDIT: So apparently the class com.SyndicateApps.OmegaLauncher.Launcher uses some API that was introduced in level 9. In the project properties, under "Android", set build target (temporarily) to Android 2.2 and see where the errors occur.
EDIT2: if the static analysis fails, try commenting out method insides in the class, method by method, until it loads. VerifyError is fairly easy to debug that way - it's triggered by very existence of faulty code in the class, not by its invokation. It's not like you have to do 100% coverage analysis.