@Heather_Mann @Antony
I found a solution and wanted to share. I spent weeks ripping my hair out over this and am stoked to have finally figured it out.
- Upgrade to AS Flamingo (I know, many of us thought this was the problem, but stick with me here)
- Install SDK 33 (not 31 like Wappler docs say, and not 34 which is the default). Also make sure you have command line tools installed and your desired emulators set up. Also make sure you have downloaded the disk images from the SDK package.
- Open the Android folder from your Wappler project in Android Studio (if you haven’t added it from Wappler yet, do so now. Or if you already have, delete it and re-add it to your Wappler project so you can start fresh.
- Under project structure set Android Gradle Plugin Version to 7.4.2
- Then set Gradle version to 7.5 (this will get you past the namespace error)
Now at this point to project will build but will not run. When you try to run you will likely get the duplicate classes error. This is something dumb in Kotlin. but I have a hacky fix here:
- Open your build.gradle (Module :app) file (NOT build.gradle (Project :android)…important distinction)
- Paste the following code at the very bottom of that file
configurations.implementation {
exclude group: ‘org.jetbrains.kotlin’, module: ‘kotlin-stdlib-jdk8’
}
- Sync, build in AS and run from AS or Wappler.
The app should now run on the emulator and you should be able to launch it from Wappler
Please note that I am on a Mac M1 and my project is using Capacitor 5.0.5 on a node.js and BS5 mobile app project.
If anyone is still stuck with this, please feel free to reach out.