When running flutter doctor in the cmd it is indicated that android licenses need to be accepted by running the command flutter doctor --android-licenses.
Running the command got me an error that a repositories.cfg could not be found at a specific directory.
I did create the empty file in the directory and waited 4~5 minutes as suggested in this SO post repositories.cfg could not be loaded.
Running the command again results in a new error:
Warning: An error occurred during installation: Failed to move away or delete existing target file: C:\installs\sdk\tools Move it away manually and try again..
Deleting the tools folder did not solve the issue.
What do I have to do to be prompted to accept the Android licenses?
A way to resolve the issue is to copy the tools folder to another place (e. g. C:\temp). Then navigate the cmd to the directory with cd C:\temp\tools\bin
sdkmanager.bat --sdk_root=YOUR_DIRECTORY_HERE --licenses
YOUR_DIRECTORY_HERE should be replaced with the path to your original SDK folder (C:\installs\sdk). Once that is done, delete the C:\temp\tools copied folder.
This answer was influenced by Can't update \tools - Android SDK Command Line Tools for Windows
Related
if i type in buildozer -v android release.and not in root.
Check that aidl can be executed
build-tools folder not found /home/m/.buildozer/android/platform/android-sdk-20/build-tools
Search for Aidl
Aidl not found, please install it.
but if i type in aidl
enter image description here
I have been having this error for a long time and multiple instances, even after trying to reinstall Aidl, reinstall buildozer, and deleting .buildozer project file.
Problem
This was caused by installation of wrong/outdated/mixed android-sdk build tools at;
~/.buildozer/android/platform/android-sdk/build-tools
Note:
Buildozer can only build without Aidl error if only the latest/correct android-sdk build-tools are installed.
Solution
Navigate to android-sdk build-tools path as shown below;
cd ~/.buildozer/android/platform/android-sdk/build-tools
Check the latest build tool you have, type;
ls
You should see a list of folders with names 29.0.0, 29.0.2, or any other folders.... this can be different. Note the latest version, eg (from example above is 29.0.2)
If this folder is empty proceed.
Type;
sudo rm -Rf *
Then run the following command;
cd ~
On the command below, replace "build-tools;29.0.0" version flag with your latest version (Noted above from ls command). eg ("build-tools;29.0.0" to "build-tools;29.0.2"). Use the command as it is if the build-tools folder was empty.
Hit enter to download.
~/.buildozer/android/platform/android-sdk/tools/bin/sdkmanager "build-tools;29.0.0"
Navigate to your Buildozer build project folder, run;
buildozer android debug
I hope this will help you solve the problem.
I've set up my paths to point to the Android SDK tools via this command:
# Cordova command line tools for Android SDK ----------------------
export PATH=${PATH}:/Development/adt-bundle/sdk/platform-tools:/Development/adt-bundle/sdk/tools
When I echo out the $PATH, this is what I get:
/Users/lorenzoignacio/.rvm/gems/ruby-2.0.0-p0/bin:/Users/lorenzoignacio/.rvm/gems/ruby-2.0.0-p0#global/bin:/Users/lorenzoignacio/.rvm/rubies/ruby-2.0.0-p0/bin:/Users/lorenzoignacio/.rvm/bin:/usr/local/bin:/usr/local/heroku/bin:/usr/local/share/npm/bin:/Users/lorenzoignacio/.local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/local/git/bin:/usr/local/go/bin:/Development/adt-bundle/sdk/platform-tools:/Development/adt-bundle/sdk/tools
If you look at the end of it, you see my path:
/Development/adt-bundle/sdk/platform-tools:/Development/adt-bundle/sdk/tools
And yet when I try to run the cordova platform add android I get:
[Error: The command `android` failed. Make sure you have the latest Android SDK installed, and the `android` command (inside the tools/ folder) added to your path. Output: /bin/sh: android: command not found]
The entire adt-bundle is located in my root user directory in a directory called Development. The exact path is /Users/me/Development/adt-bundle/
What Am I missing?
What Am I missing?
You are missing two ~ characters, perhaps.
The exact path is /Users/me/Development/adt-bundle/
That's not what you typed into your PATH. Your PATH says that there is no /Users/me -- instead, PATH is expecting a /Development directory in the root of your volume.
Now, in Linux, the solution would be to add a ~ to indicate that /Development is relative to your home directory:
export PATH=${PATH}:~/Development/adt-bundle/sdk/platform-tools:~/Development/adt-bundle/sdk/tools
My OS X shell experience is rusty, so I forget if ~ will map to /Users/me or not. If it does, use ~, otherwise, go with:
export PATH=${PATH}:/Users/me/Development/adt-bundle/sdk/platform-tools:/Users/me/Development/adt-bundle/sdk/tools
Thanks to #CommonsWare for helping me out with my $PATH issues.
In addition to the solution, it turns out that the latest ADT only contains Android Target 18.
Phonegap v3.0.9 seems to run Android Target 17, so I downloaded that and it now works wonderfully.
I'm on mac, I think I've done everything right so far. following these instructions:
http://developer.android.com/sdk/installing/adding-packages.html
it says to navigate to tools/ directory in terminal. Here are my steps.
Open terminal
cd Applications
result is: No such file or directory
path to my tools directory is as follows
Applications->adt-bundle-mac-x86_64-20130219 ->SDK -> tools
I tried putting my folder onto my desktop, both the tools folder, and my adt-bundle because I could change directory to my desktop, and when I enter ls to the terminal I see my tools folder, and my adt-bundle is there,
but the problem is when I try to enter
cd tools
or
cd adt-bundle(etc...)
it says that it is not a directory.
what do I do?
Go to this directory:
cd /adt-bundle-mac-x86_64-20131030/sdk/tools
and run:
./android
I recently encountered this issue, and figured I'd post on this for clarification or for anyone still encountering it.
It seems you have to be at the root of the /adt-bundle-mac-VERSION/sdkdirectory in order to execute the "android" command.
I normally cd into the directory until I reach the location of the command, but in this case I encountered the same issue as the original poster.
You must use the tab key to the android command...
ie...
locate your installation /adt-bundle-mac-x86_64-20131030/sdk hit TAB key /tools hit TAB key /android
instead of cd adt-bundle-mac-x86_64-20131030/ cd/sdk cd/tools android
If done properly the SDK manager should launch for you.
Hope this helps anybody out there.
You can launch the SDK Manager by using the GUI:
Launch Android Studio
Create a new blank project
In the toolbar, look for the icon with tooltip "SDK Manager"
A lot of answers have been given here that you should go to /{path-to-your-android-sdk}/tools
and run ./android.
For me, this did not work. When I opened the android file located at my /{path-to-your-android-sdk}/tools directory with a text editor, it contained the following:
#!/bin/bash
echo The "android" command is no longer available.
echo For manual SDK and AVD management, please use Android Studio.
echo For command-line tools, use tools/bin/sdkmanager and tools/bin/avdmanager
exit 1
So the right approach now, is as stated by #Shijil in his comment.
In the directory for your android sdk, you should use:
For SDK Manager:
cd tools
cd bin
./sdkmanager
For AVD Manager:
cd tools
cd bin
./avdmanager
NB For the last command in each of the options above, you will have to supply additional args depending on the operation you want to perform. An example arg that works for both is --list. Running the commands without any args will only display the possible args you could have passed.
Personally, I think using the GUI in android studio is easier. Especially for linux beginners.
Use cd /users/user/...your path.../android-sdk/tools
and then :
./android
Here is your "tools" directory for Android Studio in OS X El Captain(Yosemite also has the same path hopefully):
Users/user-name/Library/Android/sdk/tools
In the terminal, just type: Library/Android/sdk/tools
and hit enter. And you are in the tools folder.
Please note that user-name refers to the mac user
Better open terminal and type which android.
It will tell you the path where you have the package installed.
Then yeah, you just have to execute that path on the terminal.
Your android package might have been installed with Homebrew or others, so the path can be different.
Edit: typo
For me the directory was cd /Users/your_user_name/Library/Android/sdk/tools/
and after that the command was ./android list targets
I hope this can help
I'm running Jenkins on Mac OS. I have an ant build file that tries to execute <exec executable="android"> in one of the targets. I have the correct path as I've included android sdk tools and platform-tools folders to it, but I am still getting the following error.
android can't find sdkmanager.jar
If I move described jar from lib folder to tools folder I'm getting some other similar error related to another jar, so it seems it just can't get this jar from lib folder. Please help.
I solved my problem. I had correct path and sdk installation directory. Problem was that my Jenkins was running under another user and couldn't locate directory with android lib because they where denied for it. So problem was in sdk folder permissions.
I've just ran chmod -R 0755 mySdkDirLocation from console under bash and became the happiest developer on earth for the moment:)
After I ran chmod -R 0755 mySdkDirLocation. The error "android can't find sdkmanager.jar" went away. But when I ran android update sdk -u, I cannot install archives. So I ran chmod 777 mySdkDirLocation. Then the downloading worked.
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