I need to open a previousely developed android application in Eclipse. The application has developper for the Android 1.6 target. When I import the project to the eclipse IDE it gives the following error.
Android requires compiler compliance level 5.0 or 6.0. Found '1.7' instead. Please use Android Tools > Fix Project Properties.
After that:Right click the the Project -> Android tools -> Fix project properties
Still I can't open the project. Does any one have experience this before or have any idea to get rid of this error.
Thans inadvance.
For Android you should use JDK 1.5 (5.0) or 1.6 (6.0). In your case you use JDK 1.7, and Android throws error about this.
First make sure that android 1.6 must be installed on your machine. Secondly java compiler 5.0 or 6.0 must be there if you not have download and installed.
So Set the appropriate java compiler for compilence.
For doing it--> Right click on project->properties->java compiler.
you can also change build target for the project by--> Right click on project->properties->Android
I think you have entered a wrong Java version, you asked for 1.7 (which is not Java 7 as some are referring) when it requires at least Java 5.
So try to change the version from 1.7 to 7 or to the one you have.
This is done in the manifest file I think
Related
I have an app running on android 2.1 and I would like to update it to android 3.2 as I do not have anyone using that version. How do I go about doing that? I changed the min sdk in manifest but I was wondering about the JAR file. Do I download the jar for that version. Do I keep the old jar.
Thanks
Prerna
It doesn't matter what the Android version is of the jar file. That is only what target the application compiles with. If you want to change that, click on your project, File -> Properties -> Android and check the desired project build target (i.e. 3.2) and Apply.
I've recently started getting into programming with the Facebook SDK for Android, which I used to write a basic sample app. I want it to be able to run on as many systems as possible, so I set the build target to Android 2.2 (Froyo/API level 8). However, this results in the following error:
Using 1.7 requires compiling with Android 4.4 (KitKat); currently using API 8 FacebookTestApp
In comparison, all of the sample apps that came with the Facebook SDK have their build target set to Android 2.2, and none of them have this problem. Anyone know what I might be doing wrong?
Thanks.
I had the same problem today, this is how I fixed it:
Righ click on your project > properties > Java compiler > enable "project specific settings"
Set Compiler compliance level to 1.6
re Build your project
Voila!
Using 1.7 requires compiling with Android 4.4 (KitKat); currently using API 8
Here is the solution:
Right click your project -> Properties -> Android -> Select the lasted Project Build Target
This is what worked for me.
Right click on your project > Android Tools > Fix Project Properties.
Refresh the project and clean+build it.
Project -> Clean... -> Clean all projects
Fixed this for me.
You can build with API level 19 and still define minimum API level to 8.
Android requires .class compatibility set to 5.0 or 6.0. Found '1.7' instead. Please use Android Tools > Fix Project Properties.
Right click on the project select project properties.
goto java compiler and select java 1.6 instead of 1.7
This is nothing. This is because you have not set your Updated jre 1.7. Instead you have selected 1.6. But 1.7 is a updated jre 1.7.
So select it. And after that Right click on project -> Properties-> Android Tools > Fix Project Properties.
After that clean your project and run again.
right click on project -
java compiler - and on right hand side there is option to set java version.
over there you can set 1.7 if already installed.
or you set installed version of java over there
I know there are some sort-of duplicates of this, but none of the answers have been able to help me so far.
When I open a project, I get the following error:
[2014-01-07 14:18:00 - Permissions] Unable to resolve target 'android-17'
Does anybody know what may be the problem here?
You can right click on your project -> properties -> Android -> Select the Target android version you want to compile and Apply !
If you don't have any target versions to compile, you probably need to download them on your SDK Manager
Open your Android SDK Manager, and make sure your SDK API is installed
You might have several Android SDK folders installed, like me; check that your workspace build path is the one your machine defaults to.
You are probably trying to use a library that was built using API 17 and you do not have it installed. If you are using API 18+ you will be fine.
goto your sdk manager.exe open it, check the API 17 checkbox and click the 'install x packages' button, this will download and install these packages, if the project still shows error go in your project build path and fix the library path error if any
Sometimes the error can appear when you are working with source code built with an ADT that is a higher version than what you are currently using. It could be worth it to see if ADT has a later version than you are working. Sometimes ADT (especially with Eclipse. Link to get new here: https://developer.android.com/sdk/index.html) cannot find updates when asked to find them so you may need to install the newest version and overwrite/delete the old version
The target API in project.properties may be different from the one you have installed. This may happen if you reinstall Eclipse, for example. Open the Android SDK Manager and check to see which version of the API you have installed. Then go to project.properties and set "target=android-xx" when "xx" is your API version.
It's very simple:
Click Android SDK Manager
Download Android 4.2.2 (Api 17)
After install Android 4.2.2(Api 17)
Click right on project --> Properties --> Android --> Target Build Target
Choose Android 4.2.2 Api 17.
Finish
I imported the actionbarsherlock folder into the workspace using "Import -> Existing Android Code Into Workspace". Then I ensured the following:
In the manifest:
<uses-sdk android:minSdkVersion="7" android:targetSdkVersion="16"/>
Properties -> Android: Build target is API 16 (Android 4.1.2) and IsLibrary is checked.
Properties -> Java Compiler: Compiler compliance level is set to 1.6.
And yet I'm getting a lot of BuildConfig cannot be resolved to a variable errors.
I tried to clean all projects many times, and even restarted Eclipse several times. I even tried to add a BuildConfig class manually, but then there were still a lot of R cannot be resolved to a variable errors that I could not resolve.
I've read dozens of answers (such as this one: R cannot be resolved error when using ActionBarSherlock ), but nothing helps. Any help will be much appreciated.
Strangely enough, the problem was that I skipped MIPS System Image the last time I updated components in the Android SDK Manager. Now I updated MIPS System Image from revision 2 to 4, and everything builds fine.
I don't even use MIPS, but maybe there was some strange compatibility issue.
I had the same problem. When I went back to the Android SDK Manager it showed me that I could update Android SDK Platform-tools and Android SDK Build-tools to version 17. That fixed the problem for me.
Strangely enough, this issue gets fixed when I add old flavors of Android SDK build tools: 18.x and 17.x
(For some reason, I uninstalled some of those)