1

I am developing a project in android . After adding an activity , I am getting this error . I am trying to find error for last 4 hours . Can you please help me ? If this question does not fill the requirement of this site , please tell me , I will edit the question as your suggestion . But guyz , please help me . I am in a great trouble .

 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

Here is my XML file :

<?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>
  • Look at this post and try this http://stackoverflow.com/questions/11446049/error-opening-trace-file-no-such-file-or-directory-2 – Aroon Dec 15 '13 at 14:24

1 Answers1

1

It can't be find out without seeing your full source code. But you can try the following steps , that may fix your problem.

  1. Clean your project.
  2. Check your build path if you made any mistake about referencing any third party library that you have used. Though , seeing your manifest , it seems that the exception is from your own written class in the project. Clean and build the project.
  3. Restart Eclipse.

Hope it helps.

ayon
  • 2,180
  • 2
  • 17
  • 32
  • if my app gives this error after 1 month from published from google play. what should I do? developer console sent me crash and anr but 1 month later it started – mehmet Apr 08 '14 at 06:49