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...
Related
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
I have tried all the threads related to errors while integrating FB-SDK but was not successful , any answers are welcomed .
My Java Compiler is set to 1.6.
I get this error while integration the Facebook SDK to my App
it is giving me the error at that marked place as
path\facebook-android-sdk-3.0.2\facebook\bin(missing)
i get this error after added this by clicking OK .
Thanks in Advance .
Before moving on, I recommend you to get latest Facebook SDK, because there are some important changes between yours (3.0.2) and 3.0.
Here's what I do to import Facebook SDK
1- Download the latest SDK, extract it to a directory, i.e. X. (~/X)
2- Open Eclipse, New Project -> Android Project From Existing Code, then browse and choose ~/X/facebook-android-sdk-3.0 as root directory
3- Select only "facebook" project and click finish
4- Right click to facebook project -> properties. Choose Compiler Compliance level as 1.6 from Java Compiler section
5- Create new android project, and set it's compliance level 1.6 as well. Also in Android section of Project Properties, Click add button, and choose facebook project (that we imported in Step 3)
6- Finally, Project -> Clean. For me this works like a charm all the time.
Have you checked if you have the facebook jar inside your fb-sdk/bin folder? If it's not there, do a clean and build procedure first in your fb-sdk folder. It will produce a facebook.jar file on your bin folder.
After that, then, you may already do another clean and build on your main project folder.
Iv'e tried to copy and paste a project in the same workspace. The project gets copied but doesn't run on my device.
If I leave the default name e.g "copy of myProject" it works.
If I try to rename using the refractor option the project shows an error:
"Android requires compiler compliance level 5.0 or 6.0. Found '1.7' instead. Please use Android Tools > Fix Project Properties.."
when I fix the project as suggested It fails load to my device
Go to project properties file and change the project name and clean and build the project.It should work then
currently i have difficulties trying to import the lynda.com android app development with java essential training exercise files into eclipse. I keep getting some java errors like this.Can someone help me out with this problem?
Currently im using
Android SDK r12
ADT 12 plugin for eclipse
JDK 7x64
JRE 7x64
LEclipse IDE for Java Developers 3.7 indigo
here's the error:
The project was not built since its build path is incomplete. Cannot
find the class file for java.lang.Object. Fix the build path, then try
building this project.
The type java.lang.Object cannot be resolved. It is indirectly
referenced from required .class files
(original screenshot below)
A little late on this, however after struggling with the issue myself I found a solution to the problem.
Right Click on the project --> Build Path --> Configure Build Path...
In the 'Source' tab, Select the project eg. 'myProject/src' --> Click OK.
Right Click on the project --> Android Tools --> Fix Project Properties
That should do it!
Have you tried changing your compiler to Java 5 instead of Java 7?
Also make sure that in the project settings that you're using Java 5.
Ryan,
I had the same problem and it was corrected by going to the project preferences(right click project -->preferences). Then go to "java build path" and click on the libraries tab. Look for your JRE lib in the list. In my case the system was unable to find it, but the entry was still there. Delete this and add a new one by clicking "add library" and select JRE System library. Then select the default system lib. Close out of the preferences window and then Right click on your project and go to android tools-->Fix project Properties. Clean your project and try building again.
This works
Project > Properties > Android > change the Build Target
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"