Recently I upgraded Eclipse
along with ADT plugin
s to Android L priew
.
I have the latest Java update as well i.e. Java 8
.
I was unable to see the layout and it displays as below
Recently I upgraded Eclipse
along with ADT plugin
s to Android L priew
.
I have the latest Java update as well i.e. Java 8
.
I was unable to see the layout and it displays as below
Please, note this Android icon in the upper side of the screen
This icon is in the upper side of this screen:
Probably it's displaying the number 20. This is the selection to use the API 20 to render the window. Change it to 19, or 20W (not 20L). It'll fix the problem.
You may also need to modify eclipse config to run on Java 7 Runtime.
Add this to the beginning of eclipse.ini
-vm
C:/Program Files/Java/jre7/bin
For anyone having the same issue: You dont need to unistall Java 6. All you need to do is to set it correctly on Eclipse.
This seems to be the issue....the 'Automatically Pick Best', picks the 'L' version of API 20 instead of the 4.x version of API 20. In my instance, I am targeting API 19 and apparently that's not compatible with the choice of "API 20: Android L (Preview)".
Sorry, this system won't let me post images yet...
You can see the following note in https://developer.android.com/preview/setup-sdk.html
Note: The Eclipse ADT plug-in requires Java 7 if your compilation target is the L developer preview.
Maybe you don't have Java 7 installed?
The problem for that is having different jre versions
I have java 6 and 8
both installed in my system, so I uninstalled java 6 and set path for only java 8.
But remember to restart the system after setting the paths.
Now error is gone while viewing android L Preview
OPen SDK Manager --> Uninstall Android L (API 20,L preview),,use this if you want to resolve this error Quickly
What I did after updating java was to set the variable system for java again
Advanced System Settings -> Advanced -> Environment variables.
I updated JAVA_HOME with this directory
C:\Program Files\Java\jdk1.7.0_60
Back in eclipse, you can either:
Click Properties -> Android -> Project Build Target
Change android L for android 4.4
If you want to use android L, then change in the manifest minSdkVersion to "L"
In my case , my current java version is 1.6.
So i run the command 'update-alternatives --config java' to change the version to java 1.7, then restart the Eclipse, the problem is fixed.
Note: I installed muti-java version(Java 1.6 and java 1.7)
Hope help to you.