Skip to content

Instantly share code, notes, and snippets.

@christroutner
Created March 21, 2022 13:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save christroutner/cfde81be1500aeef5c70e1e487337410 to your computer and use it in GitHub Desktop.
Save christroutner/cfde81be1500aeef5c70e1e487337410 to your computer and use it in GitHub Desktop.
Generating Android APK

These are my notes on generating an APK file using Android Studio, for a Gatsby project using Capacitor.

This is the flow I follow to create the APK:

  • Update the capacitor.config file with the route where is installed the Android studio
  • npm run build (generates the public folder)
  • npm run android:setup (generates the android folder)
  • npm run android:open (opens the android studio with the project)
  • Once in Android studio I compile and export the APK: Build --> Make Project
  • The generated APK file is in android/app/build/outputs/apk/debug/app-debug.apk

The problems I have found with this, are related with the versions, the 'gacdle' and 'sdk' versions need to be compatible

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment