I am new to Android development and I want first to get the Hello World application running.
I am using Eclipse IDE and the Android 4.0.3 version 15 SDK. I copi
This error occurs when the sdk-version installed on your device (real or virtual device) is smaller than android:minSdkVersion in your android manifest.
You either have to decrease your android:minSdkVersion or you have to specify a higher api-version for your AVD.
Keep in mind, that it is not always trivial to decrease android:minSdkVersion as you have to make sure, your app cares about the actual installed API and uses the correct methods:
AsyncTask task = new AsyncTask() {
@Override
protected Boolean doInBackground(String... params) {
if (params == null) return "";
StringBuilder b = new StringBuilder();
for (String p : params) {
b.append(p);
}
return b.toString();
}
};
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
task.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR,"Hello", " ", "world!");
} else {
task.execute("Hello", " ", "world!");
}
Using the android-support-library and/or libraries like actionbar-sherlock will help you dealing especially with widgets of older versions.