fatal error - Android RunTimeError: Java.lang.RunTimeException: Unable to Instantiate activity -


i getting following error every time run android app on avd. app crashes instantly upon running it:

    08-24 02:18:01.629: e/androidruntime(1860): fatal exception: main 08-24 02:18:01.629: e/androidruntime(1860): java.lang.runtimeexception: unable instantiate activity componentinfo{com.zamani.randomizedworkout/com.zamani.randomizedworkout.mainscreen}: java.lang.classnotfoundexception: didn't find class "com.zamani.randomizedworkout.mainscreen" on path: dexpathlist[[zip file "/system/framework/android.test.runner.jar", zip file "/data/app/com.zamani.randomizedworkout-2.apk"],nativelibrarydirectories=[/data/app-lib/com.zamani.randomizedworkout-2, /system/lib]] 08-24 02:18:01.629: e/androidruntime(1860):     @ android.app.activitythread.performlaunchactivity(activitythread.java:2137) 08-24 02:18:01.629: e/androidruntime(1860):     @ android.app.activitythread.handlelaunchactivity(activitythread.java:2261) 08-24 02:18:01.629: e/androidruntime(1860):     @ android.app.activitythread.access$600(activitythread.java:141) 08-24 02:18:01.629: e/androidruntime(1860):     @ android.app.activitythread$h.handlemessage(activitythread.java:1256) 08-24 02:18:01.629: e/androidruntime(1860):     @ android.os.handler.dispatchmessage(handler.java:99) 08-24 02:18:01.629: e/androidruntime(1860):     @ android.os.looper.loop(looper.java:137) 08-24 02:18:01.629: e/androidruntime(1860):     @ android.app.activitythread.main(activitythread.java:5103) 08-24 02:18:01.629: e/androidruntime(1860):     @ java.lang.reflect.method.invokenative(native method) 08-24 02:18:01.629: e/androidruntime(1860):     @ java.lang.reflect.method.invoke(method.java:525) 08-24 02:18:01.629: e/androidruntime(1860):     @ com.android.internal.os.zygoteinit$methodandargscaller.run(zygoteinit.java:737) 08-24 02:18:01.629: e/androidruntime(1860):     @ com.android.internal.os.zygoteinit.main(zygoteinit.java:553) 08-24 02:18:01.629: e/androidruntime(1860):     @ dalvik.system.nativestart.main(native method) 08-24 02:18:01.629: e/androidruntime(1860): caused by: java.lang.classnotfoundexception: didn't find class "com.zamani.randomizedworkout.mainscreen" on path: dexpathlist[[zip file "/system/framework/android.test.runner.jar", zip file "/data/app/com.zamani.randomizedworkout-2.apk"],nativelibrarydirectories=[/data/app-lib/com.zamani.randomizedworkout-2, /system/lib]] 08-24 02:18:01.629: e/androidruntime(1860):     @ dalvik.system.basedexclassloader.findclass(basedexclassloader.java:53) 08-24 02:18:01.629: e/androidruntime(1860):     @ java.lang.classloader.loadclass(classloader.java:501) 08-24 02:18:01.629: e/androidruntime(1860):     @ java.lang.classloader.loadclass(classloader.java:461) 08-24 02:18:01.629: e/androidruntime(1860):     @ android.app.instrumentation.newactivity(instrumentation.java:1061) 08-24 02:18:01.629: e/androidruntime(1860):     @ android.app.activitythread.performlaunchactivity(activitythread.java:2128) 08-24 02:18:01.629: e/androidruntime(1860):     ... 11 more 

also, here androidmanifest:

    <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android"     package="com.zamani.randomizedworkout"     android:versioncode="1"     android:versionname="1.0" >      <uses-sdk         android:minsdkversion="8"         android:targetsdkversion="18" />      <instrumentation         android:name="android.test.instrumentationtestrunner"         android:targetpackage="com.zamani.randomizedworkout" />      <application>         android:allowbackup="true"         android:icon="@drawable/ic_launcher"         android:label="@string/app_name"         android:theme="@style/apptheme" >         <uses-library android:name="android.test.runner" />         <activity             android:name="com.zamani.randomizedworkout"             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="com.zamani.randomizedworkout.workoutscreen"             android:label="com.zamani.randomizedworkout.myactivitylib:string/app_name" >         </activity>     </application>  </manifest> 

some additional info regarding issue: have included both of activities in androidmanifest, shown above, unless missing i'm not sure that's issue having. app worked fine until upgraded sdk version 17 18 few days back, maybe part of problem. i've checked several other stackoverflow threads on similar issues, , didn't find solution solved problem. appreciated!

try this:

        <activity             android:name="com.zamani.randomizedworkout.mainscreen"             android:label="@string/app_name" >             <intent-filter>                 <action android:name="android.intent.action.main" />                  <category android:name="android.intent.category.launcher" />             </intent-filter>         </activity> 

Comments

Popular posts from this blog

java - Run a .jar on Heroku -

java - Jtable duplicate Rows -

validation - How to pass paramaters like unix into windows batch file -