The project target (Android L (Preview)) was loaded incorrectly

I recently upgraded Eclipse along with the ADT plugin to Android L priew .

I have the latest Java update, i.e. Java 8 .

I was unable to see the layout, and it appears below

enter image description here

+48
android android-layout android-5.0-lollipop
Jun 30 '14 at 5:24
source share
10 answers

The problem is that it has different versions of jre

I have java 6 and 8 both installed on my system, so I uninstalled java 6 and set the path only for java 8.

But do not forget to restart the system after installing the paths.

Error viewing Android L Preview

+2
Jul 12 '14 at 1:33
source share

Please pay attention to this Android icon at the top of the screen.

Android icon

This icon is at the top of this screen:

Screen which displays the API version to render the code

It probably displays number 20. It is a choice to use API 20 to render the window. Change it to 19 or 20W (not 20L). This will fix the problem.

API 19 selected

+121
Jul 04 '14 at 4:55
source share

You may also need to reconfigure eclipse to run on Java 7. Runtime.

Add this to the top of eclipse.ini

 -vm C:/Program Files/Java/jre7/bin 
+8
Jul 30 '14 at 0:26
source share

For those who have the same problem: You do not need unistall Java 6. All you have to do is install it correctly on Eclipse.

  • First I have JDK fot Java 8 (aka Java 1.8): http://www.oracle.com/technetwork/java/javase/downloads/index.html
  • Install it as usual.
  • Go to Eclipse Settings and in Java -> Installed JREs
  • "Add ..." → Standard virtual machine → Next and find the installation path (on a Mac it will be something like: /Library/Java/JavaVirtualMachines/jdk1.8.0_20.jdk/Contents/Home).
  • Enter a good name, such as "Java JDK 1.8" and "Finish"
  • Be sure to mark the new JRE as shown. enter image description here
  • Restart Eclipse for the change to take effect.
+8
Sep 28 '14 at 6:19 06:19
source share

This seems to be the problem ... "Automatically choose the best", selects version "L" of API 20 instead of API version 4.x of API 20. In my example, I am targeting API 19 and seemingly incompatible with choosing "API 20: Android L (Preview) ".

Sorry, this system will not allow me to send images yet ...

+4
Jun 30 '14 at 20:03
source share

You can see the following note at https://developer.android.com/preview/setup-sdk.html

Note. The Eclipse ADT plugin requires Java 7 if your compilation is aimed at previewing the L project.

Perhaps you do not have Java 7?

+3
Jun 30 '14 at 12:53 on
source share

Check out the JDK version. It should be JDK1.7. JDK 1.6 does not work.

+2
Aug 15 '14 at 9:46
source share

OPEN SDK Manager -> Uninstall Android L (preview API 20, L), use this if you want to quickly fix this error.

+1
05 Sep '14 at 4:26
source share

What I did after updating java is to set the variable system for java again

Additional system parameters → Advanced → Environment variables.

I updated JAVA_HOME with this directory

C: \ Program Files \ Java \ jdk1.7.0_60

Back in eclipse, you can:

Click Properties → Android → Project Build Object

Change android L to android 4.4

If you want to use android L, then change the minSdkVersion manifest to "L"

0
Jul 30 '14 at 0:20
source share

In my case, my current version of java is 1.6.

So, I ran the command "update-alternatives --config java" to change the version to java 1.7 and then restart Eclipse, the problem is fixed.

Note. I installed muti-java version (Java 1.6 and java 1.7)

Hope to help you.

0
Apr 01 '15 at 4:24
source share



All Articles