So I'm having the same issue as this guy in this question
android' is not recognized as an internal or external command
But when I changed my PATH variable and added the path to android.bat my cmd still does gives
'android' is not recognized as an internal or external command,
operable program or batch file.
My PATH looks like this
D:\Program Files\Java\jdk1.7.0_04\bin;D:\BossGrand\Programing\Ant\apache-ant-1.8.4\bin;C:\Program Files\TortoiseSVN\bin;D:\Program Files\Android\tools
and I made sure android.bat is inside D:\Program Files\Android\tools
I know this because when I go to this directory I can use the android update project command just fine
Does anyone know why I still can't use the android command?
Use the command prompt with admin .It work for me : )
You might have installed Cygwin as part of the SDK. I had the same problem "android.bat is not recognized as an internal or external command". So, Uninstall the Cygwin and try again (you might not able to uninstall Cygwin, since a mysterious “permission denied” when deleting the Cygwin files by default). You need to own access to this mysterious Cygwin files by doing
Take ownership: takeown /r /d y /f cygwin (do this, wherever is your cygwin folder is)
This command takes ownership recursive of the folder, without asking anything and gives Full Access to Everyone recursively in the folder:
icacls cygwin /t /grant Everyone:F And finally, the command which deletes it all and removes Cygwin:
rmdir /s /q cygwin Good bye Cygwin!
Now try again. (This worked for me)
PS: You can always re-install cygwin again. So, nothing wrong giving it a try. Good Luck
you must enter the command with complete arguments
android update project -p .
be carefull you must enter a dot at the end of command.
Related
When i'm executing "cordova platform add android" the command return this :
Error: /Users/brieuc/.cordova/lib/android/cordova/3.6.4/bin/create: Command failed with exit code EACCES
at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:135:23)
at ChildProcess.emit (events.js:95:17)
at Process.ChildProcess._handle.onexit (child_process.js:818:12)
I've read that it could be a problem of permission so i've tried to use "sudo cordova platform add android" but the same error is returned.
I also tried to use chmod 777 on my project folder and platforms folder.
I tried to remove the platforms folder, the folder is recreated then same error is returned.
For your information, the commands "java", "ant", "cordova", "npm" are all recognize.
My only guess is that my Path to the SDK is wrong.
Here what i've done :
(I'm on Mac Yosemite for the information)
I downloaded the Standalone SDK tools.
I created a folder /Development/Android and added the unzipped downloaded folder (android-sdk-macosx).
For your information the "platforms" folder is empty.
i added to the /etc/paths the path to /Development/Android/android-sdk-macosx/tools
I'm not sure it should be here, any hints or solutions would be appreciated.
I don't think the problem is on your project. The problem seems to be in
/Users/brieuc/.cordova/lib/android/cordova/3.6.4/bin/create
which doesn't have the necessary rights to be executed. Try to apply something like this command for that folder
chmod -R 777 /Users/brieuc/.cordova/lib/android/cordova/3.6.4/bin
It should give it all rights and thus let create to be executed.
#Brieuc Here is solution for your new problem.
You need to specify Android SDK Path in .profile file located in your home.
In terminal,
sudo nano ~/.profile
Then add these lines at the end, save and close .profile. (You may have different paths for your Android SDK and ANT. ANT Path may not be necessary to set for you right now)
export ANT_HOME=/usr/share/ant
export ANDROID_HOME=/home/sagun/bin/android-sdk
export PATH=$PATH:$ANT_HOME/bin:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
Now at the terminal, you must notify the OS about the changes you made to .profile
source ~/.profile
If that doesn't do it, restart linux
Now, you may still face some permission issues, for that navigate to your android-sdk/tools and then enter
chmod +x android
Hope this helps you :)
when ever I run the cordova/build, I get following ERROR:
Execute failed: java.io.IOException: Cannot run program "../android-studio/sdk/build-tools/android-4.4W/aapt"
what should I do?
I moved my Android Developer Tools (ADT) folder from Ubuntu's partition to Linux Mint's partition, but accidentally put in inside my web server's root folder and the permission of ADT's folders were set to 755, the files were set to 644 by my shell script to rebuild the permissions for my new web server.
After I moved ADT to my home folder and started using Android Studio, I got this problem.
sudo chown $USER:$USER -R /home/myusername/my-adt-folder
doesn't help.
GNU C Library was already installed by default. Not sure why it is related to this problem.
I decided to set 777 permission to ADT and it worked.
sudo chmod 777 -R /home/myusername/my-adt-folder
That's it.
It seems another system user in the system needs to access to android-4.4W/aapt file.
I solved it by installing lib32-glibc.
https://www.archlinux.org/packages/multilib/x86_64/lib32-glibc/
If you just want aapt on Arch without the overhead/hassle of setting up ADT then you can try the solution that I presented on the Android Enthusiasts site here.
My android command wasn't working and people were saying it was because I didn't have a path setup to it, but I checked my ./bash_profile and it was set up. So someone suggested I run the command chmod 777 android and then I could run ./android sdk from the tools folder. I did this and it worked and I could run commands but instead of using the android command, I had to use ./android. How can I fix this so I can use the android commmand instead of ./android
Please check your PATH variable by echo $PATH, My best guess is, that the android tools path is not included. In my case it is
$HOME/bin/android-sdk-linux/tools
echo $PATH should print something like this
$HOME/android-sdk-linux/tools:$HOME/android-sdk-linux/platform-tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
If the android sdk dirs are missing in PATH and you set it in $HOME/.bash_profile:
. $HOME/.bash_profile
will set the PATH.
Make sure . $HOME/.bash_profile is sourced when opening the shell. Configurations differ with every linux distribution here.
If you've only just installed the android sdk you'll need to source your bash_profile again with the source or dot commands. Alternatively, just close your shell and reopen it.
source ~/.bash_profile
. ~/.bash_profile
Alternatively, if that's not it echo $PATH in a shell and double check there's an entry to the bin folder of the sdk.
I use Ubuntu 11.10 and eclipse for Android development. I used to keep the android-sdk in my home folder, but because of low space, I copied it to the hard disk. When I moved the sdk to the hard disk, I did not have permissions to run adb, aapt or other platform tools. So, I edited the /etc/fstab file and added the following line
/dev/sda3 /media/hdisk ntfs-3g defaults 0 0
Now, when I execute the command ls -l | grep "sdk" in the terminal, i get this output
drwxrwxrwx 1 root root 4096 2012-10-20 16:07 android-sdk-linux
So, I have the permissions now, but when I run eclipse, the R.java file is still not generated, but the BuildConfig.java file is generated. I can run aapt from the terminal, but doing it every time I change the code is not practical. Any suggestions?
In case you have a 64bit Linux running, this command may help you:
sudo apt-get install ia32-libs
Had the same issue and that one did the trick. Found here.
Its a very basic check but have you changed the location of the Android SDK within Eclipse?
Preferences -> Android -> SDK Location
This problem seems have to solved itself after restarting my PC about 2-3 times. Thanks for all the help everybody.
When launching DDMS from the command line in Lion (10.7.3) I get the following error:
E/adb: Failed to get the adb version: Cannot run program "/Users/stevieo/android-sdk-macosx/tools/adb": error=2, No such file or directory
This makes sense to me because adb is actually in: /Users/stevieo/android-sdks/platform-tools
How can I modify this path so that ddms will launch on my system?
I have looked into the ddms file itself, but cannot decipher its intent.
One note, I do NOT have this issue on Snow Leopard (10.6.8)....
TIA for any thoughts or assistance.
Regards,
Steve O'Sullivan
If you look into your tools directory where you launched ddms, you will see the adb_has_moved.txt which says:
The adb tool has moved to platform-tools/
If you don't see this directory in your SDK,
launch the SDK and AVD Manager (execute the android tool)
and install "Android SDK Platform-tools"
Please also update your PATH environment variable to
include the platform-tools/ directory, so you can
execute adb from any location.
To solve this, I would change your ~/.bash_profile to have a line like:
# --- add Android platform-tools directory
PATH=~/android-sdks/platform-tools:$PATH
export PATH
Make sure to open up a new Terminal window so it will reload ~/.bash_profile
Note that a possible reason why it is working on your 10.6.8 installation is that you may have an older version of the Android SDK, where adb was in still in the tools directory.
If you are trying from eclipse,
Please make sure to create a adb link in /usr/bin/ directory which should solve the problem:
Ex: ln -s /Users//android-sdks/platform-tools/adb /usr/bin/adb
Note: logging as sudo/root may be required