Basic android error (Beginner) - android

Sudoko Android requires .class compatibility set to 5.0. Please fix project properties.
What this error mean?
Please let me know if i need to paste some code..

This is not a problem with the Android projet property, but with the Java Compiler Level. Go in Projet ->Properties -> JDK Compiler and make sure you are using Java 1.5 or Java 1.6.
Source:
Problems importing existing project into eclipse

Does this help?
If you are using Eclipse SDK than
perform following steps to fix your
problem:
Right click on your application name
(within Package Explorer view) ->
Android Tools -> Fix Project
Properties
Source:
http://groups.google.com/group/android-developers/browse_thread/thread/9580edf1ed579e4c/a29027e8ea268fa0?lnk=raot

Here is the solution ...this helps you...
Solution: 1. Fix project: Package Explorer -> Right click the project -> "Android Tools" -> "Fix Project Properties"
2. Restart Eclipse: "File" -> "Restart"

Related

Conversion to Dalvik format failed: Unable to execute dex: java.nio.BufferOverflowException

I am getting following exception when I am trying to run my Android project.
Conversion to Dalvik format failed: Unable to execute dex: java.nio.BufferOverflowException
Currently now I am using ADT version 22.3. My project target is API level-15. I tried to add Support library in Android tools, but problem not resolved.
the key is to set target=android-19 from project.properties and android:targetSdkVersion="19" same to 19. This has worked for me.
Its a big mess... Following way did the trick for me...
Right click your project in eclipse -> Android Tools -> Add Support Library
Then click Accept License and click install.
I had the same problem and I used these methods
1- Downgrading to Android SDK build tools 18.1.1
2- Adding the support library. (if it already there, try removing it and adding it again, Right click on project -> Android tools -> Add support library)
you can follow the detailed instructions here
http://techlovejump.in/2013/11/how-to-solve-unable-to-execute-dex-java-nio-bufferoverflowexception-check-the-eclipse-log-for-stack-trace/
Link above is broken but provides valid solution. Updated link: http://techlovejump.in/how-to-solve-unable-to-execute-dex-java-nio-bufferoverflowexception-check-the-eclipse-log-for-stack-trace/
Is this the same problem as Android dex gives a BufferOverflowException when building ? Updating to the 19.0.1 Build-tools (as described in the linked post) fixed this problem for me.
Browse through your eclipse Folder->
Open Eclipse Folder
Open eclipse.ini
Change -Xms40m And -Xmx384m TO -Xms512m And -Xmx512m
Click Save
No need to downgrade.
You can fix the error by editing the manifest file or project properties. Add following line.
sdk.build.tools=18.1.1
replace 18.1.1 with your targetsdk in manifest.
Step by step detail on :- http://techlovejump.in/2013/11/how-to-solve-unable-to-execute-dex-java-nio-bufferoverflowexception-check-the-eclipse-log-for-stack-trace/
I Update the project.properties file. I put sdk.build.tools=19.0.1 in property file. And set the minimum SDK version to 14
it happened to me when my emulator had set a high Ram value, i changed the emulator RAM value to 768 and then it worked
I've dealt with this problem when using Sherlock ActionBar library in my project.
You could do the following step, it's work for me.
Right click to your project, select properties.
A dialog will show up, select 'Java build path' on the left menu.
Remove 'Android dependencies' and 'Android private libraries' on the right panel then click OK
Clean your project (select menu Project --> Clean)
Right click your project, select Android Tools -> Fix project properties
Clean project once again.
Restart your computer
Open eclipse and Export apk
Hope that will help you.
I was having redundant libraries in my IDE that was causing an issue none of the other solution worked for me

accidentally removed android dependencies folder

I accidentally removed the library: "android dependencies". Is there a way to retrieve it or import/download? A person suggested me to "go to source and say order import export for all libraries you need except the android defualt libs.." but I don't understand exactly what it means. Any advice would be greatly appreciated!
Another stackoverflow post contains solution to this problem.And you do not have to restart eclipse.
Just right click project->Android Tools -> Fix Project Properties
and your Android Dependencies folder appears.
Look at project.properties file. You will see android sdk version(Example : target=android-4) which you used. And then Project -> Right Click -> Java Build Path -> (Your SDK folder -> platform -> android-x(your api version number) -> android.jar(Select this)). And clean your project. Try this.

how to fix the android project

I have Eclipse indigo, I can create and run android projects in it , but whenever I import the android project build outside , I getting error which It does not recognize android specific things, it shows error and I see the it underlines all things coming from android or java , for example : it underlines Button,Activity ,MediaPlayer,DatabaseHelper the things you all use or reference in a project.
So, how to fix it .?
There are some reason for red underline showing (Actually R.java file is not generating successfully) in your imported project.
Now If you are finding this kind of error:
Android requires compiler compliance level 5.0. Please fix project
properties.
then the solution is
Package Explorer -> Right click the project -> Android Tools -> Fix Project Properties
set Compiler compliance level as mentioned here
OR simply do:
Project -> Clean
try properties -> android -> set the android build target then clean your project
Select your project -> Project -> Clean...->Clean Project Selected Below, select your imported project and Start a build immediately and press OK.
1)
Goto Project> Properties>Enable Project Specific Settings>Set Compliance Level once again to 1.5 and then again to 1.6 the Underline Errors will resolved..
2)
The Alternative is to Uncheck Enable Project Specific Settings and Click on Configure Workspace Settings link then Set Compliance Level once again to 1.5 and then again to 1.6 the Underline Errors will resolved..
Then Bulid the Project...Hope it works for you...

Import existing Android project in Eclipse: no gen source folder?

I'm trying to import an android project into Eclipse (from Git, but I don't think it's relevant), and I can't run or compile it because I get these errors:
Android requires compiler compliance level 5.0. Please fix project properties. Serval-Video-Discovery line 1 Android ADT Problem
Project 'Serval-Video-Discovery' is missing required source folder: 'gen' Serval-Video-Discovery Build path Build Path Problem
I think the first one isn't really a big problem, even if I don't really understand the warning.
The funny thing is that the "gen" folder exists on the filesystem; furthermore, I can't try to create it because it already exists !
What should I do to solve this issue?
Here is the GitHub repo I'm trying to import from: https://github.com/rbochet/Serval-Video-Discovery
Package Explorer -> Right click the project -> "Android Tools" -> "Fix Project Properties"
Project -> Clean
Fixes without having to restart eclipse
Android requires compiler compliance level 5.0. Please fix project properties.
I had the same problem but non of these answers helped me. I found my solution here:
Package Explorer -> Right click the
project -> "Android Tools" -> "Fix
Project Properties"
I had the same problem but solved in the following way
Package Explorer -> Right click the project -> Properties -> Java Build Path -> Source -> your project name/gen -> click on Remove -> Click on Add Folder -> check gen -> Ok -> Ok
Just right click and delete the gen directory from eclipse. If not, try the fix project properties above.
If gen folder is missing under project after importing an existing project into workplace, just create a gen folder under project and that will fix the above error.

How to fix the following compilation error?

Android requires .class compatibility set to 5.0. Please fix project properties.
Thanks,
Nahum
Right click on your project -> Android Tools -> Fix Project Properties. Then from main menu, Project -> Clean...
If that doesn't solve it, try restarting Eclipse.

Categories

Resources