Я перенесен на android x все работает нормально, но в webview
при нажатии на ВЫБРАТЬ приложение тега падает в android 9, работает нормально в android 6 или ниже устройства. перед миграцией работает нормально. Это мой журнал ошибок
android.content.res.Resources$NotFoundException: Resource ID #0x0
at android.content.res.ResourcesImpl.getValue(ResourcesImpl.java:228)
at android.content.res.Resources.loadXmlResourceParser(Resources.java:2170)
at android.content.res.Resources.getLayout(Resources.java:1170)
at android.view.LayoutInflater.inflate(LayoutInflater.java:421)
at android.widget.ArrayAdapter.createViewFromResource(ArrayAdapter.java:424)
at android.widget.ArrayAdapter.getView(ArrayAdapter.java:415)
at ms2.getView(PG:2)
at android.widget.AbsListView.obtainView(AbsListView.java:3219)
at android.widget.ListView.measureHeightOfChildren(ListView.java:1451)
at android.widget.ListView.onMeasure(ListView.java:1358)
at android.view.View.measure(View.java:24966)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:7139)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:185)
at android.view.View.measure(View.java:24966)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:7139)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:185)
at android.view.View.measure(View.java:24966)
at com.android.internal.widget.AlertDialogLayout.tryOnMeasure(AlertDialogLayout.java:144)
at com.android.internal.widget.AlertDialogLayout.onMeasure(AlertDialogLayout.java:69)
at android.view.View.measure(View.java:24966)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:7139)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:185)
at android.view.View.measure(View.java:24966)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:7139)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:185)
at android.view.View.measure(View.java:24966)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:7139)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:185)
at com.android.internal.policy.DecorView.onMeasure(DecorView.java:992)
at android.view.View.measure(View.java:24966)
at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:3301)
at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:2001)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2330)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1888)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:8511)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:949)
at android.view.Choreographer.doCallbacks(Choreographer.java:761)
at android.view.Choreographer.doFrame(Choreographer.java:696)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:935)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7050)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:965)
Приложение Gradle
ext {
gms = "17.0.0"
supportLibraryVersion = '1.0.0'
appCompatVersion = '1.1.0'
googlePlayServiceVersion = '17.0.0'
firebaseCore = '17.2.1'
firebaseMessaging = '20.1.0'
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.facebook.android:facebook-android-sdk:5.8.0'
implementation "androidx.appcompat:appcompat:$appCompatVersion"
implementation "androidx.gridlayout:gridlayout:$supportLibraryVersion"
implementation "com.google.android.gms:play-services-auth:$googlePlayServiceVersion"
implementation "com.google.android.gms:play-services-analytics:$googlePlayServiceVersion"
implementation "com.squareup.retrofit2:retrofit:$retrofit"
implementation "com.squareup.okhttp3:logging-interceptor:$okhttpInterceptor"
implementation "androidx.cardview:cardview:$supportLibraryVersion"
implementation "androidx.legacy:legacy-support-v4:$supportLibraryVersion"
implementation "com.google.firebase:firebase-core:$firebaseCore"
implementation "com.google.firebase:firebase-messaging:$firebaseMessaging"
implementation "androidx.recyclerview:recyclerview:$appCompatVersion"
}
@SuppressLint({"SetJavaScriptEnabled", "AddJavascriptInterface", "JavascriptInterface"})
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
super.onCreateView(inflater, container, savedInstanceState);
homeActivity.setBackPressListener(this);
final View mParentView = inflater.inflate(R.layout.mfa_webview,
container, false);
webview = (WebView) mParentView.findViewById(R.id.webviewfrag);
webViewForCreateSession = (WebView) mParentView.findViewById(R.id.webViewSession);
webViewForCreateSession.setWebViewClient(new WebViewClient());
webview.setWebChromeClient(new MyWebChromeClient());
webview.setWebViewClient(new ChildBrowserClient());
enableWebSettings(webview);
if (Build.VERSION.SDK_INT > 16) {
webview.addJavascriptInterface(new MyJavaScriptInterface(),
"HTMLOUT");
} else {
webview.addJavascriptInterface(new MyJavaScriptInterfaceBelow17(),
"HTMLOUT");
}
webview.requestFocus();
return mParentView;
}
Я проверил это и это , но не сделал получить любое решение.