The Corona Enterprise directory is hard coded inside of the “build.sh” file. It’s currently set to “/Applications/CoronaEnterprise”. So, if you decide to place your Corona Enterprise folder in a different directory, then you would need to modify that script.
Try this. Open your “Terminal” window and then type in the following into it…
cd /Applications/CoronaEnterprise
If the terminal fails to go to that directory, then that’s your problem. But that said, if you copied your CoronaEnterprise folder to the Applications directory, then it should be there. In which case, perhaps you just have a bad copy/download of Corona Enterprise. If that’s the case, then I recommend that you delete the Corona Enterprise directory, re-download it from our website, and copy it into your Applications folder again.
I can reach that directory. I have installed the newest CoronEnterprise version but it still fails.
BUILD FAILED /Users/jannsigrist/Documents/GroohAndroidNative/App/android/build.xml:86: Execute failed: java.io.IOException: Cannot run program "${CoronaEnterpriseDir}/Corona/mac/bin/lua": error=2, No such file or directory at java.lang.ProcessBuilder.start(ProcessBuilder.java:460) at java.lang.Runtime.exec(Runtime.java:593)
Ensure you have Android 2.2 (Api 8) installed via the Android SDK manager
android_sdk_path > tools > Android
Tick the box which says “Android 2.2 (Api 8)” and then the “Install Packages” button which is located to the bottom right of the screen. You will then be asked to accept the licences, then click install.
Glad to hear it’s working. Are these manifest errors coming from an untouched SimpleLuaExtension, ie not modified (I am basing testing the builds on that example) or your own app?
This means that your AndroidManifest.xml file contains settings that the Android API Level that you are building with does not support. It means you need to target a higher API Level that supports the newest manifest settings that you are trying to use.
You target an API Level in an Android project in 2 places:
Your “project.properties” file via the “target” property.
Your “AndroidManifest.xml” file via the <uses-sdk> tag.
Both of the above settings must be set. Note that if you use the “android update” command at the terminal, then it will set the target in your “project.properties” file. I’ve noticed one little mistake in Danny’s post above which would have made your project target API Level 2 instead. You want it to target API Level 16 like this…
Or… you could just modify the “project.properties” file by hand.
Also, in your Android SDK Manager application (included with the Android SDK), you’ll need to download every API Level that your Android project target and that its libraries (such as Corona) targets. So, for sample project “SimpleLuaExtensions”, you’ll need to download/install API Levels 8 and 16.
You can find Google’s official documentation on how to set up Android projects here…
another noobish question, since it might help others too:
I have builded and signed with my keystore. the unsigned apk always gets named app, I have edited in the manifest but still its name is app. how can i change that?
and on the device, there is no icon and all… does this type of building ignore the build.settings from corona? if so, I guess I need to specify icons and all?
When building with the Android SDK, you set the APK file name via the <project> tag’s “name” attribute in your “build.xml” file. For example…
\<?xml version="1.0" encoding="UTF-8"?\> \<project name="YourApkFileName" default="help"\> \<!-- The rest of your project settings go here. --\> \</project\>
Regarding application icons, you have to set that up the native Android way. Icon files such as “Icon-mdpi.png” and “Icon-hdpi.png” are only supported by the Corona Simulator and are ignored by the Android SDK. Native Android developers have to add application icons (aka: launcher icons) to their Android project’s “res” directory and reference that application icon file via the AndroidManifest.xml file’s <application android:icon=""> attribute as documented by Google here…
Also, the “build.settings” file is ignored for native Android SDK builds. The “build.settings” file is only used by the Corona Simulator. This means you have to edit the AndroidManifest.xml file yourself. But that said, that gives you ultimate control over how your app is configured. Google documents how to set the AndroidManifest.xml file via the link below. Also, our sample projects’ AndroidManifest.xml files contains comments that indicate why those tags were added, which should prove helpful.
There is definitely a lot to learn when doing native Android development, but once you get the hang of it and all of its nuances, it’s not so bad. That said, it also shows how easy we made Android development via the Corona Simulator.
Unfortunately, I know very little about iOS/Xcode development here. So, I don’t know how Apple wants you to set it. But that said, I do know that the Corona Enterprise Xcode app template that we provide does use the “build.settings” file as a pre-build or post-build step. You can set your app name in the “plist” table and use the “CFBundleDisplayName” setting.
Unfortunately, I know very little about iOS/Xcode development here. So, I don’t know how Apple wants you to set it. But that said, I do know that the Corona Enterprise Xcode app template that we provide does use the “build.settings” file as a pre-build or post-build step. You can set your app name in the “plist” table and use the “CFBundleDisplayName” setting.