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

Used Software:

Android Studio with compileSdkVersion 29

Problem:

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

Question:

How to fix it … ?

Answer:

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 *