Error : set an Environment variable JAVA_HOME to point to it? - android

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.

Related

Gradle sync failed Invalid Project Jdk

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"

JAVA_HOME Issue occurs while installing Android studio

I have tried to install the Android Studio 64-bit operating system(windows 7 ultimate)in my machine and set the JAVA_HOME as C:\Program Files\Java\jdk1.7.0_21; in the environment variable but it's reports the following error:
The environment variable JAVA_HOME(with the value of C:\programFiles\Java\jdk1.7.0_21;)does not point to a valid JVM installation.
How can i resolve that one.
First try to run java from the directory you are using as default installation.
There could be some problems with spaces.
Firstly Update your Java Version to 1.8.x......
Be sure that your JDK is 64 Bit.
Point your JAVA_HOME variable to C:\Program Files\Java\jdk1.8.0_xx\ where "xx" is the update version number.
And be sure to put JAVA_HOME in System Variables rather than User Variables

Titanium setup runtime error

Iā€™m trying to set up Titanium Studio, but I get error number 1073741511 in the downloading step.
Can you tell me how to solve this or what exactly the error is?
i solved the problem by manually download and install the JDK and
add this variables below to the system environment variables :
android_sdk ā€“ The path to the Android SDK, similar (if not the same) to C:\Program Files\Android\android-sdk-windows
JAVA_HOME ā€“ The path to the JDK, similar (if not the same) to C:\Program Files\Java\jdk1.7.0_22

Getting error while installing Android SDK in windows 7 64 bit?

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.

Android installation/SDK Manager issues

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

Categories

Resources