cordova-plugin-firebaseを使用して、私は次のエラーに走ったん静的メソッドisDeviceProtectedStorage:まず致命的な例外:java.lang.NoSuchMethodErrorの:
04-27 16:59:35.745 6859 6859 E AndroidRuntime: FATAL EXCEPTION: main
04-27 16:59:35.745 6859 6859 E AndroidRuntime: Process: com.XXXXXXXXXX.XXXXXXXXXXX, PID: 6859
04-27 16:59:35.745 6859 6859 E AndroidRuntime: java.lang.NoSuchMethodError: No static method isDeviceProtectedStorage(Landroid/content/Context;)Z in class Landroid/support/v4/content/ContextCompat; or its super classes (declaration of 'android.support.v4.content.ContextCompat' appears in /data/app/com.XXXXXXXXXX.XXXXXXXXXXX-1/base.apk)
04-27 16:59:35.745 6859 6859 E AndroidRuntime: at com.google.firebase.FirebaseApp.zza(Unknown Source)
04-27 16:59:35.745 6859 6859 E AndroidRuntime: at com.google.firebase.FirebaseApp.initializeApp(Unknown Source)
04-27 16:59:35.745 6859 6859 E AndroidRuntime: at com.google.firebase.FirebaseApp.initializeApp(Unknown Source)
04-27 16:59:35.745 6859 6859 E AndroidRuntime: at com.google.firebase.FirebaseApp.initializeApp(Unknown Source)
04-27 16:59:35.745 6859 6859 E AndroidRuntime: at com.google.firebase.provider.FirebaseInitProvider.onCreate(Unknown Source)
04-27 16:59:35.745 6859 6859 E AndroidRuntime: at android.content.ContentProvider.attachInfo(ContentProvider.java:1751)
04-27 16:59:35.745 6859 6859 E AndroidRuntime: at android.content.ContentProvider.attachInfo(ContentProvider.java:1726)
04-27 16:59:35.745 6859 6859 E AndroidRuntime: at com.google.firebase.provider.FirebaseInitProvider.attachInfo(Unknown Source)
04-27 16:59:35.745 6859 6859 E AndroidRuntime: at android.app.ActivityThread.installProvider(ActivityThread.java:5855)
04-27 16:59:35.745 6859 6859 E AndroidRuntime: at android.app.ActivityThread.installContentProviders(ActivityThread.java:5447)
04-27 16:59:35.745 6859 6859 E AndroidRuntime: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5386)
04-27 16:59:35.745 6859 6859 E AndroidRuntime: at android.app.ActivityThread.-wrap2(ActivityThread.java)
04-27 16:59:35.745 6859 6859 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1546)
04-27 16:59:35.745 6859 6859 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:102)
04-27 16:59:35.745 6859 6859 E AndroidRuntime: at android.os.Looper.loop(Looper.java:154)
04-27 16:59:35.745 6859 6859 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6121)
04-27 16:59:35.745 6859 6859 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
04-27 16:59:35.745 6859 6859 E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:889)
04-27 16:59:35.745 6859 6859 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779)
04-27 16:59:35.749 975 1021 W ActivityManager: Force finishing activity com.XXXXXXXXXX.XXXXXXXXXXX/.MainActivity
04-27 16:59:35.779 2358 6582 I PBSessionCacheImpl: Deleted sessionId[10372086956677829] from persistence.
04-27 16:59:35.795 2358 2358 W SearchService: Abort, client detached.
04-27 16:59:35.798 2358 2358 E WorkerRegistryImpl: getWorker() is called after WorkerRegistry disposal.
04-27 16:59:35.798 2358 2358 E WorkerRegistryImpl: getWorker() is called after WorkerRegistry disposal.
は、私はそれがandroid.support.v4であるためisDeviceProtectedStorageあると思いました。 content.ContextCompatはAPI 24以降でのみ追加されました。しかし、Android 7で新しいデバイスを使用しても、同じメッセージが表示されます。
なぜメソッドが見つからないのですか?私はいくつかのライブラリをインストールできなかったのでですか?
http://stackoverflow.com/questions/39049107/java-lang-nosuchmethoderror-no-static-のチェックを行いますmethod-setonapplywindowinsetslistener –
私のgradleファイルに 'com.android.support:support-v4:+' 'がコンパイルされています – huggie