I have downloaded android-sdk_r08-windows.zip and installed it in c:\. When I try to run the SDK Manager, it briefly pops up a DOS window then closes. Trying to run adroid update sdk results in a null pointer exception. I have tried uninstalling/reinstalling the SDK for both android and java multiple times. This is on windows XP SP3. Any ideas?
Thanks,
John
C:\android-sdk-windows>java -version
java version "1.6.0_23"
Java(TM) SE Runtime Environment (build 1.6.0_23-b05)
Java HotSpot(TM) Client VM (build 19.0-b09, mixed mode, sharing)
C:\android-sdk-windows>tools\android.bat update sdk
[INFO] Starting Android SDK and AVD Manager
No command line parameters provided, launching UI.
See 'android --help' for operations from the command line.
java.lang.NullPointerException
at com.android.sdklib.internal.avd.AvdManager.parseAvdInfo(AvdManager.java:1155)
at com.android.sdklib.internal.avd.AvdManager.buildAvdList(AvdManager.java:1134)
at com.android.sdklib.internal.avd.AvdManager.<init>(AvdManager.java:376)
at com.android.sdkuilib.internal.repository.UpdaterData.initSdk(UpdaterData.java:230)
at com.android.sdkuilib.internal.repository.UpdaterData.<init>(UpdaterData.java:107)
at com.android.sdkuilib.internal.repository.UpdaterWindowImpl.<init>(UpdaterWindowImpl.java:86)
at com.android.sdkuilib.repository.UpdaterWindow.<init>(UpdaterWindow.java:54)
at com.android.sdkmanager.Main.showMainWindow(Main.java:297)
at com.android.sdkmanager.Main.doAction(Main.java:260)
at com.android.sdkmanager.Main.run(Main.java:99)
at com.android.sdkmanager.Main.main(Main.java:88)
Apparently my system had a residual .android folder lying around from when I played around with the android SDK over a year ago. Renaming that file resulted in the SDK Manager coming up.
Make sure the JDK path is added to the Environmental variables.Its usually happenes when a JDK/JRE uninstall is succeeded by another JDK install
Have you installed the JDK, rather than the JRE?
Also, check that your JAVA_HOME variable points to your JDK install path.
instead of opening android sdk manager open android.bat in tools folder. i think it is sdk\tools
You need make sure that:
1) JDK or JRE is installed
2) Within System Variables, the JAVA_HOME variable is set to your JDK/JRE folder (e.g. C:\Program Files\Java\jre7)
3) Your PATH variable includes %JAVA_HOME%\bin
Related
I am unable to run ionic run android. After I checked with cordova requirements, it shows
Android target: Not installed
Android SDK not found.
How should I solve the problem? I have my SDK in D drive where I have set ANDROID_HOME and path correctly, I suppose
Also, I do android list target, it shown as below. How should I intsall it if it is needed to fix teh error?
Attached the cordova android version
You can follow this link set ANDROID_HOME which I got help from or follow below guide.
I had similar trouble but managed to fix it. After successful installation of android studio, Android SDK will be downloaded by default to a directory like this "C:\Users\abc\AppData\Local\Android\sdk1" where "abc" in this case is your PC name. AppData is a hidden folder.
Next step is to set ANDROID SDK path. From Advanced System Settings, click Environment Variables then under User variables add New as shown below.
Next, add android 'tools' and 'platform-tools' to System variables' 'Path' as shown below. These tools are inside sdk folder.
Set up is done. Open cmd and issue android command. If all is well, you should see below output.
Finally open a new terminal window and navigate to your cordova project directory, in my case "hello" and check platfrom requirements. All should be fine now.
I had a similar problem. The issue was I was using the latest version of Java which was 10.0.1
You can check yourself by typing in terminal:
java --version
And it was
java 10.0.1 2018-04-17
Java(TM) SE Runtime Environment 18.3 (build 10.0.1+10)
Java HotSpot(TM) 64-Bit Server VM 18.3 (build 10.0.1+10, mixed mode)
Currently, Cordova needs on their documentation page as JDK 8. SEE DOC HERE
You can download JDK 8 from the official website here
Once you download you need to set up JAVA_HOME variable. Use this for setting up JAVA HOME when you have multiple version of JAVA installed.
Then you can run
cordova requirements
or
cordova build android
This worked for me. Hope it helps someone.
Getting fed up with this problem, heard android studio is better than eclipse in many ways, but I cant even start a single project with it because of this error, tried many solutions still its showing same thing, First i thought it was only when importing old eclipse project, but its not.
1) I tried uninstalling every jdk and jre and installed latest JDK 1.8.0_65 and set all paths and JAVA_HOME
C:\Users\username>java -version
java version "1.8.0_65"
Java(TM) SE Runtime Environment (build 1.8.0_65-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.65-b01, mixed mode)
C:\Users\username>javac -version
javac 1.8.0_65
C:\Users\username>set JAVA_HOME
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_65
2) Reinstalled android studio
3) Updated all sdk using sdk manager
still if i try to start a new project, i am getting the error
8:10:45 PM Invalid Project JDK
Please choose a valid JDK directory
Open JDK Settings
8:10:45 PM Gradle sync started
8:10:45 PM Gradle sync failed: Invalid Project Jdk
JDK Location by default it is showing C:\Program Files\Java\jdk1.7.0_10, And i am changing it to C:\Program Files\Java\jdk1.8.0_65, But seems like its not getting applied.
By the way, I am using 64 bit windows 7 and installed 64 bit java.Hope someone can guide me from this mess, its been few night am wasting time on this.
Adding screenshot of my JAVA_HOME
Below is the screenshot of JDK location that is showing inside android studio
In Android Studio 1.5.1, this error was shown in red: "Android SDK location should not contain whitespace, as this can cause problems with the NDK tools." The problem was never with the JDK location. It was with the SDK Location.
I moved the SDK folder out of Program Files because of the whitespace, changed D:\Program Files\Android\sdk to D:\Android\sdk, and the JDK location then stayed. Android Studio does not seem to like saving the JDK location value if there is an error with the SDK location.
Don't use cmd line, just do it normally.
if you use a error path, it will warn you .
go to your
C:\programFiles\Java
copy your Java folder
then go to your
C:\programFiles(x86)
paste the files there.
then go back to your androidstudio change your JDK directory to this
C:\programFiles(x86)\java\jdk1.8.0_74.
"mine is jdk1.8.074 yours might be different, put whatever yours is"
Hi I am trying to install android latest SDK in my windows 7 home basic 64 bit. I installed Java su 7 in my system before that. I checked java installation with java -version in cmd and the Path as well and it's giving correct . But when i try to install SDK, it says it can't find Java path.
Steps i followed while installing Java JDk.......
Downloaded JDKfrom oracle site.........
Installed it in my system..............
It's taking path C:\Program Files\Java\jdk1.6.0_35\bin....like this
I went to advanced system settings and environmental variables then system variables selected path variable clicked on edit option and added path in the end.
Again clicked on new system variable JAVA_HOME added jdk path..........
Is there any wrong in installation steps i followed.
Use JDK-6 instead of JDK-7 and then add jdk path to the system PATH and JAVA_HOME. in environment variables.
like this Computer-->Properties-->Advanced System settings-->advanced tab-->system variables-->add PATH in user variables and JAVA_HOME in System variables.
I am trying to plug-in android in to my laptop
Configuration: vista OS, 64 bit and RAM 4GB
I install the Eclipse, JDK 7 and installer_r18_windows.exe file from android site. when I try to run the windows installer it shows the message
Error:Failed to find the java version for C:\Windows\System32\java.exe: the system cannot find the file specified. and at last
if you believe you have a JDK installed and it was not properly recognized,simply set an environment variable JAVA_HOME to point to it
I don't know how to set an environment variable. How to solve this problem ?
Step 1
Make sure You have installed Java 64 bit version
Step2 copy c:\windows\system32\java.exe to c:\windows\syswow64
And last to learn How to set Environment Variables here you go
http://java.com/en/download/help/path.xml
Last Thing
If you are installing 32bit java version
Installation path will be
C:\Program Files (x86)\Java\jdk1.6.0_21\bin
If you are installing 64but java version
Installation path will be
C:\Program Files\Java\jdk1.6.0_21\bin
So set this path in Environment variables.
When I try to install the android SDK it fails to install.
My OS is Windows XP
I just downloaded and installed Java JDK 1.6
Java -version from the command line returns:
https://stackoverflow.com/questions/ask
java version "1.6.0_17"
Java(TM) SE Runtime Environment (build 1.6.0_17-b04)
Java HotSpot(TM) Client VM (build 14.3-b01, mixed mode, sharing)
My environment vars have:
JAVA_HOME=c:\progra~1\java\jdk1.6.0_11
I downloaded android-sdk-r04-windows.zip
I unziped it in V:\AndroidInstall\
When I go to the
V:\androindinstall\android-sdk-windows>
and type "SDK Install.exe" nothing happens...
If I go this from graph
When I do this from a graphical file viewer I get a quick flash that looks like a command line window and nothing....
When I try to run
android list targets
from the tool directory I get:
Error: Error parsing the sdk.
Error: V:\androindinstall\android-sdk-windows\platforms is missing.
Error: Unable to parse SDK content.
So the basic install setup is not happening.
Additional clues:
I have a G1 and Android 1.0 was running on this machine. (Almost a year ago)
I've updated my G1 to 1.6 so I thought I'd update my SDK before starting new development.
When I tried to upgrade it tried and then died as the "directory was in use"
So I cleaned out all the android directories, rebooted and redownloaded everythign from scratch.
Now it won't run at all.
I've clearly got something in an unhappy state, but I've cleaned up all the directories and no remanants seem to be running I've rebooted....
I've missed somethign I just can't figure out what.
Paul
You should manually create 2 more directories under your root sdk dir 'android-sdk-windows':
platforms
add-ons
and than start SDK Setup.exe from the root directory or try to open it from Eclipse
'Window' -> 'Android SDK and AVD manager'
Run the SDK setup
Wait for the error message
Disable anti virus
Install this unlocker program http://download.cnet.com/Unlocker/3000-2248_4-10493998.html
Run the unlocker program
select the tools directory to unlock it
select yes in the installer.
This is what worked for me.
http://code.google.com/p/android/issues/detail?id=4410#c41
The directories "platforms" and "add-ons" need to be manually installed in the android SDK directory (parallel to "tool"). This is only necessary in a new installation.
I had the same problem, adding the directory add-ons got rid of the error when eclipse is first open but I still couldn't download packages from the sdk manager.
What solved this problem for me (in windows 8) is running eclipse as administrator.
I got this error from my Jenkins CI.
It was because the Jenkins user did not have permissions on the android-sdk-linux folder.
(not the best solution but fixed it with):
sudo chmod -R 777 /usr/bin/android-sdk-linux