In order to export a project from Construct 2 as an APK under Windows, the following steps are necessary.

  1. First we have to (if not already available) Android Studio, NodeJS and the Java SE Runtime Environment to install.
  2. After the installation we open the command line CMD, change to our hard drive “C: \” and execute the following command: npm install -g cordova
  3. Then we create a new project with the following command:
    cordova create demo com.wossi.demo demo
    The word demo is of course my project name here.
  4. Now we switch to our new directory with cd demo and execute the following command:
    cordova platform add android
  5. Then we open Android Studio and select the menu item “Import Project (Gradle, Eclipse, ADT, etc.)
  6. Then we choose the point android in our project directory C:/demo/platforms/android and confirm our selection with OK. The following message is also simply confirmed with OK.
  7. In the emulator we can now check whether Cordova is running.
  8. We are now switching to the Construct 2 application and exporting our project with Cordova. In the exported project folder, we now copy the entire content of the www folder and paste it into Android Studio under app/assets/www.
    We overwrite all existing files!
  9. Now we can test our app again using the emulator, change the app icon under app/res/mipmap/ic_launcher/ic_launcher.png or make further settings in app/manifests/AndroidManifest.xml. If necessary, we can also activate the full-screen mode in app/res/xml/config.xml
  10. Finally, we export the APK to Android Studio at Build > Build Bundle(s) / APK(s) > Build APK(s). The unsigned APK can then be found atC:/demo/platforms/android/app/build/outputs/apk/debug/app-debug.apk

Leave a Reply

Your email address will not be published. Required fields are marked *