3

I have a big trouble on Eclipse

I download the latest ADT bundle, then new a new Android project but an error occurred :

enter image description here

then i google it and found some suggestions, such as new workspace, but still not work

enter image description here

and i found a strange phenomenon, java compiler always changed to 1.4, and jre always missing, it occurred every time when the workspace changed

enter image description here

enter image description here

the new project is weird too

enter image description here

i choose property of the project, another error occurred when selected Android

enter image description here

Then i google the error, found a solution is create a file named default.properties, put it in the root of project, and it worked, but i still can not create layout file or editing string.xml file

enter image description here enter image description here

What's wrong with my Eclipse?

user3814793
  • 171
  • 3
  • 12

3 Answers3

2

Adding following line in eclipse.ini worked for me

-vm
/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Commands/java
1

ADT bundle does not work with the Oracle Java 7 SE JDK, failing with an NPE in the Android Application Project wizard.

Here's a workaround that lets you keep Java 7 as the default but run ADT with Java 6 when you have both installed. Bring up $ADT_DIR/eclipse/Eclipse.app/Contents/MacOS/eclipse.ini in an editor. Before the -vmargs line, insert these two lines:

-vm
/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Commands/java
Sid Sarasvati
  • 819
  • 9
  • 10
0

After struggling with this issue for a while, it was a combination of answers that solved it for me:

  1. Needed to update eclipse.ini as mentioned above: https://stackoverflow.com/a/26207435/2162226

    -vm /Library/Java/JavaVirtualMachines/jdk1.7.0_80.jdk/Contents/Home -vmargs

  2. In AndroidManifest.xml set minSdk='14' As mentioned here: https://stackoverflow.com/a/22564119/2162226 When creating a new project "the folder appcompat_v7 doesnt get created" with minSdk=14

Community
  • 1
  • 1
Gene Bo
  • 11,284
  • 8
  • 90
  • 137