First explain, set compiler rating not resolve this issue.
The original project in intellij idea in writing. And operating normally. But the idea of UI design support is not very good. So I imported into eclipse.
I used the code section 1.7 features. For example switch string, and so on.
If it changes to 1.6
This error disappears:
..
Android requires compiler compliance level 5.0 or 6.0 Found '1.7' instead Please use Android Tools & gt; Fix Project Properties
.However, the code requires extensive modifications using some 1.7 features. And the switch can only be modified if the statement is a.
Is there any way to solve this problem?
eclipse version:
Eclipse IDE for Java Developers
Version: Juno Service Release 2
Build id: 20130225-0426
ADT version:
Android DDMS 21.1.0.v201302060044-569685
Android Development Tools 21.1.0.v201302060044-569685
............
Reply:
ADT is based on JAVA 1.6 of
Reply:
Looked at the document, said to be 1.6 or higher. . Could it be that just means higher JDK can use the high version, but it can not use language features high version?
Reply:
What he means is that you can hold 1.7 JDK (because there JAVA1.7 1.6 compiler)
But Android itself does not support JAVA 1.7 ... so you still have to choose a 1.6 compiler
Reply:
Add a compilation instructions can not solve?
Reply:
But the fact that seemingly is not the case.
Rationale 1. If Android does not support jdk1.7, then regardless of what IDE should all be the same effect.
2. My reason for apk files and class files have been decompilation.
Code is as follows:
class file decompile result
switch (ContentListActivity.this.myApplication.getTabs ())
{
case "receive":
..........
decompile apk file after file
smali
.line 95
: Sswitch_0
const-string v3, "receive"
This should be supported by it ....
Reply:
By the way, switch method, finally seems to be the equals method used
invoke-virtual {v4, v3}, Ljava / lang / String; - & gt; equals (Ljava / lang / Object;) Z I do not know the switch to string handling 1.7 equals method is not used. I did not go to view the jdk source.
Reply:
Please use Android Tools & gt;. Fix Project Properties
You look to see follow the prompts
Reply:
Thank you reply, but as already said. Change compile rating not solve the problem.
Reply:
Yeah ... I myself have not tried
Also encountered this problem before I was watching on stackoverflow is to say
http://stackoverflow.com/questions/7637144/android-requires-compiler-compliance-level-5-0-or-6-0-found-1-7-instead-plea
Reply:
Saying
http://developer.android.com/sdk/index.html
SYSTEM REQUIREMENTS write the JDK 6
Reply:
1.6 of
You can use jdk1.7, but the compiler must be a 1.6 rating, which means. Code for the job must be compatible with 1.6. I now wonder is how the next idea is compiled by. Did idea will automatically correct coding. I do not understand. .
Reply:
Does anyone know how to deal with idea
Reply:
I do not understand ..
Amateur programmer indicates .... never played in other platforms
Reply:
Results posted, to those who have copies! !

Reply:
Saying how to solve ah
Reply:
Modify the code to solve

Reply:
Fortunately idea of intelligence, refactoring code faster, first modify the idea to compile grade, and then use the IDE automatically corrects the code just fine. I did not spend too much time
Reply:
Is it only modify your own code to solve the question, so many new features in 1.7 no law to use a
Reply:
I have encountered this problem, search posts found no solution had to change the development environment to solve the problem, now solved environment configuration stickers out hope that someone can have a little help now. . .
ADT 23.0.4
android SDK 5.0
jdk1.8.0_11
Reply:
I have encountered this problem, your answer is useful!
No comments:
Post a Comment