Is it no longer possible to build an Android app with Wappler?

Ive followed the how to doc exactly, tried following the video on the Why Wappler Youtube channel exactly, read every community post, tried every Gradle version, every SDK, tried both Capacitor and Cordova, and relentlessly Googled the errors and I cannot get my Wappler app to run on the Android Studio emulator.

I find this incredibly concerning as this is a main selling point for Wappler and as of now I am starting to think it is no longer possible. It is definitely no longer possible to achieve this as shown in the how to doc.

This is the error I keep coming to, if anyone can help me get this working correctly I will be very grateful as I am insanely frustrated with this whole experience.

I am on MacOS M1

The same error also showing when I open the app in Android Studio

What am I missing here? Is there any way to make this work?

Hi @cgrulke, not sure if this is the issue, but from my experience you need to be running an emulator/Android with API version 31. Yours is showing API 33.

image

Scroll to ā€œSTEP 6 - Android testingā€ in this post Musings on Mobile App Development in Wappler with CORS

1 Like

Thank you :slight_smile: although I have tried 31 along with every other sdk version. The same error arises every time. Iā€™ve configured it every way from Sunday and nothing makes it work,

Above is just an example showing the error I get every time.

Is this your issue? What version of Android Studio are you running?

Iā€™m not sure the location since youā€™re on Mac, but can you open your Wappler project and look in the Android directory for the gradle folder?

What is the version in the gradle-wrapper.properties?

@kfawcett I am using Flamingo with Capacitor 5.0.4 with Gradle 8. The namespace issue is what keeps coming up.

And yes I can get there. Is there something I should insert into the properties file?

What version shows in gradle-wrapper.properties?

Can you change it to the version I show in my screenshot above?

@kfawcett Ah yes, when I use Gradle 7.4.2 I then get an error saying minimum gradle version required is 7.5ā€¦then if I go to a higher version, the error says minimum 7.6 and so on, then when I get all they way up to 8, the namespace error comes up

welpā€¦ Iā€™m getting an error now as well. Itā€™s been about a month since I worked on Android, so something has definitely changed.

[info] Found 1 Capacitor plugin for android:
       @capacitor-community/sqlite@4.6.3
āˆš update android in 319.11ms
Ɨ Running Gradle build - failed!
[error] Starting a Gradle Daemon (subsequent builds will be faster)
        
        > Configure project :app
        WARNING:Using flatDir should be avoided because it doesn't support any meta-data formats.
        
        > Configure project :capacitor-cordova-android-plugins
        WARNING:Using flatDir should be avoided because it doesn't support any meta-data formats.
        
        > Task :app:preBuild UP-TO-DATE
        > Task :app:preDebugBuild UP-TO-DATE
        > Task :app:mergeDebugNativeDebugMetadata NO-SOURCE
        > Task :capacitor-android:preBuild UP-TO-DATE
        > Task :capacitor-android:preDebugBuild UP-TO-DATE
        > Task :capacitor-android:compileDebugAidl NO-SOURCE
        > Task :capacitor-community-sqlite:preBuild UP-TO-DATE
        > Task :capacitor-community-sqlite:preDebugBuild UP-TO-DATE
        > Task :capacitor-community-sqlite:compileDebugAidl NO-SOURCE
        > Task :capacitor-cordova-android-plugins:preBuild UP-TO-DATE
        > Task :capacitor-cordova-android-plugins:preDebugBuild UP-TO-DATE
        > Task :capacitor-cordova-android-plugins:compileDebugAidl NO-SOURCE
        > Task :app:compileDebugAidl NO-SOURCE
        > Task :capacitor-android:packageDebugRenderscript NO-SOURCE
        > Task :capacitor-community-sqlite:packageDebugRenderscript NO-SOURCE
        > Task :capacitor-cordova-android-plugins:packageDebugRenderscript NO-SOURCE
        > Task :app:compileDebugRenderscript NO-SOURCE
        > Task :app:generateDebugBuildConfig UP-TO-DATE
        > Task :app:javaPreCompileDebug UP-TO-DATE
        > Task :capacitor-android:writeDebugAarMetadata UP-TO-DATE
        > Task :capacitor-community-sqlite:writeDebugAarMetadata UP-TO-DATE
        > Task :app:generateDebugResValues UP-TO-DATE
        > Task :app:generateDebugResources UP-TO-DATE
        > Task :capacitor-android:compileDebugRenderscript NO-SOURCE
        > Task :capacitor-android:generateDebugResValues UP-TO-DATE
        > Task :capacitor-android:generateDebugResources UP-TO-DATE
        > Task :capacitor-cordova-android-plugins:writeDebugAarMetadata
        > Task :capacitor-android:packageDebugResources UP-TO-DATE
        > Task :capacitor-community-sqlite:compileDebugRenderscript NO-SOURCE
        > Task :capacitor-community-sqlite:generateDebugResValues UP-TO-DATE
        > Task :capacitor-community-sqlite:generateDebugResources UP-TO-DATE
        > Task :capacitor-community-sqlite:packageDebugResources UP-TO-DATE
        > Task :capacitor-cordova-android-plugins:compileDebugRenderscript NO-SOURCE
        > Task :capacitor-cordova-android-plugins:generateDebugResValues
        > Task :capacitor-cordova-android-plugins:generateDebugResources
        > Task :capacitor-cordova-android-plugins:packageDebugResources
        > Task :app:mergeDebugResources UP-TO-DATE
        > Task :app:mapDebugSourceSetPaths
        > Task :app:createDebugCompatibleScreenManifests UP-TO-DATE
        > Task :app:extractDeepLinksDebug
        > Task :capacitor-android:extractDeepLinksDebug
        > Task :app:checkDebugAarMetadata FAILED
        > Task :capacitor-android:processDebugManifest

        FAILURE: Build failed with an exception.

        * What went wrong:
        Execution failed for task ':app:checkDebugAarMetadata'.
        > A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
        > 4 issues were found when checking AAR metadata:

        1.  Dependency 'androidx.room:room-runtime:2.5.0' requires libraries and applications that
        depend on it to compile against version 33 or later of the
        Android APIs.

        :app is currently compiled against android-32.

        Also, the maximum recommended compile SDK version for Android Gradle
        plugin 7.2.1 is 32.

        Recommended action: Update this project's version of the Android Gradle
        plugin to one that supports 33, then update this project to use
        compileSdkVerion of at least 33.

        Note that updating a library or application's compileSdkVersion (which
        allows newer APIs to be used) can be done separately from updating
        targetSdkVersion (which opts the app in to new runtime behavior) and
        minSdkVersion (which determines which devices the app can be installed
        on).

        2.  Dependency 'androidx.sqlite:sqlite-framework:2.3.0' requires libraries and applications that
        depend on it to compile against version 33 or later of the
        Android APIs.

        :app is currently compiled against android-32.

        Also, the maximum recommended compile SDK version for Android Gradle
        plugin 7.2.1 is 32.

        Recommended action: Update this project's version of the Android Gradle
        plugin to one that supports 33, then update this project to use
        compileSdkVerion of at least 33.

        Note that updating a library or application's compileSdkVersion (which
        allows newer APIs to be used) can be done separately from updating
        targetSdkVersion (which opts the app in to new runtime behavior) and
        minSdkVersion (which determines which devices the app can be installed
        on).

        3.  Dependency 'androidx.sqlite:sqlite:2.3.0' requires libraries and applications that
        depend on it to compile against version 33 or later of the
        Android APIs.

        :app is currently compiled against android-32.

        Also, the maximum recommended compile SDK version for Android Gradle
        plugin 7.2.1 is 32.

        Recommended action: Update this project's version of the Android Gradle
        plugin to one that supports 33, then update this project to use
        compileSdkVerion of at least 33.

        Note that updating a library or application's compileSdkVersion (which
        allows newer APIs to be used) can be done separately from updating
        targetSdkVersion (which opts the app in to new runtime behavior) and
        minSdkVersion (which determines which devices the app can be installed
        on).

        4.  Dependency 'androidx.security:security-crypto:1.1.0-alpha05' requires libraries and applications that
        depend on it to compile against version 33 or later of the
        Android APIs.

        :app is currently compiled against android-32.

        Also, the maximum recommended compile SDK version for Android Gradle
        plugin 7.2.1 is 32.

        Recommended action: Update this project's version of the Android Gradle
        plugin to one that supports 33, then update this project to use
        compileSdkVerion of at least 33.

        Note that updating a library or application's compileSdkVersion (which
        allows newer APIs to be used) can be done separately from updating
        targetSdkVersion (which opts the app in to new runtime behavior) and
        minSdkVersion (which determines which devices the app can be installed
        on).

        * Try:
        > Run with --stacktrace option to get the stack trace.
        > Run with --info or --debug option to get more log output.
        > Run with --scan to get full insights.

        * Get more help at https://help.gradle.org

        BUILD FAILED in 11s
        19 actionable tasks: 8 executed, 11 up-to-date

Error running your project for android!

@kfawcett ouch! That sucks. Thank you so much for trying to help me on this. There has to be a solution somewhere.

Hopefully @George or @Teodor can shed some light on this

I managed to get it to launch by updating the following properties in variables.gradle from 32 to 33. Still, not going to fix your issue though.

   compileSdkVersion = 33
    targetSdkVersion = 33

Hi Keith,

Are you able to build and successfully run the emulator in Wappler?

I can work on my app and send to the app store successfully, but I have to build and use the emulator in Android Studio.

What version do you have in build.gradle dependcies? Maybe you could use 7.2.1 like I have below?

image

  classpath 'com.android.tools.build:gradle:7.2.1'
  classpath 'com.google.gms:google-services:4.3.13'

Hey Brad, yes, I am able to build and run via Wappler.

1 Like

Did you get that to work? I kept getting an error that says minimum version of Gradle required is 7.5

Hey @cgrulke, can you answer this?

@kfawcett When I tried 7.2.1 and each of the other versions (I tried them all) I kept getting an error saying minimum Gradle version required 7.5. Then when I install 7.5 I get the same error saying 7.6 is required.

Right now I am thinking this is a problem with Android Studio Flamingo. I have completely uninstalled it and will tinker with older versions. Im not sure if it will work but I canā€™t think of anything else to try. Iā€™ll let you know how it goes.

Did you make the change in the build.gradle file or gradle-wrapper.properties? I donā€™t know if changing either will work, just curious about what happens for each.

That may be the issue, Iā€™m running Electric Eel.

2 Likes

Sorry, missed that discussion.
Yes, Flamingo causes problemsā€¦
Eel works.
(Havenā€™t updated yet my AS)

1 Like