android- How to run the program when i am getting error - android

Running the application in the Eclipse i am getting the following error.How to handle that.
[2011-06-29 10:35:46 - Roadbrake] Android requires .class compatibility set to 5.0. Please fix project properties.
thanks

this kind of error will ganrate when u use the android version which is support the JDK is not match in your computer
for that
trace the path in eclipse :: project>>property>>java Compiler .. set the JDK 1.6

Under project properties (select project, then Alt+Enter).
Find Java Compiler, and change the Compiler compliance level:

Related

Facebook SDK 4.x errors with JDK 1.7 in Eclipse

I'm trying to use the latest Facebook SDK (4.2 as of today) in an Android project, and I'm using Eclipse (if I'm not mistaken, this version no longer includes an Eclipse project so I had to create one with the included files).
I'm getting the following error message:
[FacebookSDK] Android requires compiler compliance level 5.0 or 6.0. Found '1.7' instead. Please use Android Tools > Fix Project Properties.
Doing Fix Project Properties does nothing. However, when I manually set the project to use 1.6, I get the following error:
'< >' operator is not allowed for source level below 1.7
Any tips on how to fix this?
Thanks
In case this helps anyone, what I did was what's mentioned in this answer:
How to fix '<>' operator is not allowed for source level below 1.7 in 1.6?
Specifically, I left the version as 1.6 and simply entered the class type that is expected in the <>.
So for example, instead of
ArrayList<ModeHandler> handlers = new ArrayList<>();
I would simply enter the class:
ArrayList<ModeHandler> handlers = new ArrayList<ModeHandler>();

build library ZXing for android project

hi i want to make QR code scanner to my android app using ZXing library
i already success try it with "Scanning via Intent" method before
now i try different approach
my problem is i always get this error
my step
1. download zxing master from here
2. download jar from repository here
3. import ‘android’ folder from zxing-master in eclipse
4. create libs folder and copy core.jar in there
5. right click in CaptureActivity - properties - java build path - library tab - add core.jar path
i don't know why i still get error after add jar path...
i already try clean project, swith workspace, using latest jar file but still same
any idea?
#update #Nickolai Astashonok
eclipse error
'<>' operator is not allowed for source level below 1.7
i try to change java compiler using 1.7 (default 1.6) by
right click project - properties - java compiler tab
but it's seem my target API not fullfil requirment (my API 15)
how to use ZXing in java compiler 1.6?
Update #Sean Owen
when i changed using java compiler level 1.7 and clean project it's says
Using 1.7 requires compiling with Android 4.4 (KitKat); currently using API 15
i wanna target my aplication runs for ICS (API 15)
i'm not sure if in 'captureActivity androidManifest using minSDK 19' and 'myProject androidManifest using minSDK 15 will be running well
so i guess i better stick with java compiler 1.6
meanwhile i found this link
based on that link i need to use zxing library version 4.5.1 (java compiler 1.6)
because version above using java compiler 1.7
but i can't find any download link to 'zxing library version 4.5.1'
Your question is not clear, but I think the answer is this: the source code indeed requires Java 7. You simply need to set your IDE project to use Java 7. The supplied Maven build already works correctly in this regard. It is not true that API 15 or any other Android API needs Java 6.
I found 4.5.1 but I don't know how to download it! if you figured it out let me know too please.
https://code.google.com/p/zxing/source/browse/?r=2927#svn%2Ftrunk%2Fandroid
I got the same issue and I solve this by doing:
change the java compiler to 1.7 (like what Nickolai Astashonok suggested)
change the target version to 19 (Android 4.4)
Clean the project again, you will see lots of errors removed but there is still some errors related to missing of CameraConfigurationUtils.java
Please go to below link to download and copy the file into your project as per the path suggested.
https://github.com/zxing/zxing/blob/master/android-core/src/main/java/com/google/zxing/client/android/camera/CameraConfigurationUtils.java
Clean the project again, you should be able to clear all the errors and use the sample application in the 'android' folder.

Error in using binary literals number. Why should i use old JDK?

I am new programmer in android and java. I want to write a program that use binary literal number, and i see an error, Binary literal can only be used with source level 1.7 or greater. When i double clicked on the error in Eclipse, this error removed and another error appear in the problems tab!!! new error is Android requires compiler compliance level 5.0 or 6.0. Found '1.7' instead. Please use Android Tools > Fix Project Properties. When i Click on the Fix Project Properties old error again appear!! I confused. I searched in the internet and stackoverflow and i found this link but now i don't know why should i use old JDK? Can't supported anything with Java7?
Thanks for help. Cheers
Android does not support java 7 and hence you need to be on lower version. Check under the system requirements here:
http://developer.android.com/sdk/index.html
Sad but you cannot use the feature of java 7 in android and hence the eclipse does not allow so.

how to setup wordpress android project

I am a newbie to Android development. I am having trouble building a project.
Revision 836, Oct 8 2012
Eclipse classic : Version: 4.2.0 Build id: I20120608-1400
Android SDK: 4.1.2 API 16
After I imported the Wordpress Android project. I got lots of errors.
see here: errors screenshot
I set:
default.properties
target=android-16
AndroidManifest.xml
<uses-sdk
android:minSdkVersion=”8”
android:targetSdkVersion=”16” />
It doesn’t work.
The error is caused by override, so I guess it didn’t find the right lib and class.
How do I setup the project?
Check your Java Compiler Compliance level, Eclipse defaults this to 1.5, which can only Override superclass methods (which is what your error log shows is the problem). If your project Overrides interface methods then you will need to change this to 1.6.
You can change this by:
Project>Properties>Java Compiler
Please provide us with the error output. check if the "Android SDK" installation path is correctly configured in eclipse, you can check this going to "Window" > "Preferences" > "Android"

Libgdx setup UI gives 2 unexpected errors in new GWT project

I have run the setup ui, however, I get two different errors in the -html project than what is described in the tutorial: libgdx tutorial
The tutorial error stated is as follows (which is an error I do not see):
To fix the error of the HTML5/GWT project, go to the "Problems" view, right click the error message "The GWT SDK JAR gwt-servlet.jar is missing in the WEB-INF/lib directory" and select "Quick Fix". Click "Finish".
The errors I have are:
The project was not built since its build path is incomplete. Cannot find the class file for com.google.gwt.core.client.EntryPoint. Fix the build path then try building this project ...
The type com.google.gwt.core.client.EntryPoint cannot be resolved. It is indirectly referenced from required .class files
Is there anyway i can fix this? I just updated my eclipse, I also downloaded Version 18 ADT, revision 19 for Android SDK Tools, and revision 11 for Android SDK Platform-tools.
I had the same problem a couple of weeks ago and got around it by installing the GWT SDK.
I know that the post is old, but while the answer of #Rod was close to resolve my problem, it didn't fully. After installing the plugin in his answer I got 3 error messages instead of two: the same previous ones and a new one.
Looking inside the class that was giving the problem made Eclipse to point straight to the problem: the compiler compliance required to be 1.5 or greater but Eclipse had by default 1.4. I changed it through Window > Preferences > Java > Compiler > Compiler compliance level, where I put the correct one, 1.7, and everything compiled cleanly.
PS: Thanks #Rod
use the http://dl.google.com/eclipse/plugin/4.2 to install plugin on eclipse
instead of http://dl.google.com/eclipse/plugin/4.4 or 4.3

Categories

Resources