我尝试使用 TWA 将我的 pwa 应用程序转换为 android 应用程序[https://developers.google.com/web/updates/2019/02/using-twa][1]
。我遵循了所有步骤。当我单击构建并使用 android 模拟器运行应用程序时,它会出现错误
2019-09-18 15:38:31.942 6870-6870/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.pwa.vayup, PID: 6870
java.lang.IllegalAccessError: Method 'android.os.Bundle android.support.customtabs.CustomTabColorSchemeParams.toBundle()' is inaccessible to class 'androidx.browser.customtabs.CustomTabsIntent$Builder' (declaration of 'androidx.browser.customtabs.CustomTabsIntent$Builder' appears in /data/app/com.pwa.vayup-2/base.apk)
at androidx.browser.customtabs.CustomTabsIntent$Builder.build(CustomTabsIntent.java:746)
at android.support.customtabs.trusted.TrustedWebActivityIntentBuilder.buildCustomTabsIntent(TrustedWebActivityIntentBuilder.java:162)
at android.support.customtabs.trusted.TwaLauncher.launchCct(TwaLauncher.java:135)
at android.support.customtabs.trusted.TwaLauncher.launch(TwaLauncher.java:127)
at android.support.customtabs.trusted.LauncherActivity.onCreate(LauncherActivity.java:134)
at android.app.Activity.performCreate(Activity.java:6662)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2599)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2707)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1460)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6077)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:866)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:756)
2019-09-18 15:38:31.944 1599-2084/? W/ActivityManager: Force finishing activity com.
我检查了许多资源 [ Android App Startup Crash - customtabs.CustomTabsSession.validateRelationship。但是问题没有解决