1
AndroidベースのスタジオでFirebaseとGoogle Playサービスを最近更新しましたが、アップデート以来、主なアクティビティを起動できない奇妙なエラーが発生していますアプリ内エラーのないLogCatのjava.lang.NoSuchMethodErrorメインアクティビティを起動しているときにクラッシュするアプリケーション
がここにここに私のLogcat
02-06 03:48:04.442 28081-28081/com.example.com.application_2 D/dalvikvm: Late-enabling CheckJNI
02-06 03:48:04.562 28081-28081/com.example.com.application_2 E/Trace: error opening trace file: No such file or directory (2)
02-06 03:48:04.562 28081-28081/com.example.com.application_2 D/ActivityThread: setTargetHeapUtilization:0.25
02-06 03:48:04.562 28081-28081/com.example.com.application_2 D/ActivityThread: setTargetHeapIdealFree:8388608
02-06 03:48:04.562 28081-28081/com.example.com.application_2 D/ActivityThread: setTargetHeapConcurrentStart:2097152
02-06 03:48:04.672 28081-28081/com.example.com.application_2 I/dalvikvm: Could not find method android.app.Application.registerOnProvideAssistDataListener, referenced from method com.android.tools.fd.runtime.BootstrapApplication.registerOnProvideAssistDataListener
02-06 03:48:04.672 28081-28081/com.example.com.application_2 W/dalvikvm: VFY: unable to resolve virtual method 292: Landroid/app/Application;.registerOnProvideAssistDataListener (Landroid/app/Application$OnProvideAssistDataListener;)V
02-06 03:48:04.672 28081-28081/com.example.com.application_2 D/dalvikvm: VFY: replacing opcode 0x6e at 0x0002
02-06 03:48:04.682 28081-28081/com.example.com.application_2 I/dalvikvm: Could not find method android.app.Application.unregisterOnProvideAssistDataListener, referenced from method com.android.tools.fd.runtime.BootstrapApplication.unregisterOnProvideAssistDataListener
02-06 03:48:04.682 28081-28081/com.example.com.application_2 W/dalvikvm: VFY: unable to resolve virtual method 295: Landroid/app/Application;.unregisterOnProvideAssistDataListener (Landroid/app/Application$OnProvideAssistDataListener;)V
02-06 03:48:04.682 28081-28081/com.example.com.application_2 D/dalvikvm: VFY: replacing opcode 0x6e at 0x0002
02-06 03:48:04.712 28081-28081/com.example.com.application_2 I/ActivityThread: Pub com.example.com.application_2.firebaseinitprovider: com.google.firebase.provider.FirebaseInitProvider
02-06 03:48:04.722 28081-28081/com.example.com.application_2 I/dalvikvm: Could not find method android.support.v4.content.ContextCompat.isDeviceProtectedStorage, referenced from method com.google.firebase.FirebaseApp.zza
02-06 03:48:04.722 28081-28081/com.example.com.application_2 W/dalvikvm: VFY: unable to resolve static method 5796: Landroid/support/v4/content/ContextCompat;.isDeviceProtectedStorage (Landroid/content/Context;)Z
02-06 03:48:04.722 28081-28081/com.example.com.application_2 D/dalvikvm: VFY: replacing opcode 0x71 at 0x0002
02-06 03:48:04.742 28081-28081/com.example.com.application_2 D/AndroidRuntime: Shutting down VM
02-06 03:48:04.742 28081-28081/com.example.com.application_2 W/dalvikvm: threadid=1: thread exiting with uncaught exception (group=0x41eab378)
02-06 03:48:04.772 28081-28081/com.example.com.application_2 E/AndroidRuntime: FATAL EXCEPTION: main
java.lang.NoSuchMethodError: android.support.v4.content.ContextCompat.isDeviceProtectedStorage
at com.google.firebase.FirebaseApp.zza(Unknown Source)
at com.google.firebase.FirebaseApp.initializeApp(Unknown Source)
at com.google.firebase.FirebaseApp.initializeApp(Unknown Source)
at com.google.firebase.FirebaseApp.initializeApp(Unknown Source)
at com.google.firebase.provider.FirebaseInitProvider.onCreate(Unknown Source)
at android.content.ContentProvider.attachInfo(ContentProvider.java:1058)
at com.google.firebase.provider.FirebaseInitProvider.attachInfo(Unknown Source)
at android.app.ActivityThread.installProvider(ActivityThread.java:4602)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:4232)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4174)
at android.app.ActivityThread.access$1300(ActivityThread.java:138)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1267)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:213)
at android.app.ActivityThread.main(ActivityThread.java:4787)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:556)
at dalvik.system.NativeStart.main(Native Method)
は私のビルドのGradleファイル
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
defaultConfig {
applicationId "com.example.com.application_2"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.github.paolorotolo:appintro:4.0.0'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.android.support:design:23.4.0'
compile 'com.google.android.gms:play-services-location:10.0.1'
compile 'com.android.support:recyclerview-v7:23.4.0'
compile ('com.android.support:support-v4:23.4.0'){
force = true;}
compile 'com.google.android.gms:play-services-places:10.0.1'
compile 'com.google.android.gms:play-services-maps:10.0.1'
compile 'com.google.firebase:firebase-core:10.0.1'
compile 'com.google.firebase:firebase-messaging:10.0.1'
// Getting a "Could not find" error? Make sure you have
// the latest Google Repository in the Android SDK manager
}
apply plugin: 'com.google.gms.google-services'
トップレベルのビルドファイルです
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.2'
classpath 'com.google.gms:google-services:3.0.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
私はグーグルだが、私と同じではない8つの結果しか得られない。