Status Update
Comments
uc...@google.com <uc...@google.com> #2
Android build
Which Android build are you using? (e.g. OPP1.170223.012)
Device used
Which device did you use to reproduce this issue?
Steps to reproduce
What steps are needed to reproduce this issue?
Please provide sample project or apk to reproduce the issue. Also mention the steps to be followed for reproducing the issue with the given sample project or apk.
Android bug report capturing
After reproducing the issue, press the volume up, volume down, and power button simultaneously. This will capture a bug report on your device in the “bug reports” directory. Attach the bug report file to this issue.
Alternate method
After reproducing the issue, navigate to “developer settings”, ensure “USB debugging” is enabled, then enable “Bug report shortcut”. Capture bug report by holding the power button and selecting the “Take bug report” option.
Screen capture of the issue
Press the volume down and power buttons simultaneously. The image will appear in your gallery. Attach the screenshot file to this issue.
NOTE : To avoid leaking private information, please share screenshots and bugreports only in Google Drive. Share files with android-bugreport@google.com and include only Google drive links in your bug. Bug report attachments should not be included directly in issue reports.
je...@google.com <je...@google.com>
ga...@google.com <ga...@google.com> #4
- when long pressing text (e.g. the headline)
- when opening a select
Both will ultimately load an alert dialog with a list adapter that has the layout ids for the content set to 0.
This is reproducible on an API 21 emulator (Nexus 5 configuration, no Chrome installed).
NB There is a second issue when loading the web view in the first place which in this sample project is worked around by using a resource wrapper. This is already reported under
ha...@googlemail.com <ha...@googlemail.com> #5
ha...@googlemail.com <ha...@googlemail.com> #6
We can't do anything to fix this - you need to solve the underlying problem with appcompat and stop wrapping it like this, and then resources will work.
ha...@googlemail.com <ha...@googlemail.com> #7
Surprisingly,
> in Android 6.0 (API 23) it crashes on tapping the <select> element.
---
From
> This change is the root cause:
>
> sAlwaysOverrideConfiguration forces updating the Resources configuration and therby messing up the webview inflation on older devices.
Chis, any chance this checks out? I didn't look too closely into this, so I'm not sure if there are consequences to not overriding the configuration on L-M only, or perhaps further limited old WebView versions only.
je...@google.com <je...@google.com>
ga...@google.com <ga...@google.com> #8
ma...@gmail.com <ma...@gmail.com> #9
ga...@google.com <ga...@google.com> #10
ma...@gmail.com <ma...@gmail.com> #11
ga...@google.com <ga...@google.com> #12
ma...@gmail.com <ma...@gmail.com> #13
Here is one of them.
It will be great if you can take some time to revisit duplicate tickets. I believe a lot of developer are looking for the fix or workaround.
Thank you!
ma...@gmail.com <ma...@gmail.com> #14
ga...@google.com <ga...@google.com> #15
ga...@google.com <ga...@google.com> #16
W/System.err: android.view.WindowManager$BadTokenException: Unable to add window -- token null is not for an application
at android.view.ViewRootImpl.setView(ViewRootImpl.java:566)
at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:282)
at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:85)
at android.app.Dialog.show(Dialog.java:298)
at com.android.org.chromium.content.browser.input.SelectPopupDialog.show(SelectPopupDialog.java:133)
at com.android.org.chromium.content.browser.ContentViewCore.showSelectPopup(ContentViewCore.java:2229)
at com.android.org.chromium.base.SystemMessageHandler.nativeDoRunLoopOnce(Native Method)
at com.android.org.chromium.base.SystemMessageHandler.handleMessage(SystemMessageHandler.java:53)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5254)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
je...@google.com <je...@google.com> #17
ma...@gmail.com <ma...@gmail.com> #19
ma...@gmail.com <ma...@gmail.com> #21
ga...@google.com <ga...@google.com> #22
This is a project created by New Android Project -> Blank Activity -> Add WebView to layout/main_activity.xml, run on API21 emulator and it crashes with the following trace
11-27 14:12:26.160 3218-3218/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.crashingwebview, PID: 3218
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.crashingwebview/com.example.crashingwebview.MainActivity}: android.view.InflateException: Binary XML file line #17: Error inflating class android.webkit.WebView
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2298)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2360)
at android.app.ActivityThread.access$800(ActivityThread.java:144)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1278)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5221)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
Caused by: android.view.InflateException: Binary XML file line #17: Error inflating class android.webkit.WebView
at android.view.LayoutInflater.createView(LayoutInflater.java:633)
at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:55)
at android.view.LayoutInflater.onCreateView(LayoutInflater.java:682)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:741)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:806)
at android.view.LayoutInflater.inflate(LayoutInflater.java:504)
at android.view.LayoutInflater.inflate(LayoutInflater.java:414)
at android.view.LayoutInflater.inflate(LayoutInflater.java:365)
at androidx.appcompat.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:555)
at androidx.appcompat.app.AppCompatActivity.setContentView(AppCompatActivity.java:161)
at com.example.crashingwebview.MainActivity.onCreate(MainActivity.kt:10)
at android.app.Activity.performCreate(Activity.java:5937)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1105)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2251)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2360)
at android.app.ActivityThread.access$800(ActivityThread.java:144)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1278)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5221)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Constructor.newInstance(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:288)
at android.view.LayoutInflater.createView(LayoutInflater.java:607)
at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:55)
at android.view.LayoutInflater.onCreateView(LayoutInflater.java:682)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:741)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:806)
at android.view.LayoutInflater.inflate(LayoutInflater.java:504)
at android.view.LayoutInflater.inflate(LayoutInflater.java:414)
at android.view.LayoutInflater.inflate(LayoutInflater.java:365)
at androidx.appcompat.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:555)
at androidx.appcompat.app.AppCompatActivity.setContentView(AppCompatActivity.java:161)
at com.example.crashingwebview.MainActivity.onCreate(MainActivity.kt:10)
at android.app.Activity.performCreate(Activity.java:5937)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1105)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2251)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2360)
at android.app.ActivityThread.access$800(ActivityThread.java:144)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1278)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5221)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
Caused by: android.content.res.Resources$NotFoundException: String resource ID #0x2040002
at android.content.res.Resources.getText(Resources.java:274)
at android.content.res.Resources.getString(Resources.java:360)
at com.android.org.chromium.content.browser.ContentViewCore.setContainerView(ContentViewCore.java:702)
at com.android.org.chromium.content.browser.ContentViewCore.initialize(ContentViewCore.java:608)
at com.android.org.chromium.android_webview.AwContents.createAndInitializeContentViewCore(AwContents.java:619)
at com.android.org.chromium.android_webview.AwContents.setNewAwContents(AwContents.java:758)
at com.android.org.chromium.android_webview.AwContents.<init>(AwContents.java:608)
at com.android.org.chromium.android_webview.AwContents.<init>(AwContents.java:546)
at com.android.webview.chromium.WebViewChromium.initForReal(WebViewChromium.java:312)
at com.android.webview.chromium.WebViewChromium.access$100(WebViewChromium.java:97)
at com.android.webview.chromium.WebViewChromium$1.run(WebViewChromium.java:264)
at com.android.webview.chromium.WebViewChromium$WebViewChromiumRunQueue.drainQueue(WebViewChromium.java:124)
at com.android.webview.chromium.WebViewChromium$WebViewChromiumRunQueue$1.run(WebViewChromium.java:111)
at com.android.org.chromium.base.ThreadUtils.runOnUiThread(ThreadUtils.java:144)
at com.android.webview.chromium.WebViewChromium$WebViewChromiumRunQueue.addTask(WebViewChromium.java:108)
at com.android.webview.chromium.WebViewChromium.init(WebViewChromium.java:261)
at android.webkit.WebView.<init>(WebView.java:548)
at android.web
changing appcompat library version to 1.1.0-rc01, the app launches with an empty webview without crashing.
ma...@gmail.com <ma...@gmail.com> #23
Anyway, I've found a workaround which I *think* works, at least the tests are now all passing on API 21/22. Apologies for the delay in reaching this. It unfortunately wasn't an easy bug to find a workaround for.
Pending CL:
ga...@google.com <ga...@google.com> #24
Besides, `Context.getAssets()` and `Context.getResources().getAssets()` are returning the same object on latest versions of Android in the same condition. I found that `ContextImpl.getAssets()` is returning `getResources().getAssets()` in the latest source code.
ma...@gmail.com <ma...@gmail.com> #25
ga...@google.com <ga...@google.com>
ma...@gmail.com <ma...@gmail.com> #26
Branch: androidx-master-dev
commit 0850be80d556fc23a6f39a094c923665c24e3de2
Author: Chris Banes <chrisbanes@google.com>
Date: Thu Nov 28 16:39:07 2019
DayNight rewrite v2.5
We've now moved to using createConfigurationContext(),
instead of applyOverrideConfiguration(). Certain older versions
of WebView have an issue when an app uses
applyOverrideConfiguration(), but they seem to work fine
using createConfigurationContext() /shruggie.
To use createConfigurationContext(), I've had to refactor a
lot of updateNightMode() code to also have another entry
point which returns a Context for attachBaseContext().
Test: ./gradlew appcompat:connectedCheck
BUG: 141351441
Change-Id: I7a5b59071f82b79820c6df695bfa622d727f2030
M appcompat/appcompat/api/1.2.0-alpha01.txt
M appcompat/appcompat/api/current.txt
M appcompat/appcompat/api/public_plus_experimental_1.2.0-alpha01.txt
M appcompat/appcompat/api/public_plus_experimental_current.txt
M appcompat/appcompat/src/main/java/androidx/appcompat/app/AppCompatActivity.java
M appcompat/appcompat/src/main/java/androidx/appcompat/app/AppCompatDelegate.java
M appcompat/appcompat/src/main/java/androidx/appcompat/app/AppCompatDelegateImpl.java
M samples/Support7Demos/src/main/res/layout/appcompat_night_mode.xml
M samples/Support7Demos/src/main/res/values/strings.xml
ga...@google.com <ga...@google.com> #27
This should be out in AppCompat v1.2.0-alpha02
.
If you'd like to try this now, you can try the 1.2.0-SNAPSHOT
version, available at the following repository:
repositories {
maven {
url 'https://ci.android.com/builds/submitted/6043188/androidx_snapshot/latest/repository/'
}
}
jw...@gmail.com <jw...@gmail.com> #28
ga...@google.com <ga...@google.com> #29
dr...@gmail.com <dr...@gmail.com> #30
#29: Probably not. The fix is quite invasive and moves AppCompat to using yet-another-way to implement custom configuration handling. The change itself may uncover more issues so we need some soak time in alpha.
jw...@gmail.com <jw...@gmail.com> #31
dr...@gmail.com <dr...@gmail.com> #32
Hmmm, confirmed. Looks like my change didn't actually make it into the snapshot I listed above. /facepalm I just tried the latest snapshot repository available, and that is working:
androidx.appcompat:appcompat:1.2.0-SNAPSHOT
repositories {
maven {
url 'https://ci.android.com/builds/submitted/6052626/androidx_snapshot/latest/repository/'
}
}
ma...@gmail.com <ma...@gmail.com> #33
ga...@google.com <ga...@google.com> #34
I know there are lots of people getting mail on each comment, apologies, but I wanted to confirm that the fix will still be landing in 1.2.0-alpha02? I'll be ready to test it but don't waste the time if the last couple comments mean it will be in the release after alpha02 now
Thanks!
ma...@gmail.com <ma...@gmail.com> #35
Yep, should be in 1.2.0-alpha02
.
The last few comments are just about the snapshots release.
ga...@google.com <ga...@google.com> #36
ma...@gmail.com <ma...@gmail.com> #37
`1.2.0-alpha02` still not release in google maven. When you'll release this modification for everyone?
ga...@google.com <ga...@google.com> #38
The desire to let this change "soak" because it is a major implementation change suggests that I am probably better with "the devil I know," and should stay with the alpha01 release, particularly since it is only an issue on Android 5 and only triggered by a particular activity that is not routinely performed by most users.
Thoughts?
ma...@gmail.com <ma...@gmail.com> #39
ga...@google.com <ga...@google.com> #40
ma...@gmail.com <ma...@gmail.com> #41
ga...@google.com <ga...@google.com> #42
ja...@gmail.com <ja...@gmail.com> #43
Thanks for any info.
ja...@gmail.com <ja...@gmail.com> #44
Apologies for the delay in releasing, it slipped through the cracks. AppCompat 1.2.0-alpha02 is currently scheduled for release later this week, but may slip to next week.
ja...@gmail.com <ja...@gmail.com> #46
st...@gmail.com <st...@gmail.com> #47
This is the crash when i press (NOT LONG PRESS) and select a popup:
W/System.err: android.view.WindowManager$BadTokenException: Unable to add window -- token null is not for an application
W/System.err: at android.view.ViewRootImpl.setView(ViewRootImpl.java:566)
at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:282)
at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:85)
at android.app.Dialog.show(Dialog.java:298)
at com.android.org.chromium.content.browser.input.SelectPopupDialog.show(SelectPopupDialog.java:133)
at com.android.org.chromium.content.browser.ContentViewCore.showSelectPopup(ContentViewCore.java:2229)
W/System.err: at com.android.org.chromium.base.SystemMessageHandler.nativeDoRunLoopOnce(Native Method)
at com.android.org.chromium.base.SystemMessageHandler.handleMessage(SystemMessageHandler.java:53)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5254)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
ja...@gmail.com <ja...@gmail.com> #49
Hey guys
If you have this argument
Wrapping Resources is not supported by the framework and you must not create your own instances of Resources at all (the APIs to do so are now marked deprecated after they were accidentally exposed).
Then you must supply a way to implement custom translations, there are many companies out there using translations on the runtime via 3rd party integration. How can we dynamically intercept the "getString" calls?
st...@gmail.com <st...@gmail.com> #51
Then you must supply a way to implement custom translations, there are many companies out there using translations on the runtime via 3rd party integration. How can we dynamically intercept the "getString" calls?
From the changelog:
st...@gmail.com <st...@gmail.com> #52
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3534)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3689)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:140)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:100)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2239)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:227)
at android.app.ActivityThread.main(ActivityThread.java:7822)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1026)
je...@google.com <je...@google.com> #53
Happened in a webview when long press
Model Name: P8 Lite
Manufacturer: Huawei
Android Version: Android 5.0
Native platform: armeabi-v7a
FATAL EXCEPTION: Thread-1182
android.content.res.Resources$NotFoundException: String resource ID #0x3040002
at android.content.res.HwResources.getText(HwResources.java:1252)
at android.content.res.Resources.getString(Resources.java:374)
at com.android.org.chromium.content.browser.ContentViewCore.setContainerView(ContentViewCore.java:948)
at com.android.org.chromium.content.browser.ContentViewCore.initialize(ContentViewCore.java:848)
at com.android.org.chromium.android_webview.AwContents.createAndInitializeContentViewCore(AwContents.java:649)
at com.android.org.chromium.android_webview.AwContents.setNewAwContents(AwContents.java:788)
at com.android.org.chromium.android_webview.AwContents.<init>(AwContents.java:635)
at com.android.org.chromium.android_webview.AwContents.<init>(AwContents.java:573)
at com.android.webview.chromium.WebViewChromium.initForReal(WebViewChromium.java:315)
at com.android.webview.chromium.WebViewChromium.access$100(WebViewChromium.java:100)
at com.android.webview.chromium.WebViewChromium$1.run(WebViewChromium.java:267)
at com.android.webview.chromium.WebViewChromium$WebViewChromiumRunQueue.drainQueue(WebViewChromium.java:127)
at com.android.webview.chromium.WebViewChromium$WebViewChromiumRunQueue$1.run(WebViewChromium.java:114)
at com.android.org.chromium.base.ThreadUtils.runOnUiThread(ThreadUtils.java:144)
at com.android.webview.chromium.WebViewChromium$WebViewChromiumRunQueue.addTask(WebViewChromium.java:111)
at com.android.webview.chromium.WebViewChromium.init(WebViewChromium.java:264)
at android.webkit.WebView.<init>(WebView.java:548)
ja...@gmail.com <ja...@gmail.com> #54
Any guidance?
[Deleted User] <[Deleted User]> #55
za...@gmail.com <za...@gmail.com> #56
at android.content.res.Resources.getText(Resources.java:318)
at android.content.res.VivoResources.getText(VivoResources.java:123)
at android.content.res.Resources.getString(Resources.java:404)
at com.android.org.chromium.content.browser.ContentViewCore.setContainerView(ContentViewCore.java:694)
at com.android.org.chromium.content.browser.ContentViewCore.initialize(ContentViewCore.java:618)
at com.android.org.chromium.android_webview.AwContents.createAndInitializeContentViewCore(AwContents.java:631)
at com.android.org.chromium.android_webview.AwContents.setNewAwContents(AwContents.java:780)
at com.android.org.chromium.android_webview.AwContents.<init>(AwContents.java:619)
at com.android.org.chromium.android_webview.AwContents.<init>(AwContents.java:556)
at com.android.webview.chromium.WebViewChromium.initForReal(WebViewChromium.java:312)
at com.android.webview.chromium.WebViewChromium.access$100(WebViewChromium.java:96)
at com.android.webview.chromium.WebViewChromium$1.run(WebViewChromium.java:264)
at com.android.webview.chromium.WebViewChromium$WebViewChromiumRunQueue.drainQueue(WebViewChromium.java:123)
at com.android.webview.chromium.WebViewChromium$WebViewChromiumRunQueue$1.run(WebViewChromium.java:110)
at com.android.org.chromium.base.ThreadUtils.runOnUiThread(ThreadUtils.java:144)
at com.android.webview.chromium.WebViewChromium$WebViewChromiumRunQueue.addTask(WebViewChromium.java:107)
at com.android.webview.chromium.WebViewChromium.init(WebViewChromium.java:261)
at android.webkit.WebView.<init>(WebView.java:554)
at android.webkit.WebView.<init>(WebView.java:489)
at android.webkit.WebView.<init>(WebView.java:472)
at android.webkit.WebView.<init>(WebView.java:459)
[Deleted User] <[Deleted User]> #57
appcompat 1.2.0
12-16 14:39:57.971 14769-14769 W/ResourceType: No known package when getting value for resource number 0x02090000
12-16 14:39:57.971 14769-14769 W/System.err: android.content.res.Resources$NotFoundException: Resource ID #0x2090000
12-16 14:39:57.973 14769-14769 W/System.err: at android.content.res.Resources.getValue(Resources.java:1566)
12-16 14:39:57.973 14769-14769 W/System.err: at android.content.res.Resources.loadXmlResourceParser(Resources.java:3147)
12-16 14:39:57.973 14769-14769 W/System.err: at android.content.res.Resources.getLayout(Resources.java:1322)
12-16 14:39:57.973 14769-14769 W/System.err: at android.view.MenuInflater.inflate(MenuInflater.java:107)
12-16 14:39:57.973 14769-14769 W/System.err: at androidx.appcompat.view.SupportMenuInflater.inflate(SupportMenuInflater.java:120)
12-16 14:39:57.973 14769-14769 W/System.err: at org.chromium.content.browser.SelectActionModeCallback.createActionMenu(SelectActionModeCallback.java:123)
12-16 14:39:57.973 14769-14769 W/System.err: at org.chromium.content.browser.SelectActionModeCallback.onCreateActionMode(SelectActionModeCallback.java:104)
12-16 14:39:57.973 14769-14769 W/System.err: at com.android.internal.policy.impl.PhoneWindow$DecorView$ActionModeCallbackWrapper.onCreateActionMode(PhoneWindow.java:3511)
12-16 14:39:57.973 14769-14769 W/System.err: at androidx.appcompat.view.SupportActionModeWrapper$CallbackWrapper.onCreateActionMode(SupportActionModeWrapper.java:159)
12-16 14:39:57.973 14769-14769 W/System.err: at androidx.appcompat.app.AppCompatDelegateImpl$ActionModeCallbackWrapperV9.onCreateActionMode(AppCompatDelegateImpl.java:2678)
12-16 14:39:57.973 14769-14769 W/System.err: at androidx.appcompat.app.AppCompatDelegateImpl.startSupportActionModeFromWindow(AppCompatDelegateImpl.java:1324)
12-16 14:39:57.973 14769-14769 W/System.err: at androidx.appcompat.app.AppCompatDelegateImpl.startSupportActionMode(AppCompatDelegateImpl.java:1209)
12-16 14:39:57.973 14769-14769 W/System.err: at androidx.appcompat.app.AppCompatDelegateImpl$AppCompatWindowCallback.startAsSupportActionMode(AppCompatDelegateImpl.java:3146)
12-16 14:39:57.973 14769-14769 W/System.err: at androidx.appcompat.app.AppCompatDelegateImpl$AppCompatWindowCallback.onWindowStartingActionMode(AppCompatDelegateImpl.java:3128)
12-16 14:39:57.973 14769-14769 W/System.err: at com.android.internal.policy.impl.PhoneWindow$DecorView.startActionMode(PhoneWindow.java:2896)
12-16 14:39:57.973 14769-14769 W/System.err: at com.android.internal.policy.impl.PhoneWindow$DecorView.startActionModeForChild(PhoneWindow.java:2879)
12-16 14:39:57.973 14769-14769 W/System.err: at android.view.ViewGroup.startActionModeForChild(ViewGroup.java:732)
12-16 14:39:57.973 14769-14769 W/System.err: at android.view.ViewGroup.startActionModeForChild(ViewGroup.java:732)
12-16 14:39:57.973 14769-14769 W/System.err: at android.view.ViewGroup.startActionModeForChild(ViewGroup.java:732)
12-16 14:39:57.973 14769-14769 W/System.err: at android.view.ViewGroup.startActionModeForChild(ViewGroup.java:732)
12-16 14:39:57.973 14769-14769 W/System.err: at android.view.ViewGroup.startActionModeForChild(ViewGroup.java:732)
12-16 14:39:57.973 14769-14769 W/System.err: at android.view.ViewGroup.startActionModeForChild(ViewGroup.java:732)
12-16 14:39:57.973 14769-14769 W/System.err: at android.view.ViewGroup.startActionModeForChild(ViewGroup.java:732)
12-16 14:39:57.973 14769-14769 W/System.err: at android.view.ViewGroup.startActionModeForChild(ViewGroup.java:732)
12-16 14:39:57.973 14769-14769 W/System.err: at android.view.ViewGroup.startActionModeForChild(ViewGroup.java:732)
12-16 14:39:57.973 14769-14769 W/System.err: at android.view.ViewGroup.startActionModeForChild(ViewGroup.java:732)
12-16 14:39:57.973 14769-14769 W/System.err: at android.view.View.startActionMode(View.java:4975)
12-16 14:39:57.973 14769-14769 W/System.err: at org.chromium.content.browser.ContentViewCore.showSelectActionBar(ContentViewCore.java:2149)
12-16 14:39:57.973 14769-14769 W/System.err: at org.chromium.content.browser.ContentViewCore.onSelectionEvent(ContentViewCore.java:2206)
12-16 14:39:57.973 14769-14769 W/System.err: at org.chromium.android_webview.AwContents.nativeOnDraw(Native Method)
12-16 14:39:57.973 14769-14769 W/System.err: at org.chromium.android_webview.AwContents.access$4300(AwContents.java:90)
12-16 14:39:57.974 14769-14769 W/System.err: at org.chromium.android_webview.AwContents$AwViewMethodsImpl.onDraw(AwContents.java:2663)
12-16 14:39:57.974 14769-14769 W/System.err: at org.chromium.android_webview.AwContents.onDraw(AwContents.java:1132)
12-16 14:39:57.974 14769-14769 W/System.err: at com.android.webview.chromium.WebViewChromium.onDraw(WebViewChromium.java:1601)
12-16 14:39:57.974 14769-14769 W/System.err: at android.webkit.WebView.onDraw(WebView.java:2531)
12-16 14:39:57.974 14769-14769 W/System.err: at android.view.View.draw(View.java:15526)
12-16 14:39:57.974 14769-14769 W/System.err: at android.view.View.updateDisplayListIfDirty(View.java:14415)
12-16 14:39:57.974 14769-14769 W/System.err: at android.view.View.getDisplayList(View.java:14444)
12-16 14:39:57.974 14769-14769 W/System.err: at android.view.View.draw(View.java:15235)
12-16 14:39:57.974 14769-14769 W/System.err: at android.view.ViewGroup.drawChild(ViewGroup.java:3548)
12-16 14:39:57.974 14769-14769 W/System.err: at android.view.ViewGroup.dispatchDraw(ViewGroup.java:3341)
12-16 14:39:57.974 14769-14769 W/System.err: at android.view.View.updateDisplayListIfDirty(View.java:14407)
12-16 14:39:57.974 14769-14769 W/System.err: at android.view.View.getDisplayList(View.java:14444)
12-16 14:39:57.974 14769-14769 W/System.err: at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3532)
12-16 14:39:57.974 14769-14769 W/System.err: at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3511)
12-16 14:39:57.974 14769-14769 W/System.err: at android.view.View.updateDisplayListIfDirty(View.java:14365)
12-16 14:39:57.974 14769-14769 W/System.err: at android.view.View.getDisplayList(View.java:14444)
12-16 14:39:57.974 14769-14769 W/System.err: at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3532)
12-16 14:39:57.974 14769-14769 W/System.err: at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3511)
12-16 14:39:57.974 14769-14769 W/System.err: at android.view.View.updateDisplayListIfDirty(View.java:14365)
12-16 14:39:57.974 14769-14769 W/System.err: at android.view.View.getDisplayList(View.java:14444)
12-16 14:39:57.974 14769-14769 W/System.err: at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3532)
12-16 14:39:57.974 14769-14769 W/System.err: at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3511)
12-16 14:39:57.974 14769-14769 W/System.err: at android.view.View.updateDisplayListIfDirty(View.java:14365)
12-16 14:39:57.974 14769-14769 W/System.err: at android.view.View.getDisplayList(View.java:14444)
12-16 14:39:57.974 14769-14769 W/System.err: at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3532)
12-16 14:39:57.974 14769-14769 W/System.err: at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3511)
12-16 14:39:57.974 14769-14769 W/System.err: at android.view.View.updateDisplayListIfDirty(View.java:14365)
12-16 14:39:57.974 14769-14769 W/System.err: at android.view.View.getDisplayList(View.java:14444)
12-16 14:39:57.974 14769-14769 W/System.err: at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3532)
12-16 14:39:57.974 14769-14769 W/System.err: at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3511)
12-16 14:39:57.974 14769-14769 W/System.err: at android.view.View.updateDisplayListIfDirty(View.java:14365)
12-16 14:39:57.974 14769-14769 W/System.err: at android.view.View.getDisplayList(View.java:14444)
12-16 14:39:57.974 14769-14769 W/System.err: at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3532)
12-16 14:39:57.974 14769-14769 W/System.err: at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3511)
12-16 14:39:57.974 14769-14769 W/System.err: at android.view.View.updateDisplayListIfDirty(View.java:14365)
12-16 14:39:57.974 14769-14769 W/System.err: at android.view.View.getDisplayList(View.java:14444)
12-16 14:39:57.974 14769-14769 W/System.err: at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3532)
12-16 14:39:57.974 14769-14769 W/System.err: at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3511)
12-16 14:39:57.974 14769-14769 W/System.err: at android.view.View.updateDisplayListIfDirty(View.java:14365)
12-16 14:39:57.974 14769-14769 W/System.err: at android.view.View.getDisplayList(View.java:14444)
12-16 14:39:57.974 14769-14769 W/System.err: at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3532)
12-16 14:39:57.974 14769-14769 W/System.err: at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3511)
12-16 14:39:57.974 14769-14769 W/System.err: at android.view.View.updateDisplayListIfDirty(View.java:14365)
12-16 14:39:57.974 14769-14769 W/System.err: at android.view.View.getDisplayList(View.java:14444)
12-16 14:39:57.975 14769-14769 W/System.err: at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3532)
12-16 14:39:57.975 14769-14769 W/System.err: at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3511)
12-16 14:39:57.975 14769-14769 W/System.err: at android.view.View.updateDisplayListIfDirty(View.java:14365)
12-16 14:39:57.975 14769-14769 W/System.err: at android.view.View.getDisplayList(View.java:14444)
12-16 14:39:57.975 14769-14769 W/System.err: at android.view.ViewGroup.recreateChildDisplayList(ViewGroup.java:3532)
12-16 14:39:57.975 14769-14769 W/System.err: at android.view.ViewGroup.dispatchGetDisplayList(ViewGroup.java:3511)
12-16 14:39:57.975 14769-14769 W/System.err: at android.view.View.updateDisplayListIfDirty(View.java:14365)
12-16 14:39:57.975 14769-14769 W/System.err: at android.view.View.getDisplayList(View.java:14444)
12-16 14:39:57.975 14769-14769 W/System.err: at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:279)
12-16 14:39:57.975 14769-14769 W/System.err: at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:285)
12-16 14:39:57.975 14769-14769 W/System.err: at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:335)
12-16 14:39:57.975 14769-14769 W/System.err: at android.view.ViewRootImpl.draw(ViewRootImpl.java:3051)
12-16 14:39:57.975 14769-14769 W/System.err: at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:2864)
12-16 14:39:57.975 14769-14769 W/System.err: at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2448)
12-16 14:39:57.975 14769-14769 W/System.err: at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1351)
12-16 14:39:57.975 14769-14769 W/System.err: at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6820)
12-16 14:39:57.975 14769-14769 W/System.err: at android.view.Choreographer$CallbackRecord.run(Choreographer.java:804)
12-16 14:39:57.975 14769-14769 W/System.err: at android.view.Choreographer.doCallbacks(Choreographer.java:607)
12-16 14:39:57.975 14769-14769 W/System.err: at android.view.Choreographer.doFrame(Choreographer.java:576)
12-16 14:39:57.975 14769-14769 W/System.err: at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:790)
12-16 14:39:57.975 14769-14769 W/System.err: at android.os.Handler.handleCallback(Handler.java:815)
12-16 14:39:57.975 14769-14769 W/System.err: at android.os.Handler.dispatchMessage(Handler.java:104)
12-16 14:39:57.975 14769-14769 W/System.err: at android.os.Looper.loop(Looper.java:224)
12-16 14:39:57.975 14769-14769 W/System.err: at android.app.ActivityThread.main(ActivityThread.java:5958)
12-16 14:39:57.975 14769-14769 W/System.err: at java.lang.reflect.Method.invoke(Native Method)
12-16 14:39:57.975 14769-14769 W/System.err: at java.lang.reflect.Method.invoke(Method.java:372)
12-16 14:39:57.975 14769-14769 W/System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1113)
12-16 14:39:57.975 14769-14769 W/System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:879)
le...@gmail.com <le...@gmail.com> #58
"ApkAssets{path=/product/app/WebViewGoogle/WebViewGoogle.apk}"
"ApkAssets{path=/product/app/TrichromeLibrary/TrichromeLibrary.apk}"
ja...@gmail.com <ja...@gmail.com> #60
Process: cz.rohlik.app.debug, PID: 26786
android.content.res.Resources$NotFoundException: Resource ID #0x20c0006
at android.content.res.ResourcesImpl.getValue(ResourcesImpl.java:225)
at android.content.res.Resources.getInteger(Resources.java:1192)
at WV.p5.onCreateActionMode(chromium-TrichromeWebViewGoogle6432.apk-stable-609919332:52)
at com.android.internal.policy.DecorView$ActionModeCallback2Wrapper.onCreateActionMode(DecorView.java:2722)
at com.android.internal.policy.DecorView.startActionMode(DecorView.java:926)
at com.android.internal.policy.DecorView.startActionModeForChild(DecorView.java:882)
at android.view.ViewGroup.startActionModeForChild(ViewGroup.java:1035)
at android.view.ViewGroup.startActionModeForChild(ViewGroup.java:1035)
at android.view.ViewGroup.startActionModeForChild(ViewGroup.java:1035)
at android.view.ViewGroup.startActionModeForChild(ViewGroup.java:1035)
at android.view.ViewGroup.startActionModeForChild(ViewGroup.java:1035)
at android.view.ViewGroup.startActionModeForChild(ViewGroup.java:1035)
at android.view.ViewGroup.startActionModeForChild(ViewGroup.java:1035)
at android.view.ViewGroup.startActionModeForChild(ViewGroup.java:1035)
at android.view.View.startActionMode(View.java:7654)
at org.chromium.content.browser.selection.SelectionPopupControllerImpl.F(chromium-TrichromeWebViewGoogle6432.apk-stable-609919332:84)
at org.chromium.content.browser.selection.SelectionPopupControllerImpl.I(chromium-TrichromeWebViewGoogle6432.apk-stable-609919332:138)
at WV.EM.a(chromium-TrichromeWebViewGoogle6432.apk-stable-609919332:38)
at WV.qO.g(chromium-TrichromeWebViewGoogle6432.apk-stable-609919332:7)
at WV.n4.run(chromium-TrichromeWebViewGoogle6432.apk-stable-609919332:14)
at android.os.MessageQueue.nativePollOnce(Native Method)
at android.os.MessageQueue.next(MessageQueue.java:335)
at android.os.Looper.loopOnce(Looper.java:161)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7870)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)
vy...@pinterest.com <vy...@pinterest.com> #61
cm...@google.com <cm...@google.com>
gl...@fitbit.com <gl...@fitbit.com> #62
cm...@google.com <cm...@google.com> #63
All the changes needed are submitted to the four components (build tools, MultidexTestRunner, AndroidJunitRunner and android gradle plugin) and we'll update this bug as soon as it is released, so it will be in Android Gradle Plugin 3.1.
Note that both the deprecated MultiDexTestRunner and the replacement AndroidJUnitRunner will support legacy multidex test APKs
sz...@gmail.com <sz...@gmail.com> #64
Doing it in 3.1 will require everyone who wants to have multidex for test APK working to start using unstable version of AS and AGP.
zt...@gmail.com <zt...@gmail.com> #65
> `Using multidex to create a test APK is not currently supported.`
cm...@google.com <cm...@google.com>
ga...@google.com <ga...@google.com> #66
ja...@gmail.com <ja...@gmail.com> #67
an...@gmail.com <an...@gmail.com> #68
le...@gmail.com <le...@gmail.com> #69
[Deleted User] <[Deleted User]> #70
[Deleted User] <[Deleted User]> #71
[Deleted User] <[Deleted User]> #72
ga...@google.com <ga...@google.com> #73
You need to use Android plugin for Gradle 3.1.0-alpha04+, any compatible version of Gradle (e.g. 4.4) and BuildTools (e.g. 27.0.3). Multidex library 1.0.2 will be added by the plugin as a dependency automatically. With this, your build will be successful.
To run tests successfully, the test runner needs to support legacy test APK. AndroidJUnitRunner supports that, so you can use that.
ma...@gmail.com <ma...@gmail.com> #74
For example following your suggestion of tl;dr version the test crashes because some files are not found in the main dex file during the app start:
01-09 10:31:06.965 4861-4861/? W/dalvikvm: Class resolved by unexpected DEX: Ltimber/log/Timber$Tree;(0xa75def58):0x99f02000 ref [Lcom/google/devtools/build/android/desugar/runtime/ThrowableExtension;] Lcom/google/devtools/build/android/desugar/runtime/ThrowableExtension;(0xa75def58):0x99caf000
01-09 10:31:06.965 4861-4861/? W/dalvikvm: (Ltimber/log/Timber$Tree; had used a different Lcom/google/devtools/build/android/desugar/runtime/ThrowableExtension; during pre-verification)
01-09 10:31:06.965 4861-4861/? D/AndroidRuntime: Shutting down VM
01-09 10:31:06.965 4861-4861/? W/dalvikvm: threadid=1: thread exiting with uncaught exception (group=0xa66de228)
01-09 10:31:06.975 4861-4861/? E/InstrumentationResultPrinter: Failed to mark test No Tests as finished after process crash
01-09 10:31:06.975 4861-4861/? E/MonitoringInstr: Exception encountered by: Thread[main,5,main]. Dumping thread state to outputs and pining for the fjords.
java.lang.IllegalAccessError: Class ref in pre-verified class resolved to unexpected implementation
at timber.log.Timber$Tree.getStackTraceString(Timber.java:569)
at timber.log.Timber$Tree.prepareLog(Timber.java:544)
at timber.log.Timber$Tree.i(Timber.java:452)
at timber.log.Timber$1.i(Timber.java:288)
at timber.log.Timber.i(Timber.java:63)
Do you have any idea where does this pops out from?
ga...@google.com <ga...@google.com> #75
This seems to be Java 8 specific bug, and I've filled
st...@gmail.com <st...@gmail.com> #76
fu...@gmail.com <fu...@gmail.com> #77
[Deleted User] <[Deleted User]> #78
[Deleted User] <[Deleted User]> #79
[Deleted User] <[Deleted User]> #80
Until recently we had a big module, with all our code + all our instrurmentation tests code. Then we could check and the plugin (3.1.alpha and 3.1) work well to enable multidex in tests apks.
But we recently dissociated this big module: one contains the production code, the other one contains the instrumentation code. And then, the new plugin breaks: we can still a multidex production app, but the instrumentation test apk is not generated. We hit the 65K limit and the build reports this as an issue. Also, the android test don't have a task: transformClassesWithMultidexlistFor<variant>AndroidTest
What can go wrong ?
[Deleted User] <[Deleted User]> #81
* a few classes in production code
* quite a lot of classes of instrumentation tests
The module_apk wires together all other modules that are all library modules.
When adding multidexEnabled to module_apk, the production apk is multidexed, but not the test apk. There is no transform / task for the AndroidTest variant related to multidex.
When adding multidexEnabled to all default configuration of all modules, all of them have both instrumentation and production multidex tasks & transformations, all except module_apk...
We have no idea what is going wrong.
ga...@google.com <ga...@google.com> #82
I've filled
[Deleted User] <[Deleted User]> #83
Execution failed for task ':app:transformClassesWithMultidexlistForLive'.
> com.android.build.api.transform.TransformException: Error while generating the main dex list.
ga...@google.com <ga...@google.com> #84
pe...@layer.com.c-02odbdyf.appstempdomain.goog <pe...@layer.com.c-02odbdyf.appstempdomain.goog> #85
pa...@gmail.com <pa...@gmail.com> #86
ga...@google.com <ga...@google.com> #87
Yes, please file a new bug, and paste the link here. Issue in #78 was due to a custom plugin which would disable multidex. Thanks!
Description
Build #AI-171.3870562, built on April 1, 2017
JRE: 1.8.0_112-release-b736 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
gradle-3.4.1
classpath 'com.android.tools.build:gradle:2.4.0-alpha4'
buildTools : '25.0.1',
compileSdk : 25,
javaVersion: JavaVersion.VERSION_1_8,
minSdk : 16,
targetSdk : 25
Multidex is setup and works fine (compile, assemble and espresso test) with:
classpath 'com.android.tools.build:gradle:2.3.0'
When we bump up to 2.4 alpha 4 we get multidex issue when we try to run the tests:
(I repeat multidex is setup properly and everything works fine on plugin 2.3.0)
This is a scaffold-like very close to our project setup that I created to reproduce various gradle issues we encounter with our enteprise project:
(sadly I did not update it and maintain it in some time I can refresh it if you really need it or feel free to fork or PR)
This is the stacktrace of the issue
This is the command I ran on our project (should be the same on example project I attached)
./gradlew clean connectedNonpayUnitedStatesBleedingDebugAndroidTest --stacktrace
but I repeat I do not know yet does that project compiles even with the new plugin I can update it later on if you need it.