Android Telegram Project Runtime Error - android

I have downloaded the Telegram project from the following repository (https://github.com/DrKLO/Telegram) and I have edited the BuildVars.java to put my APP_ID and APP_HASH, and also I have registered in hockeyapp.net to have get the HOCKEY_APP_HASH. And now, when I run the project it stops having an Exception. As I see, it says that "org.telegram.messenger.ApplicationLoader" is not found. But it is there in "java/org/telegram/messenger/" folder. Please help me to figure out this problem.
Log cat output:
02-07 20:26:36.204: D/AndroidRuntime(1089): Shutting down VM
02-07 20:26:36.257: E/AndroidRuntime(1089): FATAL EXCEPTION: main
02-07 20:26:36.257: E/AndroidRuntime(1089): Process: org.telegram.messenger, PID: 1089
02-07 20:26:36.257: E/AndroidRuntime(1089): java.lang.RuntimeException: Unable to instantiate application org.telegram.messenger.ApplicationLoader: java.lang.ClassNotFoundException: Didn't find class "org.telegram.messenger.ApplicationLoader" on path: DexPathList[[zip file "/data/app/org.telegram.messenger-1.apk"],nativeLibraryDirectories=[/data/app-lib/org.telegram.messenger-1, /vendor/lib, /system/lib]]
02-07 20:26:36.257: E/AndroidRuntime(1089): at android.app.LoadedApk.makeApplication(LoadedApk.java:517)
02-07 20:26:36.257: E/AndroidRuntime(1089): at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4370)
02-07 20:26:36.257: E/AndroidRuntime(1089): at android.app.ActivityThread.access$1500(ActivityThread.java:143)
02-07 20:26:36.257: E/AndroidRuntime(1089): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1317)
02-07 20:26:36.257: E/AndroidRuntime(1089): at android.os.Handler.dispatchMessage(Handler.java:102)
02-07 20:26:36.257: E/AndroidRuntime(1089): at android.os.Looper.loop(Looper.java:135)
02-07 20:26:36.257: E/AndroidRuntime(1089): at android.app.ActivityThread.main(ActivityThread.java:5070)
02-07 20:26:36.257: E/AndroidRuntime(1089): at java.lang.reflect.Method.invoke(Native Method)
02-07 20:26:36.257: E/AndroidRuntime(1089): at java.lang.reflect.Method.invoke(Method.java:372)
02-07 20:26:36.257: E/AndroidRuntime(1089): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:836)
02-07 20:26:36.257: E/AndroidRuntime(1089): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:631)
02-07 20:26:36.257: E/AndroidRuntime(1089): Caused by: java.lang.ClassNotFoundException: Didn't find class "org.telegram.messenger.ApplicationLoader" on path: DexPathList[[zip file "/data/app/org.telegram.messenger-1.apk"],nativeLibraryDirectories=[/data/app-lib/org.telegram.messenger-1, /vendor/lib, /system/lib]]
02-07 20:26:36.257: E/AndroidRuntime(1089): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
02-07 20:26:36.257: E/AndroidRuntime(1089): at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
02-07 20:26:36.257: E/AndroidRuntime(1089): at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
02-07 20:26:36.257: E/AndroidRuntime(1089): at android.app.Instrumentation.newApplication(Instrumentation.java:976)
02-07 20:26:36.257: E/AndroidRuntime(1089): at android.app.LoadedApk.makeApplication(LoadedApk.java:512)
02-07 20:26:36.257: E/AndroidRuntime(1089): ... 10 more
02-07 20:26:36.257: E/AndroidRuntime(1089): Suppressed: java.lang.ClassNotFoundException: org.telegram.messenger.ApplicationLoader
02-07 20:26:36.257: E/AndroidRuntime(1089): at java.lang.Class.classForName(Native Method)
02-07 20:26:36.257: E/AndroidRuntime(1089): at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
02-07 20:26:36.257: E/AndroidRuntime(1089): at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
02-07 20:26:36.257: E/AndroidRuntime(1089): at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
02-07 20:26:36.257: E/AndroidRuntime(1089): ... 13 more
02-07 20:26:36.257: E/AndroidRuntime(1089): Caused by: java.lang.NoClassDefFoundError: Class "Lorg/telegram/messenger/ApplicationLoader;" not found
02-07 20:26:36.257: E/AndroidRuntime(1089): ... 17 more
02-07 20:26:43.890: I/Process(1089): Sending signal. PID: 1089 SIG: 9

Just assign some 32 length string to HOCKEY_APP_HASH in BuildVars.java. I used all zeros and it works fine for now. I will try to update how to bypass using Hockey and update the answer.

Check Your Manifest file, try to replace ".ApplicationLoader" with "org.telegram.messenger.ApplicationLoader" and try to rebuild project. Maybe this helps You.

Related

app is died, Occur ClassNotFoundException on android

when I run my app, app died and occur classNotFoundException.
perhaps, gradle problem ?
compileSdkVersion =22
buildToolsVersion =21.1.2
minSdkVersion =19
targetSdkVersion =22
I think code problem.
settings, or gradle problem.
please advice for me.
logcat
FATAL EXCEPTION: main
Process: kr.co.iosystem.blackeyeonandroid, PID: 27947
java.lang.RuntimeException: Unable to instantiate application com.android.tools.fd.runtime.BootstrapApplication: java.lang.ClassNotFoundException: Didn't find class "com.android.tools.fd.runtime.BootstrapApplication" on path: DexPathList[[zip file "/data/app/kr.co.iosystem.blackeyeonandroid-1.apk"],nativeLibraryDirectories=[/data/app-lib/kr.co.iosystem.blackeyeonandroid-1, /system/lib, /system/lib/arm]]
at android.app.LoadedApk.makeApplication(LoadedApk.java:507)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4301)
at android.app.ActivityThread.access$1500(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
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.ClassNotFoundException: Didn't find class "com.android.tools.fd.runtime.BootstrapApplication" on path: DexPathList[[zip file "/data/app/kr.co.iosystem.blackeyeonandroid-1.apk"],nativeLibraryDirectories=[/data/app-lib/kr.co.iosystem.blackeyeonandroid-1, /system/lib, /system/lib/arm]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:497)
at java.lang.ClassLoader.loadClass(ClassLoader.java:457)
at android.app.Instrumentation.newApplication(Instrumentation.java:975)
at android.app.LoadedApk.makeApplication(LoadedApk.java:502)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4301) 
at android.app.ActivityThread.access$1500(ActivityThread.java:135) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256) 
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) 

Android Navigation Drawer with Page Sliding tab Strip

I'm trying to use Android Navigation Drawer with Page (Pager) Sliding tab Strip (https://github.com/Balaji-K13/Navigation-drawer-page-sliding-tab-strip), but i couldn't make it work. I'm using android studio. I made the imports in main project, and doesn't show any error, but when i run into a device (virtual or real) get this error:
05-22 10:38:20.200 1434-1434/com.webileapps.navdrawer E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: com.webileapps.navdrawer, PID: 1434
java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.webileapps.navdrawer/com.webileapps.navdrawer.MainActivity}: java.lang.ClassNotFoundException: Didn't find class "com.webileapps.navdrawer.MainActivity" on path: DexPathList[[zip file "/data/app/com.webileapps.navdrawer-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.webileapps.navdrawer-1, /system/lib]]
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2102)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2226)
at android.app.ActivityThread.access$700(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1397)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4998)
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:777)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:593)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.webileapps.navdrawer.MainActivity" on path: DexPathList[[zip file "/data/app/com.webileapps.navdrawer-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.webileapps.navdrawer-1, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:497)
at java.lang.ClassLoader.loadClass(ClassLoader.java:457)
at android.app.Instrumentation.newActivity(Instrumentation.java:1061)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2093)
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2226)
            at android.app.ActivityThread.access$700(ActivityThread.java:135)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1397)
            at android.os.Handler.dispatchMessage(Handler.java:102)
            at android.os.Looper.loop(Looper.java:137)
            at android.app.ActivityThread.main(ActivityThread.java:4998)
            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:777)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:593)
            at dalvik.system.NativeStart.main(Native Method)
So, thoughts?
I was also trying to implement it and got the same error .After lot of effort I was able to run it but received the similar error as you have received .
I resolved the issue by
1:Close and start your eclipse .
2: copying the v4 jar of main project in all the library projects and deleting the existing ones .
The error comes due to mismatch of supportv4jar. Make all the supportv4jar of same version
3:after that Delete the gen and bin folder and clean the project and run .

I tried to run a google map v2 in an android device.But receiving same errors all the time. I couldnt solve it. Can anyone help me? [duplicate]

This question already has answers here:
After Google Play Service update to version 13 I got an error
(8 answers)
Closed 9 years ago.
01-25 04:26:17.689: I/Process(1070): Sending signal. PID: 1070 SIG: 9
01-25 04:26:39.769: E/Trace(1089): error opening trace file: No such file or directory (2)
01-25 04:26:40.189: D/AndroidRuntime(1089): Shutting down VM
01-25 04:26:40.189: W/dalvikvm(1089): threadid=1: thread exiting with uncaught exception (group=0x40a71930)
01-25 04:26:40.215: E/AndroidRuntime(1089): FATAL EXCEPTION: main
01-25 04:26:40.215: E/AndroidRuntime(1089): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.Simple.lastmap/com.Simple.lastmap.MainActivity}: android.view.InflateException: Binary XML file line #1: Error inflating class fragment
01-25 04:26:40.215: E/AndroidRuntime(1089): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2180)
01-25 04:26:40.215: E/AndroidRuntime(1089): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
01-25 04:26:40.215: E/AndroidRuntime(1089): at android.app.ActivityThread.access$600(ActivityThread.java:141)
01-25 04:26:40.215: E/AndroidRuntime(1089): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
01-25 04:26:40.215: E/AndroidRuntime(1089): at android.os.Handler.dispatchMessage(Handler.java:99)
01-25 04:26:40.215: E/AndroidRuntime(1089): at android.os.Looper.loop(Looper.java:137)
01-25 04:26:40.215: E/AndroidRuntime(1089): at android.app.ActivityThread.main(ActivityThread.java:5041)
01-25 04:26:40.215: E/AndroidRuntime(1089): at java.lang.reflect.Method.invokeNative(Native Method)
01-25 04:26:40.215: E/AndroidRuntime(1089): at java.lang.reflect.Method.invoke(Method.java:511)
01-25 04:26:40.215: E/AndroidRuntime(1089): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
01-25 04:26:40.215: E/AndroidRuntime(1089): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
01-25 04:26:40.215: E/AndroidRuntime(1089): at dalvik.system.NativeStart.main(Native Method)
01-25 04:26:40.215: E/AndroidRuntime(1089): Caused by: android.view.InflateException: Binary XML file line #1: Error inflating class fragment
01-25 04:26:40.215: E/AndroidRuntime(1089): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704)
01-25 04:26:40.215: E/AndroidRuntime(1089): at android.view.LayoutInflater.inflate(LayoutInflater.java:466)
01-25 04:26:40.215: E/AndroidRuntime(1089): at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
01-25 04:26:40.215: E/AndroidRuntime(1089): at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
01-25 04:26:40.215: E/AndroidRuntime(1089): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:270)
01-25 04:26:40.215: E/AndroidRuntime(1089): at android.app.Activity.setContentView(Activity.java:1881)
01-25 04:26:40.215: E/AndroidRuntime(1089): at com.Simple.lastmap.MainActivity.onCreate(MainActivity.java:17)
01-25 04:26:40.215: E/AndroidRuntime(1089): at android.app.Activity.performCreate(Activity.java:5104)
01-25 04:26:40.215: E/AndroidRuntime(1089): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
01-25 04:26:40.215: E/AndroidRuntime(1089): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144)
01-25 04:26:40.215: E/AndroidRuntime(1089): ... 11 more
01-25 04:26:40.215: E/AndroidRuntime(1089): Caused by: java.lang.IllegalStateException: The meta-data tag in your app's AndroidManifest.xml does not have the right value. Expected 4132500 but found 0. You must have the following declaration within the <application> element: <meta-data android:name="com.google.android.gms.version" android:value="#integer/google_play_services_version" />
01-25 04:26:40.215: E/AndroidRuntime(1089): at com.google.android.gms.common.GooglePlayServicesUtil.n(Unknown Source)
01-25 04:26:40.215: E/AndroidRuntime(1089): at com.google.android.gms.common.GooglePlayServicesUtil.isGooglePlayServicesAvailable(Unknown Source)
01-25 04:26:40.215: E/AndroidRuntime(1089): at com.google.android.gms.maps.internal.q.v(Unknown Source)
01-25 04:26:40.215: E/AndroidRuntime(1089): at com.google.android.gms.maps.internal.q.u(Unknown Source)
01-25 04:26:40.215: E/AndroidRuntime(1089): at com.google.android.gms.maps.MapsInitializer.initialize(Unknown Source)
01-25 04:26:40.215: E/AndroidRuntime(1089): at
com.google.android.gms.maps.MapFragment$b.eb(Unknown Source)
01-25 04:26:40.215: E/AndroidRuntime(1089): at com.google.android.gms.maps.MapFragment$b.a(Unknown Source)
01-25 04:26:40.215: E/AndroidRuntime(1089): at com.google.android.gms.dynamic.a.a(Unknown Source)
01-25 04:26:40.215: E/AndroidRuntime(1089): at com.google.android.gms.dynamic.a.onInflate(Unknown Source)
01-25 04:26:40.215: E/AndroidRuntime(1089): at com.google.android.gms.maps.MapFragment.onInflate(Unknown Source)
01-25 04:26:40.215: E/AndroidRuntime(1089): at android.app.Activity.onCreateView(Activity.java:4716)
01-25 04:26:40.215: E/AndroidRuntime(1089): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:680)
01-25 04:26:40.215: E/AndroidRuntime(1089): ... 20 more
Please take the Reference from this it will help you :link

Error at runtime - what to do?

What does this error mean? I'm having this error at runtime. The app crashes when I try to launch. I am new at Android programming.
I have tried to look through the code and I couldn't find it. I would appreciate your help.
02-07 14:32:57.967: E/Trace(943): error opening trace file: No such file or directory (2)
02-07 14:32:58.386: E/AndroidRuntime(943): FATAL EXCEPTION: main
02-07 14:32:58.386: E/AndroidRuntime(943): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.example.quiz/com.example.quiz.Splash}: java.lang.ClassNotFoundException: Didn't find class "com.example.quiz.Splash" on path: /data/app/com.example.quiz-2.apk
02-07 14:32:58.386: E/AndroidRuntime(943): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2106)
02-07 14:32:58.386: E/AndroidRuntime(943): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
02-07 14:32:58.386: E/AndroidRuntime(943): at android.app.ActivityThread.access$600(ActivityThread.java:141)
02-07 14:32:58.386: E/AndroidRuntime(943): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
02-07 14:32:58.386: E/AndroidRuntime(943): at android.os.Handler.dispatchMessage(Handler.java:99)
02-07 14:32:58.386: E/AndroidRuntime(943): at android.os.Looper.loop(Looper.java:137)
02-07 14:32:58.386: E/AndroidRuntime(943): at android.app.ActivityThread.main(ActivityThread.java:5039)
02-07 14:32:58.386: E/AndroidRuntime(943): at java.lang.reflect.Method.invokeNative(Native Method)
02-07 14:32:58.386: E/AndroidRuntime(943): at java.lang.reflect.Method.invoke(Method.java:511)
02-07 14:32:58.386: E/AndroidRuntime(943): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
02-07 14:32:58.386: E/AndroidRuntime(943): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
02-07 14:32:58.386: E/AndroidRuntime(943): at dalvik.system.NativeStart.main(Native Method)
02-07 14:32:58.386: E/AndroidRuntime(943): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.example.quiz.Splash" on path: /data/app/com.example.quiz-2.apk
02-07 14:32:58.386: E/AndroidRuntime(943): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:65)
02-07 14:32:58.386: E/AndroidRuntime(943): at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
02-07 14:32:58.386: E/AndroidRuntime(943): at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
02-07 14:32:58.386: E/AndroidRuntime(943): at android.app.Instrumentation.newActivity(Instrumentation.java:1054)
02-07 14:32:58.386: E/AndroidRuntime(943): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2097)
02-07 14:32:58.386: E/AndroidRuntime(943): ... 11 more
First of all, check if your source is where it is mentioned in the error log.
If it is, check if you've made any typing mistakes
If it still isn't working, it would be easier (In my opinion) to create a new project and rename what is missing (I've done this several times already and it has always worked) Of course, make sure you copy all of your code
It looks like you've missed out your Splash activity in your manifest.
<activity android:name=".Splash"/>
See if that line appears in your manifest, if not you should add it.

Application has stopped unexpectedly. please try again force close

When i'm trying to run my application i receive the error as The application Sample 2 (com.example.sample2) has stopped unexpectedly. Please try again Force close error. Logcat error is given below
02-07 03:46:52.292: I/Process(275): Sending signal. PID: 275 SIG: 9
02-07 03:47:01.045: D/AndroidRuntime(335): Shutting down VM
02-07 03:47:01.045: W/dalvikvm(335): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
02-07 03:47:01.106: E/AndroidRuntime(335): FATAL EXCEPTION: main
02-07 03:47:01.106: E/AndroidRuntime(335): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.example.projectsample1/com.example.projectsample1.MainActivity}: java.lang.ClassNotFoundException: com.example.projectsample1.MainActivity in loader dalvik.system.PathClassLoader[/data/app/com.example.projectsample1-1.apk]
02-07 03:47:01.106: E/AndroidRuntime(335): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2585)
02-07 03:47:01.106: E/AndroidRuntime(335): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
02-07 03:47:01.106: E/AndroidRuntime(335): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
02-07 03:47:01.106: E/AndroidRuntime(335): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
02-07 03:47:01.106: E/AndroidRuntime(335): at android.os.Handler.dispatchMessage(Handler.java:99)
02-07 03:47:01.106: E/AndroidRuntime(335): at android.os.Looper.loop(Looper.java:123)
02-07 03:47:01.106: E/AndroidRuntime(335): at android.app.ActivityThread.main(ActivityThread.java:4627)
02-07 03:47:01.106: E/AndroidRuntime(335): at java.lang.reflect.Method.invokeNative(Native Method)
02-07 03:47:01.106: E/AndroidRuntime(335): at java.lang.reflect.Method.invoke(Method.java:521)
02-07 03:47:01.106: E/AndroidRuntime(335): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
02-07 03:47:01.106: E/AndroidRuntime(335): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
02-07 03:47:01.106: E/AndroidRuntime(335): at dalvik.system.NativeStart.main(Native Method)
02-07 03:47:01.106: E/AndroidRuntime(335): Caused by: java.lang.ClassNotFoundException: com.example.projectsample1.MainActivity in loader dalvik.system.PathClassLoader[/data/app/com.example.projectsample1-1.apk]
02-07 03:47:01.106: E/AndroidRuntime(335): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243)
02-07 03:47:01.106: E/AndroidRuntime(335): at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
02-07 03:47:01.106: E/AndroidRuntime(335): at java.lang.ClassLoader.loadClass(ClassLoader.java:532)
02-07 03:47:01.106: E/AndroidRuntime(335): at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
02-07 03:47:01.106: E/AndroidRuntime(335): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2577)
02-07 03:47:01.106: E/AndroidRuntime(335): ... 11 more
02-07 03:52:01.252: I/Process(335): Sending signal. PID: 335 SIG: 9
Initially, this application was working well. But after a few days, it stopped working giving the above error. I don't seem to understand what is wrong. Please help me.
You have done one of two things:
Renamed your activity package or class name and not updated it in the manifest
or
Changed your manifest to reflect an activity that doesn't exist
Check your manifest against the fully qualified class name for that Activity. Make sure they match. Then go to Project -> Clean and clean your project.
I think, you declared Activity in AndroidManifes.xml, and register it as default to launch in your application. But, you have no Activity with this name as you declared in manifest. Just correct activity name in AndroidManifest.xml
Here is the error:
java.lang.ClassNotFoundException: com.example.projectsample1.MainActivity
The MainActivity class of the projectsample1 Application was not found.
Try to clear the dalvik-cache if you know how to do it.
Otherwise, re-install the application.
Or if you are the developer of the application, make sure to change the name of the class in the Manifest.xml file if you changed the name of the MainActivity class.

Categories

Resources