Hi folks,
I’m trying Corona at the moment in an attempt to streamline my development process for 2D games. I’m trying to build for Android and keep getting:
The Android SDK does not appear to be installed/configured on this computer. It is needed to install apps on Android devices.
To enable adb for Android device installation:
install the Android SDK
make sure the ANDROID_SDK environment variable is available to the Corona Simulator:
launchctl setenv ANDROID_SDK <path-to-sdk>
restart the Corona Simulator"
I’ve done all this. Echoing the path gives me:
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/tools:/platform-tools:/Users/myname/Android/sdk/tools:/Users/myname/Android/sdk/platform-tools
I have set the environment variable. My .bash_profile script is:
export ANDROID_SDK=/Users/denecarter/Android/sdk
export PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/tools:/platform-tools:/Users/myname/Android/sdk/tools:/Users/myname/Android/sdk/platform-tools
My path is fine. I can run both ‘adb’ and ‘android’ from anywhere, and they work.
The environment variable is set: ‘printenv’ gives me: ANDROID_SDK=/Users/myname/Android/sdk
I have shut down Corona… as well as my entire machine, and I still get this error message.
I’ve successfully created, built and run libgdx projects and Unity projects with no issues, on this machine, with this setup.
Any hints? This is… discouraging, to say the least.
rob
December 1, 2015, 12:12am
2
The problem is that the build process runs in it’s own shell and doesn’t inherit your bash settings and environment. You have to do the:
launchctl setenv ANDROID_SDK /Users/denecarter/Android/sdk
Rob
It worked! Thanks for the help.
This is the first time I’ve seen this information anywhere. Did I miss it, or is it worth updating some of the documentation to reflect this?
rob
December 1, 2015, 1:56am
4
I believe this is a change in the daily builds. Our build guide probably should be updated to reflect this. But hopefully the dialog box should be clear enough.
Rob
The dialog box led me here. Only your post actually gave me useful, actionable information (and for which I am very grateful).
rob
December 1, 2015, 12:12am
6
The problem is that the build process runs in it’s own shell and doesn’t inherit your bash settings and environment. You have to do the:
launchctl setenv ANDROID_SDK /Users/denecarter/Android/sdk
Rob
It worked! Thanks for the help.
This is the first time I’ve seen this information anywhere. Did I miss it, or is it worth updating some of the documentation to reflect this?
rob
December 1, 2015, 1:56am
8
I believe this is a change in the daily builds. Our build guide probably should be updated to reflect this. But hopefully the dialog box should be clear enough.
Rob
The dialog box led me here. Only your post actually gave me useful, actionable information (and for which I am very grateful).
no where to entry that command? where is the console??
i could not find it
how to make sure andorid_sdk variable is available???
there is no console. i couldn’t type anything on corona simulator console!!!
rob
April 18, 2016, 5:23pm
11
If you are on a Mac, you have to open the “Terminal” app and type the command in. If you’re on Windows, Click on the Start button, type “cmd” in the search box.
Rob
hi Rob,
is this currently the same or only path to the android sdk? I tried: /Users/mikelly321/Android/sdk and /Users/mikelly321/Applications/Android/sdk
and got:
adb encountered an error installing the app:
ERROR: ANDROID_SDK does not point to a directory (/Users/mikelly321/Applications/Android/sdk)
thanks!
this worked:
launchctl setenv ANDROID_SDK /Users/mikelly321/Library/Android/sdk
no where to entry that command? where is the console??
i could not find it
how to make sure andorid_sdk variable is available???
there is no console. i couldn’t type anything on corona simulator console!!!
rob
April 18, 2016, 5:23pm
15
If you are on a Mac, you have to open the “Terminal” app and type the command in. If you’re on Windows, Click on the Start button, type “cmd” in the search box.
Rob
hi Rob,
is this currently the same or only path to the android sdk? I tried: /Users/mikelly321/Android/sdk and /Users/mikelly321/Applications/Android/sdk
and got:
adb encountered an error installing the app:
ERROR: ANDROID_SDK does not point to a directory (/Users/mikelly321/Applications/Android/sdk)
thanks!
this worked:
launchctl setenv ANDROID_SDK /Users/mikelly321/Library/Android/sdk