我正在开发一个android项目。添加活动后,我收到此错误。我试图找到最近4个小时的错误。你能帮我么 ?如果这个问题没有满足本网站的要求,请告诉我,我会根据您的建议编辑问题。但是贾兹,请帮助我。我遇到了很大麻烦。
12-15 12:54:45.578: E/Trace(1857): error opening trace file: No such file or directory (2)
12-15 12:54:45.718: D/AndroidRuntime(1857): Shutting down VM
12-15 12:54:45.759: W/dalvikvm(1857): threadid=1: thread exiting with uncaught exception (group=0x40a71930)
12-15 12:54:45.798: E/AndroidRuntime(1857): FATAL EXCEPTION: main
12-15 12:54:45.798: E/AndroidRuntime(1857): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.androidhive.jsonparsing/com.androidhive.jsonparsing.Search_medicine}: java.lang.ClassNotFoundException: Didn't find class "com.androidhive.jsonparsing.Search_medicine" on path: /data/app/com.androidhive.jsonparsing-1.apk
12-15 12:54:45.798: E/AndroidRuntime(1857): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2106)
12-15 12:54:45.798: E/AndroidRuntime(1857): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
12-15 12:54:45.798: E/AndroidRuntime(1857): at android.app.ActivityThread.access$600(ActivityThread.java:141)
12-15 12:54:45.798: E/AndroidRuntime(1857): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
12-15 12:54:45.798: E/AndroidRuntime(1857): at android.os.Handler.dispatchMessage(Handler.java:99)
12-15 12:54:45.798: E/AndroidRuntime(1857): at android.os.Looper.loop(Looper.java:137)
12-15 12:54:45.798: E/AndroidRuntime(1857): at android.app.ActivityThread.main(ActivityThread.java:5041)
12-15 12:54:45.798: E/AndroidRuntime(1857): at java.lang.reflect.Method.invokeNative(Native Method)
12-15 12:54:45.798: E/AndroidRuntime(1857): at java.lang.reflect.Method.invoke(Method.java:511)
12-15 12:54:45.798: E/AndroidRuntime(1857): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
12-15 12:54:45.798: E/AndroidRuntime(1857): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
12-15 12:54:45.798: E/AndroidRuntime(1857): at dalvik.system.NativeStart.main(Native Method)
12-15 12:54:45.798: E/AndroidRuntime(1857): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.androidhive.jsonparsing.Search_medicine" on path: /data/app/com.androidhive.jsonparsing-1.apk
12-15 12:54:45.798: E/AndroidRuntime(1857): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:65)
12-15 12:54:45.798: E/AndroidRuntime(1857): at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
12-15 12:54:45.798: E/AndroidRuntime(1857): at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
12-15 12:54:45.798: E/AndroidRuntime(1857): at android.app.Instrumentation.newActivity(Instrumentation.java:1054)
12-15 12:54:45.798: E/AndroidRuntime(1857): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2097)
12-15 12:54:45.798: E/AndroidRuntime(1857): ... 11 more
12-15 12:54:50.277: I/Process(1857): Sending signal. PID: 1857 SIG: 9
这是我的XML文件:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.androidhive.jsonparsing"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="8" />
<uses-permission android:name="android.permission.INTERNET" />
<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name" >
<activity
android:label="@string/app_name"
android:name="com.androidhive.jsonparsing.Search_medicine"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
<intent-filter >
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<!-- Single List Item View -->
<activity
android:label="Single Menu Item"
android:name="com.androidhive.jsonparsing.Info_of_medicine"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
<intent-filter >
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:label="Single Menu Item"
android:name="com.androidhive.jsonparsing.Take_medicine"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
<intent-filter >
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
</application>
</manifest>
答案 0 :(得分:1)
如果没有看到完整的源代码,就无法找到它。但您可以尝试以下步骤,这可能会解决您的问题。
希望它有所帮助。