H
H
Humbucker2013-11-16 17:54:47
Android
Humbucker, 2013-11-16 17:54:47

Why doesn't the app compile using Android SDK 2.2?

I started learning Android programming, downloaded Android Developer Tools and tried to build the first typical application with Android SDK version 2.2 (specified when creating the application). But while building I got the following error messages:

[2013-11-16 18:36:08 - HelloWorld] Dx 
trouble writing output: already prepared
[2013-11-16 18:36:08 - Dex Loader] Unable to execute dex: java.nio.BufferOverflowException. Check the Eclipse log for stack trace.
[2013-11-16 18:36:08 - HelloWorld] Conversion to Dalvik format failed: Unable to execute dex: java.nio.BufferOverflowException. Check the Eclipse log for stack trace.

If you specify the version of Android SDK 4.4 in the project properties, then the application builds safely, the emulator starts with my application.
But how to build with Android SDK version 2.2 so that my application does not require SDK version 4.4, because the functionality is minimal (for a program like HelloWorld)?
OS Component Versions
: Ubutu 13.04
Android Developer Tools: Build: v22.3.0-887826
Android SDK Tools: 22.3
Android SDK Platform-tools: 19
Android SDK Build-tools: 19

Answer the question

In order to leave comments, you need to log in

1 answer(s)
H
Humbucker, 2013-11-16
@Humbucker

Figured it out myself.
In the Android Tools -> Add Support Library project properties, I looked at the version of the installed library (Android Support Library, revision 19).
I opened AndroidManifest.xml from the project panel, then in the Uses Sdk option the Min SDK version was set to 8, and in the Target SDK version it was set to 19.
In Project -> Properties -> Android in Project Build Target I set Android 4.4 (rev.19).
I created a device emulator with Android SDK version 8.
As a result, the project was successfully compiled and launched in the emulator.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question