The best programming blog.

Covering a wide array of programming topics.

Blank screen on WordPress add edit page

Issue: While opening the WordPress site a blank screen is coming with the following error in Chrome Dev Tools: Unchecked runtime.lastError: The message port closed before a response was received. post-new.php:1 Unchecked runtime.lastError: The message port closed before a response was received. post-new.php:1 Unchecked runtime.lastError: The message port closed before a response was received. jquery-migrate.min.js?ver=3.3.2:2…More

How to override styles on WordPress site

Go to admin dashboard: /wp-admin/index.php Go to Appearance > Customize. Click Addition CSS menu: In the Addition CSS input box enter the styles you want to override in the WordPress theme: Click Publish button. Your custom styles will be applied to your WordPress site now.More

Ionic No provider for HttpClient

Error while opening an Ionic page: core.js:6456 ERROR Error: Uncaught (in promise): NullInjectorError: R3InjectorError(LoginWithEmailPageModule)[…Service -> ……Service -> HttpClient -> HttpClient -> HttpClient]: NullInjectorError: No provider for HttpClient! NullInjectorError: R3InjectorError(…….PageModule)[…..Service -> UserSignupService -> HttpClient -> HttpClient -> HttpClient]: NullInjectorError: No provider for HttpClient! The solution is to add HttpClientModule in the imports of app.module.ts file. The…More

Android Gradle plugin requires Java 11 to run

While running the Android app if you are getting the following error: Caused by: com.android.builder.errors.EvalIssueException: Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8. You can try some of the following options: changing the IDE settings. changing the JAVA_HOME environment variable. changing org.gradle.java.home in gradle.properties. Here is the fix for…More

Deploying app-debug.apk to stuck in Ionic Android

App stuck at Deploying app-debug.apk to … Open your android folder of Ionic project in Android Studio. Go to Devivce manager. You will notivce that the image you are trying to run will have 0 MB space on the disk. Delete the AVD: Click Create device button in Device Manager. Continue to this step even…More

Could not find tools.jar. Ionic Android

If you are getting the following error while running npx cap run android > Could not find tools.jar. Please check that /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home contains a valid JDK installation. then you need to follow the following steps to fix that issue: Install JDK. The steps ccould be different for your machine. You can follow https://www.oracle.com/java/technologies/downloads/#java8 for…More

How to install JDK on MAC ARM

Go to JDK download page. Downloading the JDK can prompt you to login or create an account on Orcale site. After login you will be able to download the dmg. Install the dmg. After installation the jdk will be installed at the following location: /Library/Java/JavaVirtualMachines: Set the Java_Home path now. Run the following command: export…More

How to add Android platform to Ionic project

Run the following commands to add Android platform to your ionic project Install the @capacitor/core package. npm install @capacitor/core Install capacitor cli: npm install @capacitor/cli –save-dev Install the capacitor/android package npm install @capacitor/android Add the ios platform: npx cap add android A new folder with name android will be added to your Ionic project:More

Ionic Android ERR_UNSUPPORTED_API_LEVEL: Unsupported API level

While adding android platform to your Ionic project if you are getting the following error: ERR_UNSUPPORTED_API_LEVEL: Unsupported API level: [error] native-run failed with error The solution is to to install the missing SDK or a lower one from Android Studio. Go to Android Studio > Preferences > Appearance & Behavior > System Settings > Android…More