java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{…}: java.lang.ClassNotFoundException: Didn't find class
Since your exception is:
ClassNotFoundException: Didn't find class "com.kpbird.fusedlocation.MainActivity"
into your AndroidManifest.xml
add the complete package were your activity is located:
<activity
android:name="com.kpbird.fusedlocation.MainActivity"
or be sure to have to correct package name defined:
package="com.kpbird.fusedlocation"
I think you typed incorrectly the package of your application in some place of your code!
Unable to instantiate activity ... Didn't find class WelcomeActivity on path: DexPathList (with instant run)
It looks like a bug in the build tools version 24.0.2, I upgraded to 24.0.3 and finally got it working again!
buildToolsVersion '24.0.3'
Rolling back to 24.0.2 reproduces the problem every time.
java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{}: java.lang.ClassNotFoundException
because you are declare this way
<activity
android:name="MainActivity"
just put .
to MainActivity
like this
<activity
android:name=".MainActivity"
Android Unable to instantiate activity: Didn't find class on path
I suppose you're using Eclipse. Your activity is there alright, but Eclipse didn't include the support package in the APK ... If you look above your error in stacktrace you will notice the root of your problem: "Unable to find FragmentActivity
". Or you can unpack the apk, undex it and you will see the compatibility package classes were not included.
To fix this, right-click your project, properties, build path and go to export tab. There make sure "Android private libraries
" are checked. A clean and rebuild should put you on track ...
Related Topics
Jar Mismatch Found 2 Versions of Android-Support-V4.Jar in the Dependency List
What Kind of Ocr Java Library Should I Use in Android
Android Studio Was Unable to Find a Valid Jvm (Related to MAC Os)
Recyclerview - Get View at Particular Position
Android App in Eclipse: Edit Text Not Showing on Graphical Layout
Playing Bg Music Across Activities in Android
What Is the Certificate Enrollment Process
Android: Clickablespan in Clickable Textview
How to Prevent Gson from Expressing Integers as Floats
Openssl Is Not Recognized as an Internal or External Command
Which Jdk Version (Language Level) Is Required for Android Studio
Exporting and Running Unity3D Project to Android Studio
Android What Is Wrong with Openfileoutput