2013-12-13 87 views
0

我試圖運行我的開始我的應用程序,但我得到一個奇怪的錯誤。我改變了我的操作系統,但我已經將我的項目導入到了我的工作區中。什麼可能是錯誤的?每一樣東西都會像應該添加到這個specterst文件中,並且在我更改我的操作系統之前,這個應用程序運行的很好。奇怪的Android錯誤

12-13 18:48:10.578: W/dalvikvm(19830): Unable to resolve superclass of Lcom/darkovski/quran/Main; (56) 
12-13 18:48:10.578: W/dalvikvm(19830): Link of class 'Lcom/darkovski/quran/Main;' failed 
12-13 18:48:10.578: D/AndroidRuntime(19830): Shutting down VM 
12-13 18:48:10.578: W/dalvikvm(19830): threadid=1: thread exiting with uncaught exception (group=0x2b542210) 
12-13 18:48:10.598: E/AndroidRuntime(19830): FATAL EXCEPTION: main 
12-13 18:48:10.598: E/AndroidRuntime(19830): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.darkovski.quran/com.darkovski.quran.Main}: java.lang.ClassNotFoundException: com.darkovski.quran.Main 
12-13 18:48:10.598: E/AndroidRuntime(19830): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1891) 
12-13 18:48:10.598: E/AndroidRuntime(19830): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1992) 
12-13 18:48:10.598: E/AndroidRuntime(19830): at android.app.ActivityThread.access$600(ActivityThread.java:127) 
12-13 18:48:10.598: E/AndroidRuntime(19830): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1158) 
12-13 18:48:10.598: E/AndroidRuntime(19830): at android.os.Handler.dispatchMessage(Handler.java:99) 
12-13 18:48:10.598: E/AndroidRuntime(19830): at android.os.Looper.loop(Looper.java:137) 
12-13 18:48:10.598: E/AndroidRuntime(19830): at android.app.ActivityThread.main(ActivityThread.java:4441) 
12-13 18:48:10.598: E/AndroidRuntime(19830): at java.lang.reflect.Method.invokeNative(Native Method) 
12-13 18:48:10.598: E/AndroidRuntime(19830): at java.lang.reflect.Method.invoke(Method.java:511) 
12-13 18:48:10.598: E/AndroidRuntime(19830): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784) 
12-13 18:48:10.598: E/AndroidRuntime(19830): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551) 
12-13 18:48:10.598: E/AndroidRuntime(19830): at dalvik.system.NativeStart.main(Native Method) 
12-13 18:48:10.598: E/AndroidRuntime(19830): Caused by: java.lang.ClassNotFoundException: com.darkovski.quran.Main 
12-13 18:48:10.598: E/AndroidRuntime(19830): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61) 
12-13 18:48:10.598: E/AndroidRuntime(19830): at java.lang.ClassLoader.loadClass(ClassLoader.java:501) 
12-13 18:48:10.598: E/AndroidRuntime(19830): at java.lang.ClassLoader.loadClass(ClassLoader.java:461) 
12-13 18:48:10.598: E/AndroidRuntime(19830): at android.app.Instrumentation.newActivity(Instrumentation.java:1023) 
12-13 18:48:10.598: E/AndroidRuntime(19830): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1882) 
12-13 18:48:10.598: E/AndroidRuntime(19830): ... 11 more 

這裏是我的清單:

<?xml version="1.0" encoding="utf-8"?> 
<manifest xmlns:android="http://schemas.android.com/apk/res/android" 
    package="com.darkovski.quran" 
    android:installLocation="preferExternal" 
    android:versionCode="1" 
    android:versionName="1.0" > 

    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> 
    <uses-permission android:name="android.permission.INTERNET" /> 
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> 

    <uses-sdk 
     android:minSdkVersion="9" 
     android:targetSdkVersion="19" /> 

    <application 
     android:allowBackup="true" 
     android:icon="@drawable/ic_launcher" 
     android:label="@string/app_name" 
     android:theme="@style/AppTheme" > 
     <activity 
      android:name="com.darkovski.quran.Main" 
      android:label="@string/app_name" 
      android:screenOrientation="portrait" > 
      <intent-filter> 
       <action android:name="android.intent.action.MAIN" /> 

       <category android:name="android.intent.category.LAUNCHER" /> 
      </intent-filter> 
     </activity> 
     <activity 
      android:name="com.darkovski.quran.Playlist" 
      android:screenOrientation="portrait" /> 
     <activity 
      android:name="com.darkovski.quran.AlbumDetails" 
      android:screenOrientation="portrait" /> 

     <service 
      android:name=".MediaPlayerService" 
      android:enabled="true" /> 

     <activity 
      android:name="com.darkovski.quran.Favorites" 
      android:screenOrientation="portrait" /> 
     <activity 
      android:name="com.darkovski.quran.DownloadManager" 
      android:screenOrientation="portrait" /> 
    </application> 

</manifest> 
+0

您的活動名稱不應該完全限定。將'android:name =「com.darkovski.quran.DownloadManager」'替換爲'android:name =「。DownloadManager」「等等。 – foibs

+0

@foibs同樣的問題 –

+0

然後你可能需要清理和重建你的項目。檢查您的源代碼是否已在相應的目錄中正確設置(例如'src/com/darkovski/quran/Main.java'),並且包名稱是否正確。 – foibs

回答

0

這有什麼好做的清單。這是因爲不知何故,你的類com/darkovski/quran/Main的超級類沒有被加載到apk中導致沒有找到類。

嘗試清理並重建項目或重新啓動eclipse。只要檢查是否所有庫都存在於新的工作區中並且正確構建。