0
我只是嘗試我的舊的Android項目的谷歌Android架構組件轉換在Java中科特林並添加到我的項目:Android的致命異常
// LifeCycle Google Lib
compile "android.arch.lifecycle:runtime:1.0.0-alpha5"
compile "android.arch.lifecycle:extensions:1.0.0-alpha5"
annotationProcessor "android.arch.lifecycle:compiler:1.0.0-alpha5"
// Room Google Lib
compile "android.arch.persistence.room:runtime:1.0.0-alpha9"
annotationProcessor "android.arch.persistence.room:compiler:1.0.0-alpha9"
testCompile "android.arch.persistence.room:testing:1.0.0-alpha9"
,然後當我運行應用程序面臨這樣的錯誤:
E/dex2oat: Failed to create oat file: /data/dalvik-cache/arm/[email protected]@[email protected][email protected]: Permission denied
08-19 17:26:11.043 26169-26169/? E/dex2oat: Failed to create oat file: /data/dalvik-cache/arm/[email protected]@[email protected][email protected]: Permission denied
08-19 17:26:11.122 26174-26174/? E/dex2oat: Failed to create oat file: /data/dalvik-cache/arm/[email protected]@[email protected][email protected]: Permission denied
08-19 17:26:11.200 26180-26180/? E/dex2oat: Failed to create oat file: /data/dalvik-cache/arm/[email protected]@[email protected][email protected]: Permission denied
08-19 17:26:11.284 26187-26187/? E/dex2oat: Failed to create oat file: /data/dalvik-cache/arm/[email protected]@[email protected][email protected]: Permission denied
08-19 17:26:11.366 26193-26193/? E/dex2oat: Failed to create oat file: /data/dalvik-cache/arm/[email protected]@[email protected][email protected]: Permission denied
08-19 17:26:11.450 26197-26197/? E/dex2oat: Failed to create oat file: /data/dalvik-cache/arm/[email protected]@[email protected][email protected]: Permission denied
08-19 17:26:11.530 26206-26206/? E/dex2oat: Failed to create oat file: /data/dalvik-cache/arm/[email protected]@[email protected][email protected]: Permission denied
08-19 17:26:11.605 26210-26210/? E/dex2oat: Failed to create oat file: /data/dalvik-cache/arm/[email protected]@[email protected][email protected]: Permission denied
08-19 17:26:11.696 26214-26214/? E/dex2oat: Failed to create oat file: /data/dalvik-cache/arm/[email protected]@[email protected][email protected]: Permission denied
08-19 17:26:11.775 26221-26221/? E/dex2oat: Failed to create oat file: /data/dalvik-cache/arm/[email protected]@[email protected][email protected]: Permission denied
這:
E/AndroidRuntime: FATAL EXCEPTION: main
Process: ir.adrapanadevs.aya, PID: 26090
java.lang.NoSuchMethodError: No virtual method iterator()Landroid/arch/core/internal/SafeIterableMap$ListIterator; in class Landroid/arch/core/internal/SafeIterableMap; or its super classes (declaration of 'android.arch.core.internal.SafeIterableMap' appears in /data/app/ir.adrapanadevs.aya-2/split_lib_dependencies_apk.apk)
at android.arch.lifecycle.LifecycleRegistry.handleLifecycleEvent(LifecycleRegistry.java:101)
at android.arch.lifecycle.ProcessLifecycleOwner.attach(ProcessLifecycleOwner.java:154)
at android.arch.lifecycle.ProcessLifecycleOwner.init(ProcessLifecycleOwner.java:100)
at android.arch.lifecycle.LifecycleRuntimeTrojanProvider.onCreate(LifecycleRuntimeTrojanProvider.java:36)
at android.content.ContentProvider.attachInfo(ContentProvider.java:1748)
at android.content.ContentProvider.attachInfo(ContentProvider.java:1723)
at android.app.ActivityThread.installProvider(ActivityThread.java:5217)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:4812)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4752)
at android.app.ActivityThread.-wrap1(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1424)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5485)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
如何科幻x那? 謝謝
您是否嘗試清潔並重建 –
是的,我做了清潔和重建,但沒有修復。 –
只需將您的生命週期版本更改爲alpha 9就像房間ORM一樣。 – Karo