How to fix ERROR/AndroidRuntime(733)?
I keep getting this error every time I try to emulate pra application on the Virtual Device. The app never open, it force close every time. What can I do?
ERROR/AndroidRuntime(733): Uncaught handler: thread main exiting due to uncaught exception
ERROR/AndroidRuntime(733): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{fly.skymobile/fly.skymobile.Tela_Inicial}: java.lang.ClassNotFoundException: fly.skymobile.Tela_Inicial in loader dalvik.system.PathClassLoader@43598598
ERROR/AndroidRuntime(733): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2194)
ERROR/AndroidRuntime(733): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2284)
ERROR/AndroidRuntime(733): at android.app.ActivityThread.access$1800(ActivityThread.java:112)
ERROR/AndroidRuntime(733): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1692)
ERROR/AndroidRuntime(733): at android.os.Handler.dispatchMessage(Handler.java:99)
ERROR/AndroidRuntime(733): at android.os.Looper.loop(Looper.java:123)
ERROR/AndroidRuntime(733): at android.app.ActivityThread.main(ActivityThread.java:3948)
ERROR/AndroidRuntime(733): at java.lang.reflect.Method.invokeNative(Native Method)
ERROR/AndroidRuntime(733): at java.lang.reflect.Method.invoke(Method.java:521)
ERROR/AndroidRuntime(733): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:782)
ERROR/AndroidRuntime(733): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
ERROR/AndroidRuntime(733): at dalvik.system.NativeStart.main(Native Method)
ERROR/AndroidRuntime(733): Caused by: java.lang.ClassNotFoundException: fly.skymobile.Tela_Inicial in loader dalvik.system.PathClassLoader@43598598
ERROR/AndroidRuntime(733): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243)
ERROR/AndroidRuntime(733): at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
ERROR/AndroidRuntime(733): at java.lang.ClassLoader.loadClass(ClassLoader.java:532)
ERROR/AndroidRuntime(733): at android.app.Instrumentation.newActivity(Instrumentation.java:1097)
ERROR/AndroidRuntime(733): at android.app.ActivityThread.performLaunchActivity(A开发者_Go百科ctivityThread.java:2186)
ERROR/AndroidRuntime(733): ... 11 more
My AndroidManifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="fly.skymobile"
android:versionCode="1"
android:versionName="1.0">
<application android:icon="@drawable/icon" android:label="@string/app_name">
<activity android:name=".Tela_Inicial"
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=".importacao.AndroidFileBrowser">
<intent-filter>
<action android:name="android.intent.action" />
</intent-filter></activity>
</application>
<uses-permission
android:name = "android.permission.WRITE_EXTERNAL_STORAGE"/>
</manifest>
Have you added all your activities to the Android Manifest?
EDIT: A couple of extra things now you've posted your Manifest:
- Are you sure you have the file path for Tela_Inicial right? It's not in a sub-package or anything?
- You need to move
uses-permission
to beforeapplication
精彩评论