Quantcast
Channel: JetBrains Developer Community : Thread List - IntelliJ IDEA Users
Viewing all articles
Browse latest Browse all 5661

IDEA 12 CE, Android & OS X

$
0
0

Hi,

 

I use IntelliJ professionally and wanted to have a go at some Android development in my spare time. I've run into some problems though and I'm at a loss.

 

I've installed the Oracle 1.7 (u13) JDK and IntelliJ 12 CE and used the Android SDK Manager to download all the Android 4.2 stuff. I've even worked around the problem with having to set up a Java project to get IntelliJ to pick up the JDK.

 

The problem I'm having is that if I create a new "Android Module" project and point it at the Android 4.2 SDK in concert with the Java 1.7 SDK, I can't make the project:

 

 

java: Errors occurred while compiling module 'Torch'
Compilation completed with 7 errors and 7 warnings in 2 sec
7 errors
7 warnings
java: warning: java/lang/annotation/Target.class(java/lang/annotation:Target.class): major version 51 is newer than 50, the highest major version supported by this compiler.
It is recommended that the compiler be upgraded.
java: warning: java/lang/annotation/ElementType.class(java/lang/annotation:ElementType.class): major version 51 is newer than 50, the highest major version supported by this compiler.
It is recommended that the compiler be upgraded.
java: warning: java/lang/annotation/Retention.class(java/lang/annotation:Retention.class): major version 51 is newer than 50, the highest major version supported by this compiler.
It is recommended that the compiler be upgraded.
java: warning: java/lang/annotation/RetentionPolicy.class(java/lang/annotation:RetentionPolicy.class): major version 51 is newer than 50, the highest major version supported by this compiler.
It is recommended that the compiler be upgraded.
/Users/simon/IdeaProjects/Torch/src/uk/co/realityswitch/torch/Torch/MyActivity.java
java: /Users/simon/IdeaProjects/Torch/src/uk/co/realityswitch/torch/Torch/MyActivity.java:3: package android.app does not exist
java: /Users/simon/IdeaProjects/Torch/src/uk/co/realityswitch/torch/Torch/MyActivity.java:4: package android.os does not exist
java: /Users/simon/IdeaProjects/Torch/src/uk/co/realityswitch/torch/Torch/MyActivity.java:6: cannot find symbol
symbol: class Activity
java: /Users/simon/IdeaProjects/Torch/src/uk/co/realityswitch/torch/Torch/MyActivity.java:11: cannot find symbol
symbol  : class Bundle
location: class uk.co.realityswitch.torch.Torch.MyActivity
java: warning: java/lang/Override.class(java/lang:Override.class): major version 51 is newer than 50, the highest major version supported by this compiler.
It is recommended that the compiler be upgraded.
java: warning: java/lang/annotation/Annotation.class(java/lang/annotation:Annotation.class): major version 51 is newer than 50, the highest major version supported by this compiler.
It is recommended that the compiler be upgraded.

 

 

The IDE itself doesn't seem able to resolve classes from the Android SDK (see attachment).

 

Additionally, Although IntelliJ created the project and there's an ant build.xml, it doesn't process it into the "Ant Build" panel. If I manually add the this file to the Ant Build panel, I can use the targets in there to build the project successfully.

 

Incidentally, I can build the project without having to edit anything using ant on the command line.

 

I know and like the IntelliJ IDE and would prefer to use it over the Eclipse bundled with the Android SDK.


Viewing all articles
Browse latest Browse all 5661

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>