Corona Enterprise project build error

I am trying to run sample app in corona enterprise edition.

My Mac OS X: 10.8.2

Xcode : 4.6

android target=android-16

In my project.properties have

This file is automatically generated by Android Tools.

Do not modify this file – YOUR CHANGES WILL BE ERASED!

This file must be checked in Version Control Systems.

To customize properties used by the Ant build system edit

“ant.properties”, and override values to adapt the script to your

project structure.

To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):

#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt

Project target.

target=android-16

android.library.reference.1=${CoronaEnterpriseDir}/Corona/android/lib/Corona

and local.properties have

This file is automatically generated by Android Tools.

Do not modify this file – YOUR CHANGES WILL BE ERASED!

This file must *NOT* be checked into Version Control Systems,

as it contains information specific to your local configuration.

location of the SDK. This is only used by Ant

For customization when using a Version Control System, please read the

header note.

sdk.dir=/Users/LHD8/Documents/Softwares/adt-bundle-mac-x86_64/sdk

when i run the ./build.sh I am getting this error

BUILD FAILED

/Users/LHD8/Documents/Softwares/adt-bundle-mac-x86_64/sdk/tools/ant/build.xml:598: 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

what is the problem please tell me…

This means that the build system has failed to find the Android SDK.  You need to provide the Android SDK root directory as a command line argument to our “build.sh” script.  Instructions can be found here…

   http://docs.coronalabs.com/native/android/index.html#building-with-ant

If you want to know the nitty-gritty details, our “build.sh” script first sets up your Android project directory by executing “android update project” at the command line, which is an Android SDK tool.  This generates the “local.properties” file which tells the “ant” build system where to find the Android SDK build tools.  This is per Google’s instructions here…

   http://developer.android.com/tools/projects/projects-cmdline.html#UpdatingAProject

After the “build.sh” script updates your project, it then builds your project via “ant release” according to Google’s documentation here…

   http://developer.android.com/tools/building/building-cmdline.html

So, none of this is Corona specific stuff.  You’re actually using Google’s Android SDK build system.  Corona is merely a library that you integrate into your own Android application project.  Since you’re new to the Android build system, I recommend that you learn how to build Google’s Android sample projects first before attempting to work with Corona Enterprise, because that will help you learn the fundamentals of the Android build system.

Anyways, I hope this helps!

I tried with the below command

 ./build.sh /Users/LHD8/Documents/Softwares/adt-bundle-mac-x86_64/sdk

It is working for Android applications but it is not working for corona. why?

Hi  Joshua Quick ,

I tried with the same procedure what your said but i am getting same problem(error) and also

 

I tried with the below command

 

 ./build.sh /Users/LHD8/Documents/Softwares/adt-bundle-mac-x86_64/sdk

 

It is working for Android applications but it is not working for corona. 

 

please tell me the issue…

This means that the build system has failed to find the Android SDK.  You need to provide the Android SDK root directory as a command line argument to our “build.sh” script.  Instructions can be found here…

   http://docs.coronalabs.com/native/android/index.html#building-with-ant

If you want to know the nitty-gritty details, our “build.sh” script first sets up your Android project directory by executing “android update project” at the command line, which is an Android SDK tool.  This generates the “local.properties” file which tells the “ant” build system where to find the Android SDK build tools.  This is per Google’s instructions here…

   http://developer.android.com/tools/projects/projects-cmdline.html#UpdatingAProject

After the “build.sh” script updates your project, it then builds your project via “ant release” according to Google’s documentation here…

   http://developer.android.com/tools/building/building-cmdline.html

So, none of this is Corona specific stuff.  You’re actually using Google’s Android SDK build system.  Corona is merely a library that you integrate into your own Android application project.  Since you’re new to the Android build system, I recommend that you learn how to build Google’s Android sample projects first before attempting to work with Corona Enterprise, because that will help you learn the fundamentals of the Android build system.

Anyways, I hope this helps!

I tried with the below command

 ./build.sh /Users/LHD8/Documents/Softwares/adt-bundle-mac-x86_64/sdk

It is working for Android applications but it is not working for corona. why?

I have the same problem trying to compile sample LUA Extension. Build process for the Application goes well but it won’t proceed on building Corona lib See the error message below

ool-44c3dbd5:android mrp$ pwd /Users/mrp/Desktop/SimpleLuaExtension/android ool-44c3dbd5:android mrp$ ./build.sh CORONA\_PATH: ../../../../../Applications/CoronaEnterprise USAGE: build.sh USAGE: build.sh android\_sdk\_path USAGE: build.sh android\_sdk\_path corona\_enterprise\_path \tandroid\_sdk\_path: Path to the root Android SDK directory. \tcorona\_enterprise\_path: Path to the CoronaEnterprise directory. ool-44c3dbd5:android mrp$ ./build.sh ~/Developer/adt-bundle-mac-x86\_64-20130522/sdk/ /Applications/CoronaEnterprise/ CORONA\_PATH: ../../../../../Applications/CoronaEnterprise 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. 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: ../../../../../Applications/CoronaEnterprise Buildfile: /Users/mrp/Desktop/SimpleLuaExtension/android/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 /Users/mrp/Desktop/SimpleLuaExtension/android/../Corona/config.lua ===\> config.lu [exec] Copying /Users/mrp/Desktop/SimpleLuaExtension/android/../Corona/Icon-72.png to /Users/mrp/Desktop/SimpleLuaExtension/android/assets/Icon-72.png [exec] /Users/mrp/Desktop/SimpleLuaExtension/android/../Corona/Icon-72.png -\> /Users/mrp/Desktop/SimpleLuaExtension/android/assets/Icon-72.png [exec] Copying /Users/mrp/Desktop/SimpleLuaExtension/android/../Corona/Icon-72@2x.png to /Users/mrp/Desktop/SimpleLuaExtension/android/assets/Icon-72@2x.png [exec] /Users/mrp/Desktop/SimpleLuaExtension/android/../Corona/Icon-72@2x.png -\> /Users/mrp/Desktop/SimpleLuaExtension/android/assets/Icon-72@2x.png [exec] Copying /Users/mrp/Desktop/SimpleLuaExtension/android/../Corona/Icon.png to /Users/mrp/Desktop/SimpleLuaExtension/android/assets/Icon.png [exec] /Users/mrp/Desktop/SimpleLuaExtension/android/../Corona/Icon.png -\> /Users/mrp/Desktop/SimpleLuaExtension/android/assets/Icon.png [exec] Copying /Users/mrp/Desktop/SimpleLuaExtension/android/../Corona/Icon@2x.png to /Users/mrp/Desktop/SimpleLuaExtension/android/assets/Icon@2x.png [exec] /Users/mrp/Desktop/SimpleLuaExtension/android/../Corona/Icon@2x.png -\> /Users/mrp/Desktop/SimpleLuaExtension/android/assets/Icon@2x.png [exec] Compiling /Users/mrp/Desktop/SimpleLuaExtension/android/../Corona/main.lua ===\> main.lu [exec] Copying /Users/mrp/Desktop/SimpleLuaExtension/android/../Corona/paper\_bkg.png to /Users/mrp/Desktop/SimpleLuaExtension/android/assets/paper\_bkg.png [exec] /Users/mrp/Desktop/SimpleLuaExtension/android/../Corona/paper\_bkg.png -\> /Users/mrp/Desktop/SimpleLuaExtension/android/assets/paper\_bkg.png [exec] Using Bundle Id: (com.mycompany.templateapp) [exec] Using AppId: (ef12f6607362d039552a8e6223d80f68) [exec] Creating application.metadata ... [exec] Archiving /Users/mrp/Desktop/SimpleLuaExtension/android/assets/\*.lu into /Users/mrp/Desktop/SimpleLuaExtension/android/assets/resource.car [exec] Removing: /Users/mrp/Desktop/SimpleLuaExtension/android/assets/\*.lu -check-env: [checkenv] Android SDK Tools Revision 22.0.1 [checkenv] Installed at /Users/mrp/Developer/adt-bundle-mac-x86\_64-20130522/sdk -setup: [echo] Project Name: SimpleLuaExtension [gettype] Project Type: Application -build-setup: [getbuildtools] Using latest Build Tools: 17.0.0 [echo] Resolving Build Target for SimpleLuaExtension... [gettarget] Project Target: Android 4.2.2 [gettarget] API level: 17 [echo] ---------- [echo] Creating output directories if needed... [echo] ---------- [echo] Resolving Dependencies for SimpleLuaExtension... [dependency] Library dependencies: [dependency] [dependency] ------------------ [dependency] Ordered libraries: [echo] ---------- [echo] Building Libraries with 'release'... BUILD FAILED /Users/mrp/Developer/adt-bundle-mac-x86\_64-20130522/sdk/tools/ant/build.xml:598: 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)

What is the solution?

I have overcame this build error. The solution was to run: android update project on Corona lib in CoronaEnterprise.

To do this navigate to your Android SDK/tools folder and run command:

./android update project --target 1 --path /Applications/CoronaEnterprise/Corona/android/lib/Corona/

Hi  Joshua Quick ,

I tried with the same procedure what your said but i am getting same problem(error) and also

 

I tried with the below command

 

 ./build.sh /Users/LHD8/Documents/Softwares/adt-bundle-mac-x86_64/sdk

 

It is working for Android applications but it is not working for corona. 

 

please tell me the issue…

I have the same problem trying to compile sample LUA Extension. Build process for the Application goes well but it won’t proceed on building Corona lib See the error message below

ool-44c3dbd5:android mrp$ pwd /Users/mrp/Desktop/SimpleLuaExtension/android ool-44c3dbd5:android mrp$ ./build.sh CORONA\_PATH: ../../../../../Applications/CoronaEnterprise USAGE: build.sh USAGE: build.sh android\_sdk\_path USAGE: build.sh android\_sdk\_path corona\_enterprise\_path \tandroid\_sdk\_path: Path to the root Android SDK directory. \tcorona\_enterprise\_path: Path to the CoronaEnterprise directory. ool-44c3dbd5:android mrp$ ./build.sh ~/Developer/adt-bundle-mac-x86\_64-20130522/sdk/ /Applications/CoronaEnterprise/ CORONA\_PATH: ../../../../../Applications/CoronaEnterprise 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. 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: ../../../../../Applications/CoronaEnterprise Buildfile: /Users/mrp/Desktop/SimpleLuaExtension/android/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 /Users/mrp/Desktop/SimpleLuaExtension/android/../Corona/config.lua ===\> config.lu [exec] Copying /Users/mrp/Desktop/SimpleLuaExtension/android/../Corona/Icon-72.png to /Users/mrp/Desktop/SimpleLuaExtension/android/assets/Icon-72.png [exec] /Users/mrp/Desktop/SimpleLuaExtension/android/../Corona/Icon-72.png -\> /Users/mrp/Desktop/SimpleLuaExtension/android/assets/Icon-72.png [exec] Copying /Users/mrp/Desktop/SimpleLuaExtension/android/../Corona/Icon-72@2x.png to /Users/mrp/Desktop/SimpleLuaExtension/android/assets/Icon-72@2x.png [exec] /Users/mrp/Desktop/SimpleLuaExtension/android/../Corona/Icon-72@2x.png -\> /Users/mrp/Desktop/SimpleLuaExtension/android/assets/Icon-72@2x.png [exec] Copying /Users/mrp/Desktop/SimpleLuaExtension/android/../Corona/Icon.png to /Users/mrp/Desktop/SimpleLuaExtension/android/assets/Icon.png [exec] /Users/mrp/Desktop/SimpleLuaExtension/android/../Corona/Icon.png -\> /Users/mrp/Desktop/SimpleLuaExtension/android/assets/Icon.png [exec] Copying /Users/mrp/Desktop/SimpleLuaExtension/android/../Corona/Icon@2x.png to /Users/mrp/Desktop/SimpleLuaExtension/android/assets/Icon@2x.png [exec] /Users/mrp/Desktop/SimpleLuaExtension/android/../Corona/Icon@2x.png -\> /Users/mrp/Desktop/SimpleLuaExtension/android/assets/Icon@2x.png [exec] Compiling /Users/mrp/Desktop/SimpleLuaExtension/android/../Corona/main.lua ===\> main.lu [exec] Copying /Users/mrp/Desktop/SimpleLuaExtension/android/../Corona/paper\_bkg.png to /Users/mrp/Desktop/SimpleLuaExtension/android/assets/paper\_bkg.png [exec] /Users/mrp/Desktop/SimpleLuaExtension/android/../Corona/paper\_bkg.png -\> /Users/mrp/Desktop/SimpleLuaExtension/android/assets/paper\_bkg.png [exec] Using Bundle Id: (com.mycompany.templateapp) [exec] Using AppId: (ef12f6607362d039552a8e6223d80f68) [exec] Creating application.metadata ... [exec] Archiving /Users/mrp/Desktop/SimpleLuaExtension/android/assets/\*.lu into /Users/mrp/Desktop/SimpleLuaExtension/android/assets/resource.car [exec] Removing: /Users/mrp/Desktop/SimpleLuaExtension/android/assets/\*.lu -check-env: [checkenv] Android SDK Tools Revision 22.0.1 [checkenv] Installed at /Users/mrp/Developer/adt-bundle-mac-x86\_64-20130522/sdk -setup: [echo] Project Name: SimpleLuaExtension [gettype] Project Type: Application -build-setup: [getbuildtools] Using latest Build Tools: 17.0.0 [echo] Resolving Build Target for SimpleLuaExtension... [gettarget] Project Target: Android 4.2.2 [gettarget] API level: 17 [echo] ---------- [echo] Creating output directories if needed... [echo] ---------- [echo] Resolving Dependencies for SimpleLuaExtension... [dependency] Library dependencies: [dependency] [dependency] ------------------ [dependency] Ordered libraries: [echo] ---------- [echo] Building Libraries with 'release'... BUILD FAILED /Users/mrp/Developer/adt-bundle-mac-x86\_64-20130522/sdk/tools/ant/build.xml:598: 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)

What is the solution?

I have overcame this build error. The solution was to run: android update project on Corona lib in CoronaEnterprise.

To do this navigate to your Android SDK/tools folder and run command:

./android update project --target 1 --path /Applications/CoronaEnterprise/Corona/android/lib/Corona/

This solved it for me… thanks!

This solved it for me… thanks!