My problem is that after I added flavors to my project the flavor with a package name different from the actual source seems to have problems with accessing the files in android_res/drawable
.
More specifically I have a html-view that calls the following image.
<img src="file:///android_res/drawable/image.png">
The image shows up in the production flavor that has the package name which is the same as the directory of the java-files but it doesn't work for the beta flavor:
productFlavors {
production {
packageName "com.company.myapp"
}
beta {
packageName "com.company.beta"
}
}
where the actual directory with the java files is
java/com/company/myapp
It is rather strange that this happens since the resources are not even in that folder.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…