This guide assumes that you have already set up a development environment for CORONA_ENTERPRISE_PRODUCT. If not, please see the [CORONA_ENTERPRISE_PRODUCT — Android Setup][native.android.androidSetup] and return to this guide once you’ve finished installing the Android Tools.
Before starting, download and install Android Studio. Run Android Studio for the first time and set it up (select a theme, update the Android SDK as desired, etc.).
If you haven’t already, copy the CoronaEnterprise/ProjectTemplates/App/
project directory to the desired location on your machine.
Open the [PATH_TO_PROJECT_TEMPLATE]/App/
project directory in Finder and rename the android
directory to android_old
. This is so the old Ant version stays out of the way.
From with Android Studio, select
Specify an Application name that describes your project. If you already have an Android package name [PATH_TO_PROJECT_TEMPLATE]/App/android/
—
When finished, click Next.
On the next screen, in the Phone and Tablet section, choose a Minimum SDK version of API 15: Android 4.0.3 (IceCreamSandwich)
When ready, click Next.
On the next screen, select Add No Activity and then click Finish. Android Studio will then create your project.
android
directory is created, open the Terminal application and cd
to the [PATH_TO_PROJECT_TEMPLATE]/App/android/
CoronaEnterprise
directory:cd [PATH_TO_PROJECT_TEMPLATE]/App/android/ ln -s /Applications/CoronaEnterprise CoronaEnterprise
cd
-ingProject
sidebar on the left. Expand the app
and Gradle Scripts
app
→ java
plugin
. Package name should be in format of how a user would add the plugin to their build.settings
, for example plugin.flashlight
. For this project, enter simply plugin.library
and click Finish. You can ignore the warning about the casing of the application name.plugin
→ java
plugin.library
(androidTest
)plugin.library
(test
)Now you need to create a LuaLoader.java
file for the plugin. From within Finder, copy the file from [PATH_TO_PROJECT_TEMPLATE]/App/android_old/src/plugin/library
and paste it into this directory:
[PATH_TO_PROJECT_TEMPLATE]/App/android/plugin/src/main/java/plugin/library
androidTest
and test
directories from both app/src/
and plugin/src/
since you don’t need them.