Update Mobile Apps How To

Dear Wappler,

Please update the Mobile Apps How To Doc regarding Capacitor, Android Apps, Android Studio, and running Wappler apps in the Android Emulator. The process detailed in the current how to doc no longer works. Multiple other people in the community are experiencing the same problem. Many different fixes and work arounds have been attempted to no avail.

I am now imploring Wappler to please show us how it is done as of June 2023.

Thank you.

Yup - I thought I’d give creating an Android App with Capacitor a try today. It’s not going well. LOL!

1 Like

This is very important to me too!

1 Like

@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.

  1. Upgrade to AS Flamingo (I know, many of us thought this was the problem, but stick with me here)
  2. 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.
  3. 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.
  4. Under project structure set Android Gradle Plugin Version to 7.4.2
  5. 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:

  1. Open your build.gradle (Module :app) file (NOT build.gradle (Project :android)…important distinction)
  2. Paste the following code at the very bottom of that file

configurations.implementation {
exclude group: ‘org.jetbrains.kotlin’, module: ‘kotlin-stdlib-jdk8’
}

  1. 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.

2 Likes

Fab! I’ll try it out tomorrow. Thx for posting back when you figured it out!

@Heather_Mann

I felt a responsibility haha. If you run into any problems, Id be happy to help work through. I don’t wish this kind of frustration on anybody!

I’d pretty much given up so really appreciate your tenacity!!! Will report back. :slight_smile:

1 Like

I already opened a topic about this problem I think a month ago, and they told me to follow the tutorial in the documentation and it doesn’t work.

@Valtenci That is correct, the current tutorial is out of date. Use my workaround above.

Yes, I already took note and will test.

Thanks. :handshake:

1 Like