NavigationDrawer 无法初始化应用程序 java.lang.classnotfoundexception



我正在开发一个应用程序。在这一部分中,我只有一个导航抽屉的活动。

m trying to run but I get the same Exception everytime.. I搜索了一段时间,尝试了很多东西,但没有任何效果。

这是我的日志:

02-23 17:45:09.379: E/AndroidRuntime(3364): FATAL EXCEPTION: main
02-23 17:45:09.379: E/AndroidRuntime(3364): Process:       com.example.testedrawer, PID: 3364
02-23 17:45:09.379: E/AndroidRuntime(3364): java.lang.RuntimeException:  Unable to instantiate activity ComponentInfo{com.example.testedrawer/com.example.testedrawer.MainActivity}: java.lang.ClassNotFoundException: Didn't find class "com.example.testedrawer.MainActivity" on path: DexPathList[[zip file "/data/app/com.example.testedrawer-2/base.apk"],nativeLibraryDirectories= [/vendor/lib, /system/lib]]
02-23 17:45:09.379: E/AndroidRuntime(3364):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2209)
02-23 17:45:09.379: E/AndroidRuntime(3364):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2360)
02-23 17:45:09.379: E/AndroidRuntime(3364):     at android.app.ActivityThread.access$800(ActivityThread.java:144)
02-23 17:45:09.379: E/AndroidRuntime(3364):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1278)
02-23 17:45:09.379: E/AndroidRuntime(3364):     at android.os.Handler.dispatchMessage(Handler.java:102)
02-23 17:45:09.379: E/AndroidRuntime(3364):     at android.os.Looper.loop(Looper.java:135)
02-23 17:45:09.379: E/AndroidRuntime(3364):     at android.app.ActivityThread.main(ActivityThread.java:5221)
02-23 17:45:09.379: E/AndroidRuntime(3364):     at java.lang.reflect.Method.invoke(Native Method)
02-23 17:45:09.379: E/AndroidRuntime(3364):     at java.lang.reflect.Method.invoke(Method.java:372)
02-23 17:45:09.379: E/AndroidRuntime(3364):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
02-23 17:45:09.379: E/AndroidRuntime(3364):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
02-23 17:45:09.379: E/AndroidRuntime(3364): Caused by:  java.lang.ClassNotFoundException: Didn't find class "com.example.testedrawer.MainActivity" on path: DexPathList[[zip file "/data/app/com.example.testedrawer-2/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
02-23 17:45:09.379: E/AndroidRuntime(3364):     at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
02-23 17:45:09.379: E/AndroidRuntime(3364):     Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available

我的清单

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.testedrawer"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
    android:minSdkVersion="8"
    android:targetSdkVersion="21" />
<application
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >
    <activity
        android:name=".MainActivity"
        android:label="@string/app_name" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
</application>

请帮助我..

我已经修复了它。我尝试了很多在Eclipse上不起作用的东西。比我试图在Android Studio上做到这一点。它奏效了!不过,感谢您的帮助!

相关内容

  • 没有找到相关文章

最新更新