包含项目依赖项后,Android App Sample App崩溃了

时间:2015-08-19 17:25:52

标签: java android android-studio

我在Android Studio中创建了一个有一个活动的空白应用程序。在不包括我的shared项目的情况下运行时,将显示Hello World。当我在app的build.gradle依赖项部分中包含共享项目时:

dependencies {
    compile (project(':shared'))
}

运行时,如果我不使用shared:

中的任何内容,我会收到以下错误事件
  

不幸的是,TestApp已经停止了。

08-19 18:45:07.903    1628-1667/? E/Backup﹕ [LegacyBackupAccountManager] Fail to get legacy transport context.
    android.content.pm.PackageManager$NameNotFoundException: Application package com.google.android.backup not found
            at android.app.ContextImpl.createPackageContextAsUser(ContextImpl.java:2172)
            at android.app.ContextImpl.createPackageContext(ContextImpl.java:2148)
            at android.content.ContextWrapper.createPackageContext(ContextWrapper.java:671)
            at com.google.android.gms.backup.an.<init>(SourceFile:47)
            at com.google.android.gms.backup.BackupTransportMigratorService.f(SourceFile:248)
            at com.google.android.gms.backup.BackupTransportMigratorService.d(SourceFile:31)
            at com.google.android.gms.backup.y.a(SourceFile:97)
            at com.google.android.gms.backup.y.doInBackground(SourceFile:93)
            at android.os.AsyncTask$2.call(AsyncTask.java:292)
            at java.util.concurrent.FutureTask.run(FutureTask.java:237)
            at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
            at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
            at java.lang.Thread.run(Thread.java:818)
08-19 18:45:08.262    1682-1706/? E/SQLiteLog﹕ (284) automatic index on assetrefs(dataitems_id)
08-19 18:45:08.419    1645-1713/? E/Backup﹕ [LegacyBackupAccountManager] Fail to get legacy transport context.
    android.content.pm.PackageManager$NameNotFoundException: Application package com.google.android.backup not found
            at android.app.ContextImpl.createPackageContextAsUser(ContextImpl.java:2172)
            at android.app.ContextImpl.createPackageContext(ContextImpl.java:2148)
            at android.content.ContextWrapper.createPackageContext(ContextWrapper.java:671)
            at com.google.android.gms.backup.an.<init>(SourceFile:47)
            at com.google.android.gms.backup.a.a(SourceFile:66)
            at com.google.android.gms.backup.c.a(SourceFile:40)
            at com.google.android.gms.backup.b.a(SourceFile:69)
            at com.google.android.gms.backup.b.a(SourceFile:40)
            at com.google.android.gms.backup.BackupAccountNotifierService.onHandleIntent(SourceFile:76)
            at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
            at android.os.Handler.dispatchMessage(Handler.java:102)
            at android.os.Looper.loop(Looper.java:135)
            at android.os.HandlerThread.run(HandlerThread.java:61)
08-19 18:45:10.145    1737-1737/? E/BluetoothAdapter﹕ Bluetooth binder is null
08-19 18:45:11.177    1645-1658/? E/SQLiteLog﹕ (283) recovered 6 frames from WAL file /data/data/com.google.android.gms/databases/playlog.db-wal
08-19 18:45:11.972    1821-1967/? E/SQLiteLog﹕ (283) recovered 64 frames from WAL file /data/user/0/com.android.providers.media/databases/internal.db-wal
08-19 18:45:12.239    1867-1876/? E/StrictMode﹕ A resource was acquired at attached stack trace but never released. See java.io.Closeable for information on avoiding resource leaks.
    java.lang.Throwable: Explicit termination method 'release' not called
            at dalvik.system.CloseGuard.open(CloseGuard.java:184)
            at android.drm.DrmManagerClient.<init>(DrmManagerClient.java:258)
            at com.google.android.mms.pdu.PduPersister.<init>(PduPersister.java:288)
            at com.google.android.mms.pdu.PduPersister.getPduPersister(PduPersister.java:299)
            at com.android.mms.transaction.TransactionService.onNewIntent(TransactionService.java:231)
            at com.android.mms.transaction.TransactionService$ServiceHandler.handleMessage(TransactionService.java:633)
            at android.os.Handler.dispatchMessage(Handler.java:102)
            at android.os.Looper.loop(Looper.java:135)
            at android.os.HandlerThread.run(HandlerThread.java:61)
08-19 18:45:12.482    1821-1967/? E/SQLiteLog﹕ (283) recovered 77 frames from WAL file /data/user/0/com.android.providers.media/databases/external.db-wal
08-19 18:45:12.657    1628-2002/? E/BluetoothAdapter﹕ Bluetooth binder is null
08-19 18:45:12.766    1628-2002/? E/copresGcore﹕ WifiMedium: Wifi is not supported!!
08-19 18:45:12.996    1628-2002/? E/copresGcore﹕ ObfuscatedGaiaIdLookup: Could not load ObfuscatedGaiaIds: /data/data/com.google.android.gms/files/copresence_gaia_id: open failed: ENOENT (No such file or directory)
08-19 18:45:13.023    1628-2002/? E/copresGcore﹕ Couldn't load settings: /data/data/com.google.android.gms/files/copresence_settings: open failed: ENOENT (No such file or directory)
08-19 18:45:13.592    2035-2035/? E/ActivityThread﹕ Service com.android.email.service.EmailBroadcastProcessorService has leaked ServiceConnection com.android.emailcommon.service.ServiceProxy$ProxyConnection@36784645 that was originally bound here
    android.app.ServiceConnectionLeaked: Service com.android.email.service.EmailBroadcastProcessorService has leaked ServiceConnection com.android.emailcommon.service.ServiceProxy$ProxyConnection@36784645 that was originally bound here
            at android.app.LoadedApk$ServiceDispatcher.<init>(LoadedApk.java:1077)
            at android.app.LoadedApk.getServiceDispatcher(LoadedApk.java:971)
            at android.app.ContextImpl.bindServiceCommon(ContextImpl.java:1774)
            at android.app.ContextImpl.bindService(ContextImpl.java:1757)
            at android.content.ContextWrapper.bindService(ContextWrapper.java:539)
            at com.android.emailcommon.service.ServiceProxy.setTask(ServiceProxy.java:181)
            at com.android.emailcommon.service.ServiceProxy.test(ServiceProxy.java:224)
            at com.android.email.service.EmailServiceUtils.isServiceAvailable(EmailServiceUtils.java:160)
            at com.android.email.provider.AccountReconciler.reconcileAccountsInternal(AccountReconciler.java:171)
            at com.android.email.provider.AccountReconciler.reconcileAccounts(AccountReconciler.java:115)
            at com.android.email.service.EmailBroadcastProcessorService.reconcileAndStartServices(EmailBroadcastProcessorService.java:305)
            at com.android.email.service.EmailBroadcastProcessorService.onBootCompleted(EmailBroadcastProcessorService.java:295)
            at com.android.email.service.EmailBroadcastProcessorService.onHandleIntent(EmailBroadcastProcessorService.java:130)
            at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:65)
            at android.os.Handler.dispatchMessage(Handler.java:102)
            at android.os.Looper.loop(Looper.java:135)
            at android.os.HandlerThread.run(HandlerThread.java:61)
08-19 18:45:16.818    1849-2106/? E/SQLiteLog﹕ (284) automatic index on view_events(_id)
08-19 18:45:28.627    2116-2116/? E/memtrack﹕ Couldn't load memtrack module (No such file or directory)
08-19 18:45:28.627    2116-2116/? E/android.os.Debug﹕ failed to load memtrack module: -2
08-19 18:45:37.446    2169-2169/? E/memtrack﹕ Couldn't load memtrack module (No such file or directory)
08-19 18:45:37.446    2169-2169/? E/android.os.Debug﹕ failed to load memtrack module: -2
08-19 18:45:37.537    2179-2179/? E/AndroidRuntime﹕ FATAL EXCEPTION: main
    Process: de.majestella, PID: 2179
    java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{de.majestella/de.majestella.MainActivity}: java.lang.ClassNotFoundException: Didn't find class "de.majestella.MainActivity" on path: DexPathList[[zip file "/data/app/de.majestella-2/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
            at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2236)
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2390)
            at android.app.ActivityThread.access$800(ActivityThread.java:151)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303)
            at android.os.Handler.dispatchMessage(Handler.java:102)
            at android.os.Looper.loop(Looper.java:135)
            at android.app.ActivityThread.main(ActivityThread.java:5257)
            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:903)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
     Caused by: java.lang.ClassNotFoundException: Didn't find class "de.majestella.MainActivity" on path: DexPathList[[zip file "/data/app/de.majestella-2/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:1066)
            at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2226)
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2390)
            at android.app.ActivityThread.access$800(ActivityThread.java:151)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303)
            at android.os.Handler.dispatchMessage(Handler.java:102)
            at android.os.Looper.loop(Looper.java:135)
            at android.app.ActivityThread.main(ActivityThread.java:5257)
            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:903)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
    Suppressed: java.lang.ClassNotFoundException: de.majestella.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
08-19 18:45:37.673      920-920/? E/EGL_emulation﹕ tid 920: eglCreateSyncKHR(1237): error 0x3004 (EGL_BAD_ATTRIBUTE)
08-19 18:49:32.130    2225-2225/? E/memtrack﹕ Couldn't load memtrack module (No such file or directory)
08-19 18:49:32.130    2225-2225/? E/android.os.Debug﹕ failed to load memtrack module: -2
08-19 18:49:32.445    2237-2237/? E/memtrack﹕ Couldn't load memtrack module (No such file or directory)
08-19 18:49:32.445    2237-2237/? E/android.os.Debug﹕ failed to load memtrack module: -2
08-19 18:49:32.478    2237-2245/? E/art﹕ Thread attaching while runtime is shutting down: Binder_1
08-19 18:49:32.531    2246-2246/? E/AndroidRuntime﹕ FATAL EXCEPTION: main
    Process: de.majestella, PID: 2246
    java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{de.majestella/de.majestella.MainActivity}: java.lang.ClassNotFoundException: Didn't find class "de.majestella.MainActivity" on path: DexPathList[[zip file "/data/app/de.majestella-2/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
            at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2236)
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2390)
            at android.app.ActivityThread.access$800(ActivityThread.java:151)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303)
            at android.os.Handler.dispatchMessage(Handler.java:102)
            at android.os.Looper.loop(Looper.java:135)
            at android.app.ActivityThread.main(ActivityThread.java:5257)
            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:903)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
     Caused by: java.lang.ClassNotFoundException: Didn't find class "de.majestella.MainActivity" on path: DexPathList[[zip file "/data/app/de.majestella-2/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:1066)
            at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2226)
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2390)
            at android.app.ActivityThread.access$800(ActivityThread.java:151)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303)
            at android.os.Handler.dispatchMessage(Handler.java:102)
            at android.os.Looper.loop(Looper.java:135)
            at android.app.ActivityThread.main(ActivityThread.java:5257)
            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:903)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
    Suppressed: java.lang.ClassNotFoundException: de.majestella.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
08-19 18:49:32.663      920-920/? E/EGL_emulation﹕ tid 920: eglCreateSyncKHR(1237): error 0x3004 (EGL_BAD_ATTRIBUTE)
08-19 18:50:38.661      920-920/? E/EGL_emulation﹕ tid 920: eglCreateSyncKHR(1237): error 0x3004 (EGL_BAD_ATTRIBUTE)
08-19 18:56:50.296    2275-2275/? E/memtrack﹕ Couldn't load memtrack module (No such file or directory)
08-19 18:56:50.296    2275-2275/? E/android.os.Debug﹕ failed to load memtrack module: -2
08-19 18:56:54.317    2302-2302/? E/memtrack﹕ Couldn't load memtrack module (No such file or directory)
08-19 18:56:54.317    2302-2302/? E/android.os.Debug﹕ failed to load memtrack module: -2
08-19 18:57:42.985    2333-2333/? E/memtrack﹕ Couldn't load memtrack module (No such file or directory)
08-19 18:57:42.985    2333-2333/? E/android.os.Debug﹕ failed to load memtrack module: -2
08-19 18:57:43.000    1218-1250/? E/InputDispatcher﹕ channel 'e559d02 de.majestella/de.majestella.MainActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
08-19 18:57:43.026    2333-2343/? E/art﹕ Thread attaching while runtime is shutting down: Binder_2
08-19 18:57:43.363    2346-2346/? E/memtrack﹕ Couldn't load memtrack module (No such file or directory)
08-19 18:57:43.363    2346-2346/? E/android.os.Debug﹕ failed to load memtrack module: -2
08-19 19:00:08.919      920-920/? E/EGL_emulation﹕ tid 920: eglCreateSyncKHR(1237): error 0x3004 (EGL_BAD_ATTRIBUTE)
08-19 19:02:55.120    2381-2381/? E/memtrack﹕ Couldn't load memtrack module (No such file or directory)
08-19 19:02:55.120    2381-2381/? E/android.os.Debug﹕ failed to load memtrack module: -2
08-19 19:03:04.755    2407-2407/? E/memtrack﹕ Couldn't load memtrack module (No such file or directory)
08-19 19:03:04.755    2407-2407/? E/android.os.Debug﹕ failed to load memtrack module: -2
08-19 19:03:04.833    2417-2417/? E/AndroidRuntime﹕ FATAL EXCEPTION: main
    Process: de.majestella, PID: 2417
    java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{de.majestella/de.majestella.MainActivity}: java.lang.ClassNotFoundException: Didn't find class "de.majestella.MainActivity" on path: DexPathList[[zip file "/data/app/de.majestella-2/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
            at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2236)
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2390)
            at android.app.ActivityThread.access$800(ActivityThread.java:151)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303)
            at android.os.Handler.dispatchMessage(Handler.java:102)
            at android.os.Looper.loop(Looper.java:135)
            at android.app.ActivityThread.main(ActivityThread.java:5257)
            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:903)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
     Caused by: java.lang.ClassNotFoundException: Didn't find class "de.majestella.MainActivity" on path: DexPathList[[zip file "/data/app/de.majestella-2/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:1066)
            at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2226)
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2390)
            at android.app.ActivityThread.access$800(ActivityThread.java:151)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303)
            at android.os.Handler.dispatchMessage(Handler.java:102)
            at android.os.Looper.loop(Looper.java:135)
            at android.app.ActivityThread.main(ActivityThread.java:5257)
            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:903)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
    Suppressed: java.lang.ClassNotFoundException: de.majestella.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
08-19 19:03:04.974      920-920/? E/EGL_emulation﹕ tid 920: eglCreateSyncKHR(1237): error 0x3004 (EGL_BAD_ATTRIBUTE)
08-19 19:19:43.991    2443-2443/? E/memtrack﹕ Couldn't load memtrack module (No such file or directory)
08-19 19:19:43.991    2443-2443/? E/android.os.Debug﹕ failed to load memtrack module: -2
08-19 19:19:44.011    2443-2453/? E/art﹕ Thread attaching while runtime is shutting down: Binder_2
08-19 19:19:44.312    2456-2456/? E/memtrack﹕ Couldn't load memtrack module (No such file or directory)
08-19 19:19:44.312    2456-2456/? E/android.os.Debug﹕ failed to load memtrack module: -2
08-19 19:19:44.352    2456-2464/? E/art﹕ Thread attaching while runtime is shutting down: Binder_1
08-19 19:19:44.396    2465-2465/? E/AndroidRuntime﹕ FATAL EXCEPTION: main
    Process: de.majestella, PID: 2465
    java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{de.majestella/de.majestella.MainActivity}: java.lang.ClassNotFoundException: Didn't find class "de.majestella.MainActivity" on path: DexPathList[[zip file "/data/app/de.majestella-2/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
            at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2236)
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2390)
            at android.app.ActivityThread.access$800(ActivityThread.java:151)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303)
            at android.os.Handler.dispatchMessage(Handler.java:102)
            at android.os.Looper.loop(Looper.java:135)
            at android.app.ActivityThread.main(ActivityThread.java:5257)
            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:903)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
     Caused by: java.lang.ClassNotFoundException: Didn't find class "de.majestella.MainActivity" on path: DexPathList[[zip file "/data/app/de.majestella-2/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:1066)
            at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2226)
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2390)
            at android.app.ActivityThread.access$800(ActivityThread.java:151)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303)
            at android.os.Handler.dispatchMessage(Handler.java:102)
            at android.os.Looper.loop(Looper.java:135)
            at android.app.ActivityThread.main(ActivityThread.java:5257)
            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:903)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
    Suppressed: java.lang.ClassNotFoundException: de.majestella.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
08-19 19:19:44.524      920-920/? E/EGL_emulation﹕ tid 920: eglCreateSyncKHR(1237): error 0x3004 (EGL_BAD_ATTRIBUTE)
08-19 19:20:30.632    2485-2485/? E/memtrack﹕ Couldn't load memtrack module (No such file or directory)
08-19 19:20:30.632    2485-2485/? E/android.os.Debug﹕ failed to load memtrack module: -2
08-19 19:20:30.658    2485-2494/? E/art﹕ Thread attaching while runtime is shutting down: Binder_1
08-19 19:20:30.953    2497-2497/? E/memtrack﹕ Couldn't load memtrack module (No such file or directory)
08-19 19:20:30.953    2497-2497/? E/android.os.Debug﹕ failed to load memtrack module: -2
08-19 19:20:31.001    2497-2505/? E/art﹕ Thread attaching while runtime is shutting down: Binder_1
08-19 19:20:31.026    2506-2506/? E/AndroidRuntime﹕ FATAL EXCEPTION: main
    Process: de.majestella, PID: 2506
    java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{de.majestella/de.majestella.MainActivity}: java.lang.ClassNotFoundException: Didn't find class "de.majestella.MainActivity" on path: DexPathList[[zip file "/data/app/de.majestella-2/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
            at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2236)
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2390)
            at android.app.ActivityThread.access$800(ActivityThread.java:151)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303)
            at android.os.Handler.dispatchMessage(Handler.java:102)
            at android.os.Looper.loop(Looper.java:135)
            at android.app.ActivityThread.main(ActivityThread.java:5257)
            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:903)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
     Caused by: java.lang.ClassNotFoundException: Didn't find class "de.majestella.MainActivity" on path: DexPathList[[zip file "/data/app/de.majestella-2/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:1066)
            at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2226)
            at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2390)
            at android.app.ActivityThread.access$800(ActivityThread.java:151)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303)
            at android.os.Handler.dispatchMessage(Handler.java:102)
            at android.os.Looper.loop(Looper.java:135)
            at android.app.ActivityThread.main(ActivityThread.java:5257)
            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:903)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
    Suppressed: java.lang.ClassNotFoundException: de.majestella.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
08-19 19:20:31.158      920-920/? E/EGL_emulation﹕ tid 920: eglCreateSyncKHR(1237): error 0x3004 (EGL_BAD_ATTRIBUTE)

导致此应用崩溃的原因是什么?

1 个答案:

答案 0 :(得分:1)

将相同版本的android支持库放在您包含的项目和库项目中并清理构建。