Android sdk manager not opening - android

My sdk manager is not opening..when i try to open it from within eclipse it displays :
[2014-02-01 17:37:06 - SDK Manager] [SDK Manager] 'xcopy' is not recognized as an internal or external command,
[2014-02-01 17:37:06 - SDK Manager] [SDK Manager] operable program or batch file.
I had a problem opening eclipse itself but i solved it .. the problem was that sdk was searching for jre in the android sdk (eclipse) folder itself but it was in C:\program files\java\jre7 .So i copyed jre7 from there to eclipse folder and renamed it to jre..and eclipse started working....BUT THE SDK MANAGER DOES NOT START IT JUST FLASES FOR a sec.

Open sdk/tools/android.bat in notepad
set java.exe path in android.bat file
your java.exe path like that
set java_exe="C:\Program Files (x86)\Java\jre6\bin\java.exe" in android.bat file

Follow these steps and it help for me after a long time with all ways above not effect on windows7 64-bits, no need to have JAVA_HOME system variable or edit android.bat
Download Android Studio within Android SDK, Java JDK 64 bits and Java JRE x86
Install Java JRE first, then install Java JDK 64 bits, and the Android Studio last.
Now you start Android Studio first (64 bits version) it require to have JAVA_HOME setting to run JVM, just copy the jdk.x.x.x(version) folder (my PC: jdk1.8.0_25 from "C:\Program Files\Java\")folder to Android Studio folder and rename that folder (in Android Studio) to "jre" (jdk1.8.0_25 -> jre).
Now it work for me to open Android SDK Manager from anywhere, if you want to use eclipse (not official now) just copy the java jre.x.x.x(version) x86 folder (from where you install before) to Eclipse and rename to "jre". After coping, choose the Android SDK path in Eclipse to use, It works for both Android Studio and Eclipse.
Mind your antivirus if still refusing you (remove antivirus and install after you sure it not cause problem)!

1)go to sdk-tool-android.bat file and open it by right click then edit and then set java_exe path.Yo have to set path as in step 2
2)set java_exe=C:\Program Files\Java\jre7\bin\java.exe Location of your JRE may vary as might installed in other location
3)After doing this Run Android studio as administrator and also run your Eclipse as administrator
Then Have Fun..

If you face an "xcopy" problem please try running sdk/tools/android.bat as admin. If it still happens this may mean that there is a problem with proper reading of a relative path in the batch, and in order to solve it you can amend one line of the batch from "xcopy %swt_path% %tmp_dir%\%swt_path% /I /E /C /G /R /Y /Q > nul" to "C:\Windows\System32\xcopy %swt_path% %tmp_dir%\%swt_path% /I /E /C /G /R /Y /Q > nul"

Related

adb.exe not found after installing Android Studio

I installed Android Studio 1.2.1.1 and also created virtual device. I am trying to install one app (APK file) through command line but I could not find adb.exe file on my machine. Please help where should I look for adb.exe file on the machine.
The adb.exe file will be located at your Android SDK folder, inside platform-tools
...\android-sdk-path\platform-tools\adb.exe
The default location where Android SDK is installed is:
C:\Users\<insert username here>\AppData\Local\Android\sdk\
So adb will be located at:
C:\Users\<insert username here>\AppData\Local\Android\sdk\platform-tools\adb.exe
To access it on a command line, open cmd.exe and type:
cd C:\Users\<insert username here>\AppData\Local\Android\sdk\platform-tools\
and then your normal command
adb <insert parameters here>
May be adb.exe file is missing form your computer. Try deleting platform-tools folder and re-download it from SDKManager.
Mac OS El Capitan has it located at /Users/[username]/depot_tools/src/chrome/browser/devtools/device
In my case, adb.exe got deleted after Android Studio update. I copied all the contents under platform-tools to another directory, deleted all the contents under platform-tools and installed platform-tools from Android SDK Manager.
Make sure in Android Studio, under System Settings > Andorid SDK > tab called SDK Tools, you have checked this option:

Android SDK not working

The Android SDK doesn't open so i tried to open Android.bat to see the errors and I get this Error:
The system cannot find the file specified.
The system cannot find the file specified.
The system cannot find the file specified.
The system cannot find the file specified.
Error: Could not find or load main class com.android.sdkmanager.Main
Press any key to continue . . .
Here is my Environment Variables:
ANDROID_SWT: C:\adt-bundle-windows-x86\sdk\tools\lib\x86.
JAVA_HOME: C:\Program Files\Java\jdk1.7.0_25. JDK_HOME:
C:\Program Files\Java\jdk1.7.0_25. PATH:(Sorted that it will be
Readable)
C:\Python33\; %SystemRoot%\system32; %SystemRoot%;
%SystemRoot%\System32\Wbem;
%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\; C:\Program
Files\Microsoft Network Monitor 3\;
C:\adt-bundle-windows-x86\sdk\platform-tools;
C:\adt-bundle-windows-x86\sdk\tools;C:\PHP; C:\Program
Files\TortoiseSVN\bin; C:\Program Files\Microsoft SQL
Server\110\Tools\Binn\; C:\Program Files\Microsoft Visual Studio
11.0\VC\bin; C:\Program Files\OpenVPN\bin.
I searched the whole web and i couldn't find any answer, i would like if you will help me to fix it.
Thanks!
Taken from the possibly duplicated thread:
The latest SDK has AVD Manager in the SDK Manager itself. Open SDK
Manager -> Tools -> Manage AVDs
Did you try installing the JDK outside Program Files? That is install it in a directory, which does not have any spaces in the path. For example install the JDK in the following directory and try again
c:\installs\java
Make Sdk update to repair the sdk bundle and try making some
avds
Your JAVA_HOME might be configured wrongly. Trying changing the path to C:\Program Files\Java\jdk1.7.0_25\jre\bin

the sdk manager won't open after trying everything

I have installed the Android SDK but I can't get the Adroid SDK manager to open.
I have looked everywhere on the internet and this is what I have already done which didn't help:
1. run sdk as administrator
2. adding a path pointing to the JDK in all of these forms :
C:\Program Files\Java\jdk1.7.0_21\bin;%SystemRoot%\system32;
C:\Program Files\Java\jdk1.7.0_21\bin;
C:\Program Files\Java\jdk1.7.0_21\
C:\Program Files\Java\jdk1.7.0_21
C:/Program Files/Java/jdk1.7.0_21/bin;
none of them worked ..:-(
3.
Step #1: Open up a command prompt.
Step #2: Use the cd command to move to wherever you installed your Android SDK.
Step #3: Run tools\android.
after doing it I got an error message that said that :
ERROR: No suitable Java found. In order to properly use the Android Developer
Tools, you need a suitable version of Java installed on your system.
4. deleting 3 times the sdk and reinstalling it.
5. Deleting the .android folder from the user (C:/Users/[User Name]) directory
By the way I have Windows 7 , and I have downloaded the 64 -bits sdk.
I am so helpless.. I ll appreciate a lot a solution...
Shiran
I had the same problem. Try to add an environment variable :
JAVA_HOME : "C:\Java\jdk1.7.0_25\".
It solves problem for me.
WRT Ubuntu 14.04:
You may not have java installed globally in your machine. My fix was to do:
sudo apt-get install openjdk-7-jdk
After was I able to run the SDK Manager.

Android SDK Manager will not run

i'm on a Windows 7 Pro x64 with java jdk 7u7.
I try to install the Android SDK on my computer, but when i launch SDK Manager.exe, a dos-windows is opening and instantly closing. So i tried to launch tools/android.bat. But that didn't work, it say to me that :
"'C:\PROGRA~2\Android\ANDROI~1\tools\lib\\find_java.exe -s' isn't a external or internal command ...
ERROR No suitable java such ..."
What i have do for fix error :
Install Java 6u35
Install Java x32 and x64
Check my path
Launch in administrator
Install in C:\Dev the sdk
Install with android-sdk.zip or with android-sdk.exe
Add android directory in path
But anyone of this try was successful.
Someone can help me?
There appear to be several ways to launch the SDK Manager:
SDK Manager.exe in the root of the Android SDK.
SDK Manager.exe in sdk\tools\lib of the Android SDK.
Window -> Android SDK Manager menu in Eclipse
android.bat in sdk\tools of the Android SDK.
In my case, it looks like android.bat fails on the line:
for /f %%a in ('%java_exe% -jar lib\archquery.jar') do set swt_path=lib\%%a
As far as what that line is doing... if I manually run: "[path_to_java]java" -jar lib\archquery.jar
It successfully returns: x86_64
But when the batch file runs that same command, I don't know why but it fails with the error message:
Unable to access jarfile lib\archquery.jar
So the variable swt_path gets set to an empty string. Everything breaks down from there.
The batch file sets the correct value for the variable java_exe. Others have commonly reported this as a problem, but those workarounds weren't relevant in my case.
People have recommended commenting out the problem line by adding REM to the beginning of it, and adding a line to manually set the swt_path variable, which is a valid workaround:
REM for /f %%a in ('%java_exe% -jar lib\archquery.jar') do set swt_path=lib\%%a
set swt_path=lib\x86
BUT, the critical issue in my case is that it's choosing to load a jar file from either the lib\x86 or the lib\x86_64 folder here. At some point, things were getting confused between the BAT file error, a 32-bit JDK, and a 64-bit Android SDK.
SO, the workaround in my case was to:
Uninstall ALL versions of Java
Install the JDK
You can either use the 32-bit Android SDK and install the 32-bit JDK
Or use the 64-bit Android SDK and install the 64-bit JDK
But the "bitness" of the JDK should match the Android SDK. It appears that either of the 32-bit or the 64-bit will work on a 64-bit computer, AS LONG AS the JDK bitness matches the Android SDK bitness.
Edit "android.bat"
If using the 32-bit Android SDK/JDK, use lib\x86:
REM for /f %%a in ('%java_exe% -jar lib\archquery.jar') do set swt_path=lib\%%a
set swt_path=lib\x86
If using the 64-bit Android SDK/JDK, use lib\x86_64:
REM for /f %%a in ('%java_exe% -jar lib\archquery.jar') do set swt_path=lib\%%a
set swt_path=lib\x86_64
After doing this, I can successfully run the SDK Manager by running android.bat, or from the Eclipse menu (but still not by running either of the SDK Manager.exe files directly).
I had this answer just this week and have determined what is causing it.
When Java updates it changes the path where the executable files are stored. This means that when the SDK manager goes to look up javaw.exe it cannot find it and instantly closes.
Therefore re-installing the Android SDK will NOT solve the problem.
Neither will re-installing JAVA.
The only way to solve this problem is to correctly point to the location where JAVA is stored.
Windows has a way of doing this called an Environmental Variable.
There is a variable called PATH which stores all the directories where Windows will look for executable files.
Thus you have to to modify that PATH variable to include a path to JAVA.
By default JDK 7 has the following path:
C:\Program Files\Java\jdk1.7.0_10\bin
To edit your Environmental Variables do the following.
From the Start Menu right click on Computer and select "Properties"
This will take you to the Control Panel System Menu
On the left column look for the option "Advanced System Settings"
This will open a System Properties window
One of the tabs is named Advanced
In that there is a button that says Environmental Variables
If you search your System Variables you will see one called "Path"
Edit that variable and add the path above to include the latest Java Path.
Once you are done the SDK Manager should immediately be able to open up and you can continue updating to the latest revision of the Android SDK.
Once the updates complete don't forget to make sure your IDE (ie Eclipse) is pointing to the correct location where the SDK is stored so that it reads the latest Android SDK files. To access this setting in Eclipse, go to Window -> Preferences -> Android
This will allow you to manually set the path where the SDK is stored.
The only thing that helped me was reinstalling java into a path that did not contain any spaces, so instead of C:/Program Files to C:/Java and change the Path variable to the new value.
Hope this helps.
I had the same issue and it's most likely caused by spaces in the path names. It's known that spaces in path names and batch files don't combine well together.
You can verify that by opening a command line prompt, changing the location to %SDK%\tools\lib and running find_java.bat. You will get an batch error like
'C:\PROGRA~2\Android\Android' is not recognized as an internal or external command,
operable program or batch file.
Just install the SDK into C:\Android\SDK and the NDK into C:\Android\NDK and it will work.
This is how I finally fix it
open tools/android.bat
set java_exe=
call lib\find_java.bat
if not defined java_exe goto :EOF
replace it with your java path
set java_exe="c:\PROGRA~1\Java\jdk1.7.0\bin\java.exe"
Note:
Do not use C:\Program Files\Something it throw an error because of the space
use the short name notation C:\PROGRA~1\Something
and it will work like charm
Same issue for me SDK Manager.exe just stopping with no error message or windows event.
I fixed this with a hybrid of the already provided answers (I'm running on Win 8.1). The problem appears to be that the java.exe targeted by find_java was out-of-step with the recently installed JDK version.
for me:
<sdk> was C:\Users\Simon\AppData\Local\Android\sdk
<jdk> was C:\PROGRA~1\Java\jdk1.7.0_80\bin
I added my JDK install path to the PATH environment variable e.g. ...;C:\PROGRA~1\Java\jdk1.7.0_80\bin;...
After opening a new command window and running find_java.bat in the <sdk>\tools\lib\ folder I noticed that the java_exe env variable was set was to C:\Windows\System32\java.exe which was not what I expected.
I deleted (well renamed) the java.exe in C:\Windows\System32
I ran find_java.bat again and now the java_exe env variable was set to java_exe=<jdk>\java.exe as expected.
Then in <sdk> I could run SDK Manager.exe successfully.
Changing the JAVA_HOME from existing pointing to a JDK path to a JRE path works for me.

how can i launch the android tool?

I need to do somethings that must be done from the command prompt of the android tool.
but every one says it's in the platform tools folder in the sdk path but which file is it?
that might help:
the contents of platform tools folder:
aapt.exe
adb.exe
aidl.exe
dexdump.exe
dx.bat
fastboot.exe
llvm-rs-cc.exe
source.properties
AdbWinApi.dll
AdbWinUsbApi.dll
Did you mean android Adb command lin tool if so see this link
if you want to manage emulator from command line see these three link it will help you a lot
Android Emulator
Using the Android Emulator
Android Emulator on Linux
There is an android command, but it's not an executable - run the android.bat in the tools directory, and you should be able to make the changes you need. If you add the tools directory to your system path, you'll be able to run android from any directory when using the command line.

Categories

Resources