android-O : app crash with webview

2019-07-06 14:24发布

问题:

I have simply put a WebView in layout.
When I run the project in Android-O preview emulator, it gives below error:

E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.mvvmrecyclerview, PID: 3527
java.lang.SecurityException: Signature check failed for com.example.mvvmrecyclerview
at android.os.Parcel.readException(Parcel.java:1915)
at android.os.Parcel.readException(Parcel.java:1861)
at com.google.android.gms.common.internal.zzv$zza$zza.zza(Unknown Source:41)
at com.google.android.gms.common.internal.zzf.zza(Unknown Source:0)
at com.google.android.gms.internal.zzzf$zzc.zzxQ(Unknown Source:0)
at com.google.android.gms.internal.zzzf$zzf.run(Unknown Source:0)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:457)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
at com.google.android.gms.internal.zzabx.run(Unknown Source:7)
at java.lang.Thread.run(Thread.java:764)

If you want to generate this error, simply create a new project, Put webview in your layout and try to run the project in Android O emulator.

can anyone help me with this. Thanks.

PS: Android Studio 2.4 Preview 3

回答1:

This is a known issue. Some sketchy workarounds are included in the issue comments. In general, you may need to hold off on O work until ODP2 rolls out (probably around Google I|O in mid-May).



回答2:

It may look like known issue:

https://code.google.com/p/android/issues/detail?id=267699

https://issuetracker.google.com/issues/36581808