Error running android project emulator

Hello,
Could you please check this error code?

√ Copying web assets from www to android\app\src\main\assets\public in 46.82ms
√ Creating capacitor.config.json in android\app\src\main\assets in 1.13ms
[info] Inlining sourcemaps
√ copy android in 94.93ms
√ Updating Android plugins in 1.06ms
√ update android in 48.87ms
× Running Gradle build - failed!
[error]
ERROR: JAVA_HOME is set to an invalid directory: C:\Program Files\Android\Android Studio\jre

    Please set the JAVA_HOME variable in your environment to match the
    location of your Java installation.

Error running your project for android!

Since there is not enough information and documents on the community site, can you write the information I want here?

I can not start up android project. My emulator is not being activated always keep getting errors.

My latest warning exception is this :

BUG! exception in phase ‘semantic analysis’ in source unit ‘ BuildScript ’ Unsupported class file major
version 64

My computer is windows 10.
Installed the NODE.js latest version succesfully.

System check details:

Checking NodeJS installation and version…

v20.3.0

NodeJS is correctly installed.

Checking Capacitor installation and version…

5.1.0
Capacitor is correctly installed.

Checking for Android Studio installation…
Android Studio is correctly installed.
Android SDK Command-line Tools (latest) found.

System check successful!

My questions:

1 - Why is my android version in wappler app shows 4.6.0 instead of latest version?
image

2 - Which latest updated version are stable to work together at the same time?(JAVA JDK, Android SDK, GRADLE), I need the latest stable versions combination for those? I am sure the latest versions like Gradle_8.0.2, JAVA JDK 20, Android SDK 34 and API 31 not works.

image

image

3 - What should be the correct mobile paths under options of Waplerr (ANDROID SDK PATH, JAVA JDK PATH, GRADLE PATH)
image
My current paths:

SDK PATH : C:\Users\user\AppData\Local\Android\Sdk

JDK PATH : C:\Program Files\Java\jdk-20

GRADLE PATH : C:\Users\user.gradle or C:\Program Files\Android\Android Studio\jbr

4 - How can I test the wappler generated android project under android studio? need detailed information.(What should we have to do? Do we need to generate an android project under android studio and then copy the android folder into our wappler project?)

5 - How to set the correct namespace information to our project? (com.example.app)


When I add namespace into this file C:\wamp64\www\mobile\android\build.gradle the error is gone.
Wappler can not create android project %100 correctly.

Thank you.

Is there anyone who can help me?

I think there is an issue with the Wappler emulator. You should be able to emulate in Android Studio. At least that’s what I have to do.

1 Like

Hello Brad,

I need and want to develop my new project under Wappler platform, both IOS and Android for mobile.

What do you prefer?

I wonder if the problem will be fixed with the next update?

I Build in Wappler and emulate in Android Studio. You have to have to package it in Android Studio (for Android) and xCode (for iOS) anyways to submit to the App Stores.

1 Like