Make it work on android 2.4

Hello
I've successfully built my first android project with intellij 12.1.14 community edition, great tool truely ! on macosx 64b.

It runs on the emulator and on device.

I want to learn how to use LoaderManager to fill a ListView. When my main activity implements LoaderManager (and does nothing more really), the application launches correctly on emulator, but crashes on device, at launch time. It crashes somewhere at very startup, since in debug I see nothing special except disconnection.

I suppose this is because my device in on android 2.4 and not the emulator. I've read somewhere that LoaderManager is the new way to retreive data, not available on old sdk.

In my AndroidManifest.xml, I set minSdkVersion to 8 (I think this is 2.4, at lease it works on my device with version<=8). This does not seem enough to inform IntelliJ that I'm working on an old sdk.

I tried to download sdk for android 2.4 and could not find it. On google website it is written : "With the current Android SDK, you can add any current and previous version of the Android platform as a component and use it for development and testing".

On IntelliJ project, there is no other sdk than 4.2.2. And to deploy on 2.4 on emulator (in Android Device configuration), there is only one target available : 4.2.2 api 17

Please is there any way to be sure to develop for 2.4 without including classes not available ?
Thanks

1 comment

Hello
As usual, when you don't give up, you find...
For information the solution was in the IntelliJ Menu "Tools/Android/SdkManager"
I added the Android 2.1 sdk plateform and could then choose it in my project and device.
Thanks

0

Please sign in to leave a comment.