IntelliJ how to set Android API level

I use the latest and largest edition of the IntelliJ community. My application works fine on an Android emulator. However, I need an emulator to better match the Kindle Fire. I made configuration changes to AVD Manager (including the installation device in API 10).

When I went to my project to target the project to a new virtual device, I received the following message: "Building an AVD DEV3 object is incompatible with your build target."

It did not take much work to understand that the problem was related to my choice of API 10.

I do not know where I say that my project uses API 10. I looked at everything and did not see any links to the API level at all. Any ideas?

EDIT

I added

<uses-sdk android:minSdkVersion="10" /> 

into my AndroidManifest.xml file and was able to select a new device. I'm starting it now.

+8
android intellij-idea
source share
2 answers

The answer above is no longer true in Intellij (using gradle)

Now <uses-sdk> ignored in AndroidManifest.xml, it is automatically added to the embedded manifest file. To change the version, go to the build.gradle file and look at minSdkVersion.

+3
source share

As Tony and Blundell mentions, the answer is to declare your minSdkVersion in your AndroidManifest.xml file. Thus, the application will be allowed to run on any AVD that at least matches minSdkVersion .

Here's more documentation on the <uses-sdk> : http://developer.android.com/guide/topics/manifest/uses-sdk-element.html

+2
source share

All Articles