user2854879
user2854879

Reputation: 41

Activity failed on start

My project is not jet debugged. Possibly, it has bugs, but I can not debug it while activity not starts. Please, help me to start debugging. Zipped Eclipse project you can find at http://f-bit.ru/249104

Message of AVD is as following:

"The application blucar (process medynets.dmytro) has stopped unexpectedly. Please try again."

LogCat:

10-07 21:14:20.584: E/AndroidRuntime(280): FATAL EXCEPTION: main
10-07 21:14:20.584: E/AndroidRuntime(280): java.lang.RuntimeException: Unable to        instantiate     activity ComponentInfo{medynets.dmytro/medynets.dmytro.BluCar}:        java.lang.ClassNotFoundException: medynets.dmytro.BluCar in loader   dalvik.system.PathClassLoader      [.]
10-07 21:14:20.584: E/AndroidRuntime(280):  at           android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2585)
10-07 21:14:20.584: E/AndroidRuntime(280):  at       android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
10-07 21:14:20.584: E/AndroidRuntime(280):  at android.app.ActivityThread.access      $2300(ActivityThread.java:125)
10-07 21:14:20.584: E/AndroidRuntime(280):  at android.app.ActivityThread $H.handleMessage  (ActivityThread.java:2033)
10-07 21:14:20.584: E/AndroidRuntime(280):  at android.os.Handler.dispatchMessage (Handler.java:99)
10-07 21:14:20.584: E/AndroidRuntime(280):  at android.os.Looper.loop(Looper.java:123)
10-07 21:14:20.584: E/AndroidRuntime(280):  at android.app.ActivityThread.main (ActivityThread.java:4627)
10-07 21:14:20.584: E/AndroidRuntime(280):  at java.lang.reflect.Method.invokeNative (Native Method)
10-07 21:14:20.584: E/AndroidRuntime(280):  at java.lang.reflect.Method.invoke (Method.java:521)
10-07 21:14:20.584: E/AndroidRuntime(280):  at com.android.internal.os.ZygoteInit $MethodAndArgsCaller.run(ZygoteInit.java:868)
10-07 21:14:20.584: E/AndroidRuntime(280):  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:626)
10-07 21:14:20.584: E/AndroidRuntime(280):  at dalvik.system.NativeStart.main(Native  Method)
10-07 21:14:20.584: E/AndroidRuntime(280): Caused by: java.lang.ClassNotFoundException:  medynets.dmytro.BluCar in loader dalvik.system.PathClassLoader[.]
10-07 21:14:20.584: E/AndroidRuntime(280):  at dalvik.system.PathClassLoader.findClass (PathClassLoader.java:243)
10-07 21:14:20.584: E/AndroidRuntime(280):  at java.lang.ClassLoader.loadClass (ClassLoader.java:573)
10-07 21:14:20.584: E/AndroidRuntime(280):  at java.lang.ClassLoader.loadClass (ClassLoader.java:532)
10-07 21:14:20.584: E/AndroidRuntime(280):  at android.app.Instrumentation.newActivity (Instrumentation.java:1021)
10-07 21:14:20.584: E/AndroidRuntime(280):  at  android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2577)
10-07 21:14:20.584: E/AndroidRuntime(280):  ... 11 more

Upvotes: 0

Views: 121

Answers (3)

Reinherd
Reinherd

Reputation: 5504

It's because you've set an Activity into the Manifest which actually doesnt exist. Please try to pay attention to the names of the activity and package names. Probably you've some typo error.

Edit:

OKAY I found the error:

Delete this from your manifest:

android:allowBackup="true"
android:allowTaskReparenting="true"
android:enabled="true"
android:hasCode="false
android:testOnly="false"

And then, app will still crash, but because you didn't add permissions about WAKE_LOCK.

 <uses-permission android:name="android.permission.WAKE_LOCK" />

Then app runs correctly!

Upvotes: 1

ivar ajet
ivar ajet

Reputation: 306

Your logcat says

java.lang.ClassNotFoundException: medynets.dmytro.BluCar in loader

Seems like you've added libraries but not imported correctly..

Please try adding libraries

Properties (on right of project) -> Java Build Path -> in Libraries Tab -> Add external JARS -> Choose you jar file..

Hope this helps....

Upvotes: 0

NOlivNeto
NOlivNeto

Reputation: 703

Are you using libs? This error usually occurs when the libraries are under /lib and not under /libs.

Upvotes: 0

Related Questions