我在這裏看到類似的問題,但沒有人能幫助我。 我使用日食。在我的項目中,我使用RoundedImageView-master作爲庫。 這意味着,我已經在沒有源代碼的eclipse「main」項目和包名稱爲「gen」的文件夾中:com.makeramen.roundedimageview 和我的appcompat_v7-lib項目與android-support-v7-appcompat.jar。Android appcompat_v7不啓動
Withhin我的佈局我'使用,而不是 「...... RES-汽車」 這樣的:
xmlns:app="http://schemas.android.com/apk/lib/com.makeramen.roundedimageview"
在我的主活動我今年進口:
import android.support.v7.app.ActionBarDrawerToggle;
import android.support.v7.app.AppCompatActivity;
import android.support.design.widget.NavigationView;
import android.support.design.widget.NavigationView.OnNavigationItemSelectedListener;
在我的Buildpath成部分庫出現我的「主要」項目。 現在我要開始我的應用程序,但我從cat_log得到:
FATAL EXCEPTION: main
Process: com.hdd.myExampleApp, PID: 3454
java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.hdd.myExampleApp/com.hdd.myExampleApp.MainActivity}: java.lang.ClassNotFoundException: Didn't find class "com.hdd.myExampleApp.MainActivity" on path: DexPathList[[zip file "/data/app/com.hdd.myExampleApp-1/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2209)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2360)
at android.app.ActivityThread.access$800(ActivityThread.java:144)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1278)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5221)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.hdd.myExampleApp.MainActivity" on path: DexPathList[[zip file "/data/app/com.hdd.myExampleApp-1/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
at android.app.Instrumentation.newActivity(Instrumentation.java:1065)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2199)
... 10 more
Suppressed: java.lang.NoClassDefFoundError: com.hdd.myExampleApp.MainActivity
at dalvik.system.DexFile.defineClassNative(Native Method)
at dalvik.system.DexFile.defineClass(DexFile.java:226)
at dalvik.system.DexFile.loadClassBinaryName(DexFile.java:219)
at dalvik.system.DexPathList.findClass(DexPathList.java:321)
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:54)
... 14 more
Suppressed: java.lang.ClassNotFoundException: com.hdd.myExampleApp.MainActivity
at java.lang.Class.classForName(Native Method)
at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
... 13 more
Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available
和我的控制檯對我說:
[myExampleApp] Android Launch!
[myExampleApp] adb is running normally.
[myExampleApp] Performing com.hdd.myExampleApp.MainActivity activity launch
[2myExampleApp] Uploading myExampleApp.apk onto device '192.168.56.101:5555'
[2myExampleApp] Installing myExampleApp.apk...
[myExampleApp] Success!
[myExampleApp] Project dependency found, installing: main
[main] Uploading main.apk onto device '192.168.56.101:5555'
[main] Installing main.apk...
[main] Success!
[myExampleApp] Starting activity com.hdd.myExampleApp.MainActivity on device 192.168.56.101:5555
[myExampleApp] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.hdd.myExampleApp/.MainActivity }
我想,我有我的表現是這樣的,包括:
<uses-library android:name="com.makeramen.roundedimageview"/>
該軟件包名稱出現在我的主項目的gen-folder中。 當我開始這一點,我從我的控制檯geht:
[myExampleApp] Android Launch!
[myExampleApp] adb is running normally.
[myExampleApp] Performing com.hda.myExampleApp.MainActivity activity launch
[myExampleApp] Uploading myExampleApp.apk onto device '192.168.56.101:5555'
[myExampleApp] Installing myExampleApp.apk...
[myExampleApp] Installation error: INSTALL_FAILED_MISSING_SHARED_LIBRARY
[myExampleApp] Please check logcat output for more details.
[myExampleApp] Launch canceled!
我沒有想法了,我能做什麼。 請幫我:)
不,我不能那樣做。當我包含「res-auto」時,Eclipse沒有找到任何屬性,我使用它。 –