[Q] Trying to compile AOSPA : java 6 problem - Android Q&A, Help & Troubleshooting

Hi,
I'm following this tutorial http://forum.xda-developers.com/showthread.php?t=1863547 in order to be able to compile PA for my Nexus 4.
I get stuck at java 6 installation : as I'm using a Debian (jessie) as my daily OS, and trying to learn java, I already had it with eclipse and the command "java -version" showed me version 1.7 and openjdk 7.
So I anyway tried to purge java, this of course removed eclipse, and the next step in the tutorial explained how to install Oracle JDK. But I wanted to keep using OpenJDK so I just did a basic install of openjdk-6 with aptitude.
At this point "java -version" shows me 1.6, but... Installing Eclipse and its dependencies make java 1.7 and openjdk-7 come back...
There must be an easy way to solve this ?
Thanks!
PS : As you probably understood I'm using debian daily but I'm not yet a linux geek ^^

Related

Android SDK Setup - Java is not found in your PATH.

Hi,
I am new to Android. I have downloaded and installed every necessary component in order to start working with Android. The issue I am having is that in Command Prompt, anything I type in related to the Android SDK (for example: adb, or even just android) comes back with "Java was not found in your path". Now, I have changed all my PATH variables under "User" to the EXACT locations of where these folders are, but no dice. It keeps telling me to go and edit my PATH variables. Even running SDK Setup, gives me the same error, and tells me to add where Java was found (even though I have!).
I am starting to get really fed up with this, because Eclipse can't find the "jre" folder inside the Java JDK, either (that is, of course, until I copy the entire jre folder inside of the eclipse folder, or put eclipse inside of the JDK folder)...
I just know it shouldn't have to be this tedious to set everything up and I would really appreciate it if someone can help with this
I am running Java JDK 1.6.0_21 (x64), Eclipse Helios (3.6) IDE for Java EE Dev., Android SDK Revision 6, all on Windows 7 Ultimate x64.
Something to note: I have not encountered any problems with Eclipse Helios and the ADT plugin as stated on the Android Developers website. I can use Eclipse and the SDK to create and run the"Hello, Android!" application on the emulators without issues. I just want to be able to run everything from the command prompt, too. Now, if I can only get my phone to be recognized after I get this resolved.
I also need this for rooting and unlocking the phone.
Bazz44 said:
Hi,
I just know it shouldn't have to be this tedious to set everything up and I would really appreciate it if someone can help with this
I am running Java JDK 1.6.0_21 (x64), Eclipse Helios (3.6) IDE for Java EE Dev., Android SDK Revision 6, all on Windows 7 Ultimate x64.
Click to expand...
Click to collapse
In the SDK tools folder go to libs and edit find_java.bat.
Change all instances of %PROGRAMFILES% to %PROGRAMFILES(X86)% .
I had to do this for my SDK.
Your java will probably still resides in c:\program files (x86)\java or the likes.
To test if it works open DDMS.bat(May need to open twice).
I ran "ddms.bat" before changing the "find_java.bat", and it just came up that it could not find the path > checking if it is installed elsewhere. I did what you suggested (I found three instances of where I needed to add the (x86)), ran "ddms.bat", and got the same error. However, this time it also opened the Dalvik Debug Monitor. Eclipse still won't run without its own copy of the "jre" folder from the JDK at the same folder level as the "eclipse.exe"...
any luck with this? I'm also having same trouble in Win7x64
Gonna give in otherwise n reboot my ubuntu system see if thats any easier
i know i can't use OpenJDK or something so ill have to swap that but fingers crossed
=]
Solution
Install any JRE Java, Copy the java folder at program files/Java/jre6 Paste it inside MOTODEV´s folder program files/Motorola/MOTODEV Studio for Android 1.2/ and rename it to jre
Done
Edited the eclipse .ini works a treat now wi java x64...
time to whip out the olde java books from college an see if any of it comes back to me
Is it possible to install the android sdk platforms & extras offline manually, my only net atm is my desire tethered, unlimited data but I don't wanna push my luck
I'm not sure if it may be related or not but according to the android dev page, you should be using eclipse 3.5 because they have been having problems with 3.6
May or may not be related but worth a shot.
I'm not sure if it may be related or not but according to the android dev page, you should be using eclipse 3.5 because they have been having problems with 3.6
May or may not be related but worth a shot.
i need help http://forum.xda-developers.com/showthread.php?p=24028502#post24028502
Please use the Q&A Forum for questions &
Read the Forum Rules Ref Posting
Moving to Q&A
Make nu system path
Try making new system path named PATH (all caps). its an issue with Win7 64. Hope it helps. and yes Installing the Android sdk is a giant head****. I have it all put as fare as the link to abandroid put it doesn't make plug-in available in the plug-in list. I'm at a loss...
As i said, hope it works.
Having just had this issue myself on a new install of eclipse, the sdk and adt, here's what finally helped me: making sure the java\sdk1.6.x.x\bin directorywas in front of the windows\sys32 directory in the PATH statement of the environmental variables.
I did already add the JAVA_HOME and such, but the above was the step that finally allowed me to finish the setup.
Fix for Win7 64bit and Android SDK/Java install
MacDegger said:
Having just had this issue myself on a new install of eclipse, the sdk and adt, here's what finally helped me: making sure the java\sdk1.6.x.x\bin directorywas in front of the windows\sys32 directory in the PATH statement of the environmental variables.
I did already add the JAVA_HOME and such, but the above was the step that finally allowed me to finish the setup.
Click to expand...
Click to collapse
I had to finally use JAVA_HOME C:/PROGRAM FILES/JAVA/JDK1.7.0_05 That finally allowed me to instal the Android SDK
best answer
rowdyvc said:
I had to finally use JAVA_HOME C:/PROGRAM FILES/JAVA/JDK1.7.0_05 That finally allowed me to instal the Android SDK
Click to expand...
Click to collapse
Thank you you solve my prob man

[Q] Build java files for android platform

Hi,
I'm new to android developement. To make it short. Our project needs to be ported for android. It has some java and C code. We run this java as applet using Oracle JRE in linux systems and using firefox browser.
Now it needs to be done on android and browser. Android doesnot support JRE. Hence i downloaded eclipse, ADT plugin. Added my java files, external JRE library and compiled it. Got the apk and classes.dex.
Now my question here is i'm not able to proceed further. How to execute the same as in JRE before. I'm totally confused. Running the apk in emulator/android mobile only runs the activity.java code. Say i'm printing hello world in that(i dont need that but still i have wrote it as my first program).
I dont know how to execute my other java files(which will run as java applet before in linux systems). I'm stuck here since i have not worked on android.
This would be the first step in to my porting.
Also the easy solution would be to run the applet.jar i have directly on android similar to linux jre. Is it possible.?
Any sort of help would be great. Thanks.

[Q] Can't get the Andorid sdk to run[fixed]

Hi, I recently installed Winodws 7 ultimate x64 on my system but now I can't get the Android SDK to run. When I click on sdk manager a command window just flashed and nothing happens. I have JDK installed.
fixed by installing 32 bit java.
Add java to your path variable
私のEVO 3Dから送信される。

Apk manager error on Windows 7 ( java not found)???

when I install apkmanager and run the 'script' its says java not found you will not be able to use apktool ??
My windows is 64 bit plz help anyone ...if you know how to fix it ??
Install java?
Sent from my SK17i using xda premium
You need to add Java to your system path.
Sent from Arkham
I did have the same problem.
Try install the x64 version, works for me
Firstly, make sure that you download the x64 version of java and uninstall all other versions of java. After installing java if it still doesn't work, the you have to set an environment variable in my computer with the name JAVA_HOME and value as the path of your installation location of java.

Sources building, Intellij project java version problem

Hello everybody,
I downloaded Android cm-13 sources to start developing and I'm trying to import it on Intellij following instructions on cyanogemod wiki (that says to run: make idegen ecc.).
First time I ran "make idegen" I got an error message saying that my java version is wrong ( I had Oracle java 8, instead of Openjdk 7 needed) so I removed my java and I tried to install openjdk 7 but unsuccessfully because there a lot of dependencies that cannot be installed cause of old versions. (I'm working on last version of Kali linux, I don't know if it could be the problem). Anyway I finally installed openjdk but version 8 thinking that should be the same but I still get the error message about my java version and that version 7 is needed.
Any ideas about it?
Thanks guys.
UP
I removed Kali linux cause of other problems and keep it on a usb stick as live os. Now i'm working on Xubuntu 16.04, i redownloaded sources, packages needed but still have problems with openjdk version. Openjdk 7 is not in repositories and i cannot find it through internet, I reinstalled openjdk 8 but still get error message as above.
I solved adding openjdk repository and installing version 7.
Now i'm trying to import project in Intellij but, when i launch "development/tools/idegen/idegen.sh", this is the ouput:
Code:
Couldn't find host out directory. Make sure ANDROID_HOST_OUT is in your environment.
I googled it but didn't find anything.
I solved the last problem, I'm stupid XD i exported the variable (ANDROID_HOST_OUT) but then i was calling idegen.sh as root so it didn't recognize the variable.
Anyway, now I started Idea to import android.ipr (as wrote on cyanogen wiki) but a new error occurred:
"Couldn't import anything from ...path/android.ipr"
Googled but nothing. Any1?
Solved. "Open" and not "import".

Categories

Resources