Please see below. I have a feeling I've got the SDKs configured incorrectly, but I'm not sure how to solve it. I tried Googling for answers but no one had this exact problem.
Do I have the wrong Java version maybe? It seems like the two SDKs might be conflicting with each other.
I made this project via:
Edit: See screenshot. I got it working. All I did was create a new project and re-select the Android SDK. I'm still thinking it was because I added too many SDKs/JDKs the first time. I think all you need is the Android SDK and don't need to add the normal Java one too.
Set up a module SDKFrom the main menu, select File | Project Structure | Project Settings | Modules. Select the module for which you want to set an SDK and click Dependencies. If the necessary SDK is already defined in IntelliJ IDEA, select it from the Module SDK list.
Android Studio is the official Integrated Development Environment (IDE) for Android app development, based on IntelliJ IDEA .
Chose Android Studio. Android application development can also be done using the IntelliJ IDE. It is a very good IDE but it is paid for professional and commercial product development. However, IntelliJ IDE is available with a student license for limited application development features.
IntelliJ IDEA contains all the features found in Android Studio. Setup for Android development is, however, a bit more involved since it does not include the Android SDK by default.
I tried what for3st suggested to no avail at first, but i've heard other places that you should use JDK 1.6 for IntelliJ IDEA in other places, so you can do that here. Also, you set the SDK by going 'File'->"Project Structure" -> "Platform SettingS" -> "SDKs"
In the end, I also switched from Android 2.2 to 2.3.3 (api 10) and that got it to work. Don't have a good idea why it didn't work for 2.2, but since I just want a beginner's tutorial, I'm fine with that.
I had exactly the same problem, but the conditions leading up to it are quite unusual.
I downloaded the Android SDK as a zipfile and unextracted it into /opt
.
However, the permissions did not allow normal users to enter all directories or execute all files... so when IntelliJ indexed the SDK it only picked up the res
jar... and never added the sources to the library path!
Deleting the SDK, fixing the permissions problem in the SDK, and creating a new reference in IntelliJ fixed it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With