Assigned
Status Update
Comments
ra...@google.com <ra...@google.com> #2
Same here. I have links in a local html file referencing file:///android_res/drawable/ and on all gradle build flavors using another applicationId (added suffix) the Webview only shows broken links.
This behaviour seems not to be connected solely to Android 5.0 since it occurs on Android 4.4.4 too (tested with current cyanogenmod 11 build).
This behaviour seems not to be connected solely to Android 5.0 since it occurs on Android 4.4.4 too (tested with current cyanogenmod 11 build).
ro...@duosecurity.com <ro...@duosecurity.com> #3
As a hotfix I added the following code to the gradle buildscript, which generates an additional R.java with changed java package for every flavor. I don't like this solution though.
android.applicationVariants.all{ variant ->
variant.javaCompile.doFirst{
copy {
from "${buildDir}/generated/source/r/${variant.dirName}/com/example/application/R.java"
into "${buildDir}/generated/source/r/${variant.dirName}/com/example/application/${variant.buildType.name }/"
}
File rFile = file("${buildDir}/generated/source/r/${variant.dirName}/com/example/application/${variant.buildType.name }/R.java")
String content = rFile.getText('UTF-8')
String newPackageName = "com.example.application.${variant.buildType.name }";
content = content.replaceAll(/com.example.application/, newPackageName)
rFile.write(content, 'UTF-8')
}
}
android.applicationVariants.all{ variant ->
variant.javaCompile.doFirst{
copy {
from "${buildDir}/generated/source/r/${variant.dirName}/com/example/application/R.java"
into "${buildDir}/generated/source/r/${variant.dirName}/com/example/application/${
}
File rFile = file("${buildDir}/generated/source/r/${variant.dirName}/com/example/application/${
String content = rFile.getText('UTF-8')
String newPackageName = "com.example.application.${
content = content.replaceAll(/com.example.application/, newPackageName)
rFile.write(content, 'UTF-8')
}
}
ra...@google.com <ra...@google.com> #4
I've recenly encountered this issue and I must say it's quite a nuisance. Searched half of the Internet just to find out that the problem lies in Gradle's applicationIdSuffix :). I think this bug should be reported to Android SDK Build Tools devs, because only they can do something about it.
ro...@gmail.com <ro...@gmail.com> #5
IMHO it's the case of Android platform problem. Resources are packed, WebView tries to load them from wrong place. It's not build tools that put them in wrong place.
And by the way it's very frustrating bug.
And by the way it's very frustrating bug.
ro...@duosecurity.com <ro...@duosecurity.com> #6
[Comment deleted]
Description
Copied from previous ticket below:
Android device name: Pixel 7
Android OS version: 14
Android System WebView version: 130.0.6723.107
Application: com.duosecurity.duomobile
Application version: 4.77.0
Steps to reproduce:
1. Spin up local web server in-app running on localhost and port of choice
2. Ping local web server from HTTPS site running in a WebView inside someone else's application (think logging into outlook mobile).
3. ! Unable to ping local server due to cleartext traffic being blocked !
Expected result:
Since localhost is a potentially trustworthy domain, this issue doesn't exist in Chrome Mobile on Android (cleartext traffic from an HTTPS site to localhost is allowed), trusted CAs won't generate a certificate for localhost, and leveraging certificates from inside client-side apps risks certificate revocation and is frowned upon we expect cleartext HTTP traffic from an HTTPS site to localhost to be allowed (regardless of an application's network security config).
Actual result:
Cleartext traffic to localhost is blocked by the network security configuration of whatever app a site attempting to ping localhost is running in
Did this work before?
This works in webviews prior to network security config and if the network security config doesn't block cleartext traffic