android sdk not found (copy to device and launch)

Just note that setting that launchctrl command actually doesn’t persist sesions in my experience.

To get osx to execute it every boot…(so you can set and forget :slight_smile: )

  1. Download this: https://dl.dropboxusercontent.com/u/28484098/Misc/environment.plist.zip

  2. Unzip it (it’s  plist)

  3. Place the unzipped plist file in ~/Library/LaunchAgents

Reboot computer and try again

EDIT : Uploaded the wrong file. Please download it again and repeat the procedure. You should be all set after this

Hi, I have the same problem here.

Tested:

launchctl setenv ANDROID_SDK /Applications/android-sdk-macosx

launchctl setenv ANDROID_SDK /Applications/android-sdk-macosx/tools/

launchctl setenv ANDROID_SDK /Applications/android-sdk-macosx/platform-tools/

Best

Andreas

Hi, i did as u said and rebootet

the RbMBA:~ snowwhitesinai$ launchctl getenv ANDROID_SDK

didnt showed nothing… (seems this auto plist did not worked)

i did  launchctl setenv ANDROID_SDK $ANDROID_SDK

manually again and tested the simulator … WORKED :slight_smile:
thank u so much !!! Finally !

Now I just have to look why this setenv did not worked automatically after restart.

anyhow its a big step forward.

thank u again

greets

chris

Glad you got it working Chris!

We got there in the end :wink:

yeah… super great :slight_smile:
Thank you again. WIthout ur help I may still not get it work …

Hi, any news about that?
Cant be believe me and A.lepel are the only guys with that problem.

greets

chris

Hello,

I’m having the same problem. Did you find the solution? Thank you.

Pau.

My command line I run is:

launchctl setenv ANDROID_SDK /Volumes/Macintosh\ HD/Users/rmiracle/Library/Android/sdk

But it should be noted I have my Android SDK installed on a second drive. You should not, under normal circumstances need the /Volumes/Macintosh\ HD. You must run this before you run Corona SDK. If you get the dialog box telling you to do it, exit Corona SDK, run the command in the command line and start Corona SDK back up.

Rob

Hello,

Thank you for your reply but I still have the same problem.

I have Android SDK in /Users/pauors/Library/Android/sdk

I write in the Terminal the folling command line:

launchctl setenv ANDROID_SDK /Users/pauors/Library/Android/sdk

Then I start Corona Simulator and I try to make a build. I get the same dialog box. It seems pretty simple… what am I doing wrong!?

Thank you in advance!

Pau.
 

I personally use .bash_profile (create in your home directory) to handle this stuff. It allows you to never have to type in any commands to set your android sdk path again.

Here is an example: (or extract the contents of the attached zip (contains the bash profile file) into your home directory)

# PATHS export ANDROID\_SDK=~/AndroidSDK export ANDROID\_TOOLS=~/AndroidSDK/tools export ANDROID\_PLATFORM\_TOOLS=~/AndroidSDK/platform-tools PATH=${PATH}:${ANDROID\_TOOLS}:${ANDROID\_PLATFORM\_TOOLS}

I tried all

the: launchctl setenv ANDROID_SDK /Volumes/Macintosh\ HD/Users/rmiracle/Library/Android/sdk

and also danny’s bash profile.

doesnt work.

could i have to do my sdk is on my dropbox folder 

PATHS

export ANDROID_SDK= /Users/snowwhitesinai/Dropbox/orga/SourceCodes/android/newsdk/

export ANDROID_TOOLS= /Users/snowwhitesinai/Dropbox/orga/SourceCodes/android/newsdk/tools/

export ANDROID_PLATFORM_TOOLS= /Users/snowwhitesinai/Dropbox/orga/SourceCodes/android/newsdk/platform-tools/

PATH=${PATH}:${ANDROID_TOOLS}:${ANDROID_PLATFORM_TOOLS}

do i need to restart my computer after settings the bash_profile?

greets

chris

@Corona

cant u guys simply do a select option , where we choose where the ADB is located?

You just need to restart the simulator/terminal

You can also use relative paths: (note the lack of spacing after the equals sign is intentional, you had spaces in yours, which you don’t want.)

# PATHS export ANDROID\_SDK=~/Dropbox/orga/SourceCodes/android/newsdk/ export ANDROID\_TOOLS=~/Dropbox/orga/SourceCodes/android/newsdk/tools/ export ANDROID\_PLATFORM\_TOOLS=~/Dropbox/orga/SourceCodes/android/newsdk/platform-tools/ PATH=${PATH}:${ANDROID\_TOOLS}:${ANDROID\_PLATFORM\_TOOLS}

Hi Danny,

I copied ur bash profile as it is into  my root.

/snowwhitesinai

or has it to be in my /macintosh HD??

restarted the Simulator… still the same… not found

also my ADB is in /tools   and also one in /platform-tools/ 

(i guess i copied once to both folders as it didnt worked… is that a prob?)

thanks for ur time

chris

also i was reading to use source ~/.bash_profile to activate it without rebooting

because when i do echo $PATH

it sill does not show the path we entered

so i did this source ~/.bash_profile and get

RbMBA:~ snowwhitesinai$ source ~/.bash_profile

-bash: export: `/Users/snowwhitesinai/Dropbox/orga/SourceCodes/android/newsdk/’: not a valid identifier

-bash: export: `/Users/snowwhitesinai/Dropbox/orga/SourceCodes/android/newsdk/tools/’: not a valid identifier

-bash: export: `/Users/snowwhitesinai/Dropbox/orga/SourceCodes/android/newsdk/platform-tools/’: not a valid identifier

Yep that’s the right place.

It’s named “.bash_profile” right? (note the period). Should be a hidden file that you can only see when you tell finder to show hidden files.

You can do this to reload the bash_profile file in the terminal: 

. .bash\_profile

You can do this to make sure it’s working (from the terminal):

echo $ANDROID\_SDK

It should print the path to your android sdk after you hit enter.

EDIT: You’re getting those errors because you have a space after the equals sign in the paths still

Hi,

ok, i removed the spaces

and now i get

RbMBA:~ snowwhitesinai$ . .bash_profile

RbMBA:~ snowwhitesinai$ echo $ANDROID_SDK

/Users/snowwhitesinai/Dropbox/orga/SourceCodes/android/newsdk/

RbMBA:~ snowwhitesinai$ 

 

seems ok… and I closed/newly opened the simulator and get

===  Android SDK Not Found
=== launchctl setenv ANDROID_SDK <path-to-sdk>

 

:frowning:

 

i really dont know

Final step!

Terminal again:

launchctl setenv ANDROID\_SDK $ANDROID\_SDK

I also did now:

RbMBA:~ snowwhitesinai$ launchctl setenv ANDROID_SDK ~/Dropbox/orga/SourceCodes/android/newsdk/

RbMBA:~ snowwhitesinai$ launchctl getenv ANDROID_SDK

/Users/snowwhitesinai/Dropbox/orga/SourceCodes/android/newsdk/

RbMBA:~ snowwhitesinai$ 

 

and after restart the simulator… STILL NOTHING :frowning:

i did also what u wrote last

RbMBA:~ snowwhitesinai$ launchctl setenv ANDROID_SDK $ANDROID_SDK

RbMBA:~ snowwhitesinai$ launchctl getenv ANDROID_SDK

/Users/snowwhitesinai/Dropbox/orga/SourceCodes/android/newsdk/

 

restarted the simulator… and still the same error message :frowning: