[RESOLVED] Please help! Very Urgent! Compiling Error when building for Android

When I try to use the ant tool to compile for android it gives me this error:

Stivens-MacBook-Pro:android copy Stiven$ ./build.sh "/Applications/android-sdk"  
CORONA\_PATH: ../../..  
Updated local.properties  
build.xml: Found version-tag: custom. File will not be updated.  
Updated file ./proguard-project.txt  
Error: The project either has no target set or the target is invalid.  
Please provide a --target to the 'android update' command.  
Using Corona Enterprise Dir: ../../..  
Buildfile: /Applications/CoronaEnterprise/Samples/ExtendingUI/android copy/build.xml  
  
-set-mode-check:  
  
-set-release-mode:  
 [echo] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
 [echo] \*\*\*\* Android Manifest has debuggable=true \*\*\*\*  
 [echo] \*\*\*\* Doing DEBUG packaging with RELEASE keys \*\*\*\*  
 [echo] \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
  
-release-obfuscation-check:  
 [echo] proguard.config is ${proguard.config}  
  
-pre-build:  
 [exec] Compiling /Applications/CoronaEnterprise/Samples/ExtendingUI/android copy/../Corona/config.lua ===\> config.lua  
 [exec] Compiling /Applications/CoronaEnterprise/Samples/ExtendingUI/android copy/../Corona/main.lua ===\> main.lua  
 [exec] Using Bundle Id: (com.mycompany.templateapp)  
 [exec] Using AppId: (ef12f6607362d039552a8e6223d80f68)  
 [exec] Creating $CONFIG\_META...  
 [exec] Archiving /Applications/CoronaEnterprise/Samples/ExtendingUI/android copy/assets/\*.lu into /Applications/CoronaEnterprise/Samples/ExtendingUI/android copy/assets/resource.car  
 [exec] Removing: /Applications/CoronaEnterprise/Samples/ExtendingUI/android copy/assets/\*.lu  
 [exec] Removing: /Applications/CoronaEnterprise/Samples/ExtendingUI/android copy/assets/config.lu  
 [exec] Removing: /Applications/CoronaEnterprise/Samples/ExtendingUI/android copy/assets/main.lu  
  
-check-env:  
 [checkenv] Android SDK Tools Revision 21.1.0  
 [checkenv] Installed at /Applications/android-sdk  
  
-setup:  
 [echo] Project Name: ExtendingUI  
 [gettype] Project Type: Application  
  
-build-setup:  
 [echo] Resolving Build Target for ExtendingUI...  
[gettarget] Project Target: Android 4.1.2  
[gettarget] API level: 16  
 [echo] ----------  
 [echo] Creating output directories if needed...  
 [echo] ----------  
 [echo] Resolving Dependencies for ExtendingUI...  
[dependency] Library dependencies:  
[dependency]   
[dependency] ------------------  
[dependency] Ordered libraries:  
 [echo] ----------  
 [echo] Building Libraries with 'release'...  
  
BUILD FAILED  
/Applications/android-sdk/tools/ant/build.xml:595: The following error occurred while executing this line:  
/Applications/CoronaEnterprise/Corona/android/lib/Corona/build.xml:46: sdk.dir is missing. Make sure to generate local.properties using 'android update project' or to inject it through an env var  
  
Total time: 1 second  
Exiting due to errors (above)  

I checked, and there is a local.properties file, and it does have sdk.dir

This is the Sample app by the way.

Thanks! [import]uid: 130035 topic_id: 36385 reply_id: 336385[/import]

I think the problem here is that your Android SDK is not set up yet. You likely need to download the Android API libraries needed to build an Android app project. Please do the following:

  1. Go to folder “android-sdk/tools”.
  2. Double click on the “android” application.
  3. This will launch the “Android SDK Manager” window.
  4. Check API Levels 16 and 8 in the “Packages” list.
    * Note: You need to select every API Level that your Android app project and every Android library project uses.
  5. Click the “Install packages” button in the bottom right corner.

After the Android SDK Manager finishes downloading and installing all libraries, you should be able to build successfully. Good luck! [import]uid: 32256 topic_id: 36385 reply_id: 145030[/import]

Okay, I will try that right now. I only had the latest one installed, maybe that is the problem indeed. [import]uid: 130035 topic_id: 36385 reply_id: 145031[/import]

Cool. Just so you know, to find out which API Level your app project targets, look at the “project.properties” file. That indicates the build target. I believe the newest version of Corona Enterprise’s sample projects target API Level 16, but you might want to double check in case you’re demoing an older version. [import]uid: 32256 topic_id: 36385 reply_id: 145032[/import]

It works perfectly now. Thanks!

Also, is there a way to test the app without uploading it to the device? [import]uid: 130035 topic_id: 36385 reply_id: 145035[/import]

Happy to help!

Regarding testing, you can test your APK with the Android SDK’s emulator. However, in my opinion, the emulator is slow that it is not worth using. It is best to test with real Android devices.
http://developer.android.com/tools/devices/emulator.html
[import]uid: 32256 topic_id: 36385 reply_id: 145099[/import]

I think the problem here is that your Android SDK is not set up yet. You likely need to download the Android API libraries needed to build an Android app project. Please do the following:

  1. Go to folder “android-sdk/tools”.
  2. Double click on the “android” application.
  3. This will launch the “Android SDK Manager” window.
  4. Check API Levels 16 and 8 in the “Packages” list.
    * Note: You need to select every API Level that your Android app project and every Android library project uses.
  5. Click the “Install packages” button in the bottom right corner.

After the Android SDK Manager finishes downloading and installing all libraries, you should be able to build successfully. Good luck! [import]uid: 32256 topic_id: 36385 reply_id: 145030[/import]

Okay, I will try that right now. I only had the latest one installed, maybe that is the problem indeed. [import]uid: 130035 topic_id: 36385 reply_id: 145031[/import]

Cool. Just so you know, to find out which API Level your app project targets, look at the “project.properties” file. That indicates the build target. I believe the newest version of Corona Enterprise’s sample projects target API Level 16, but you might want to double check in case you’re demoing an older version. [import]uid: 32256 topic_id: 36385 reply_id: 145032[/import]

It works perfectly now. Thanks!

Also, is there a way to test the app without uploading it to the device? [import]uid: 130035 topic_id: 36385 reply_id: 145035[/import]

Happy to help!

Regarding testing, you can test your APK with the Android SDK’s emulator. However, in my opinion, the emulator is slow that it is not worth using. It is best to test with real Android devices.
http://developer.android.com/tools/devices/emulator.html
[import]uid: 32256 topic_id: 36385 reply_id: 145099[/import]

I think the problem here is that your Android SDK is not set up yet. You likely need to download the Android API libraries needed to build an Android app project. Please do the following:

  1. Go to folder “android-sdk/tools”.
  2. Double click on the “android” application.
  3. This will launch the “Android SDK Manager” window.
  4. Check API Levels 16 and 8 in the “Packages” list.
    * Note: You need to select every API Level that your Android app project and every Android library project uses.
  5. Click the “Install packages” button in the bottom right corner.

After the Android SDK Manager finishes downloading and installing all libraries, you should be able to build successfully. Good luck! [import]uid: 32256 topic_id: 36385 reply_id: 145030[/import]

Okay, I will try that right now. I only had the latest one installed, maybe that is the problem indeed. [import]uid: 130035 topic_id: 36385 reply_id: 145031[/import]

Cool. Just so you know, to find out which API Level your app project targets, look at the “project.properties” file. That indicates the build target. I believe the newest version of Corona Enterprise’s sample projects target API Level 16, but you might want to double check in case you’re demoing an older version. [import]uid: 32256 topic_id: 36385 reply_id: 145032[/import]

It works perfectly now. Thanks!

Also, is there a way to test the app without uploading it to the device? [import]uid: 130035 topic_id: 36385 reply_id: 145035[/import]

Happy to help!

Regarding testing, you can test your APK with the Android SDK’s emulator. However, in my opinion, the emulator is slow that it is not worth using. It is best to test with real Android devices.
http://developer.android.com/tools/devices/emulator.html
[import]uid: 32256 topic_id: 36385 reply_id: 145099[/import]

I think the problem here is that your Android SDK is not set up yet. You likely need to download the Android API libraries needed to build an Android app project. Please do the following:

  1. Go to folder “android-sdk/tools”.
  2. Double click on the “android” application.
  3. This will launch the “Android SDK Manager” window.
  4. Check API Levels 16 and 8 in the “Packages” list.
    * Note: You need to select every API Level that your Android app project and every Android library project uses.
  5. Click the “Install packages” button in the bottom right corner.

After the Android SDK Manager finishes downloading and installing all libraries, you should be able to build successfully. Good luck! [import]uid: 32256 topic_id: 36385 reply_id: 145030[/import]

Okay, I will try that right now. I only had the latest one installed, maybe that is the problem indeed. [import]uid: 130035 topic_id: 36385 reply_id: 145031[/import]

Cool. Just so you know, to find out which API Level your app project targets, look at the “project.properties” file. That indicates the build target. I believe the newest version of Corona Enterprise’s sample projects target API Level 16, but you might want to double check in case you’re demoing an older version. [import]uid: 32256 topic_id: 36385 reply_id: 145032[/import]

It works perfectly now. Thanks!

Also, is there a way to test the app without uploading it to the device? [import]uid: 130035 topic_id: 36385 reply_id: 145035[/import]