If you go to "Project Structure -> SDKs" and click on some Android SDK, you will see the screen below.
When I add some Android version for the first time, the build target is set to 1.5. It seems that IDE's intellisense is relying on this selection, because in the initial use (e.g. when the target is set to 1.5) I cannot use features like
android:targetSdkVersion. They're just not showing up in the intellisense. When I change the build target to, let's say, Android 2.2 and reopen the same project, these attributes appear in intellisense.
Could anyone explain what is the purpose of this and why does it set to Android 1.5 by default? It just makes no sense to me. I also haven't noticed this option in Eclipse.
preguntado el 30 de enero de 12 a las 19:01
Build target defines the platform that is used. So you normally don't need to change it. And it doesn't default to 1.5, it defaults to the platform version that you've chosen when adding the new SDK platform. So, if you add Android 3.2 Platform, build target will default to Android 3.2. I've verified it with IDEA 11.0.1.
If you change it to something else, it's the same as changing your project/module dependencies to use another Android platform, however the old SDK name remains that can make it really confusing. We are considering to make the
build target and SDK home path settings read-only to avoid confusion.