0

i am getting this error

package com.example.test1;

import android.R;
       import android.os.Bundle;

import android.app.Activity;

public class MainActivity extends Activity {

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_list_item);
}


}

made a new project. checked all the connections

1 Answers1

1

The error means you want to run an app on a device which has a lower version of android than the minimum API level that you have specified.

First time you would come across specifying the target and minimum sdkVersions would be while creating your project:
Check- Figure 1. The New Android App Project wizard in Eclipse. in: http://developer.android.com/training/basics/firstapp/creating-project.html

Minimum Required SDK is the lowest version of Android that your app supports. This becomes defined in your manifest at the initial setup/creation.

Now, in your manifest, you need to look at:

android:minSdkVersion

An integer designating the minimum API Level required for the application to run. The Android system will prevent the user from installing the application if the system's API Level is lower than the value specified in this attribute. You should always declare this attribute.

From app manifest -> uses sdk:
http://developer.android.com/guide/topics/manifest/uses-sdk-element.html

Read more about the manifest: http://code.tutsplus.com/tutorials/android-sdk-project-manifest--mobile-20606

Pararth
  • 8,114
  • 4
  • 34
  • 51