Рет қаралды 4,813
This video shows how to fix the error "The webpage could not be loaded because: net::ERR_CACHE_MISS" in WebView.
It shows how simply adding the below INTERNET permission in the manifest file solves the issue:
ANGULAR_BRACKETuses-permission android:name="android.permission.INTERNET"/ANGULAR_BRACKET
I hope you like this video. For any questions, suggestions or appreciation please contact us at: programmerworld.co/contact/ or email at: programmerworld1990@gmail.com
Complete source code and other details/ steps of this video are posted in the below link:
programmerworld.co/android/an...
However, the main Java code is copied below also for reference:
package com.programmerworld.webview_error;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
import android.webkit.WebView;
public class MainActivity extends AppCompatActivity {
private WebView webView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
webView = findViewById(R.id.webView);
webView.loadUrl("programmerworld.co");
}
}
-