file:///android_res/drawable/ not working after changing package name

Used Software:

Android Studio with compileSdkVersion 29


I have this code

wv.loadDataWithBaseURL("file:///android_res/drawable/","<img src='salah.png' >","text/html", "utf-8",""); 
//wv is WebView object

The problem is the image is not display


How to fix it … ?


Open your Application build.gradle and change the applicationId same as the package name

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *