Try removing the suffix to your debug mode.
Also, please make sure in proguard rules you have
-keepclassmembers class **.R$* {public static <fields>;}
-keep class **.R$*
EDIT:
After figuring out the problem (the debug app package suffix ".debug"), try to load the file this way:
String path = "android.resource://" + getPackageName() + "/" + R.raw.my_web_file;
Uri myFileUri = Uri.parse(path);
File file = new File(myFileUri.toString());
webview.loadUrl(file.getAbsolutePath());
2nd EDIT:
If that still doesn't work (although for me it works), try this: load the file to the webview using an input stream.
String prompt = "";
try {
InputStream inputStream = getResources().openRawResource(R.raw.my_web_file);
byte[] buffer = new byte[inputStream.available()];
inputStream.read(buffer);
prompt = new String(buffer);
inputStream.close();
} catch (IOException e) {
e.printStackTrace();
}
webview.loadData(prompt,"text/html","utf-8");
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…