Hyeongtaek Im
Hyeongtaek Im

Reputation: 3

I have an error "Call requires API level 11 (current min is 8)". This is what I can find in my project (ECLISPE)

enter image description here

I try to make a 'done' button at my app. (according to a book)

At first, when I make a new app 'Hellow wordl!', there was no problem

but, now I add some lines in "TestAndroidMainActivity.java",

it doesn't work. What should I do?

Upvotes: 0

Views: 69

Answers (4)

Sabby
Sabby

Reputation: 403

The answer is in your error line itself. The only thing it requires is higher level of SDK and you can change it from your manifest file easily. Good luck!!

Upvotes: 0

Vivek Bhardwaj
Vivek Bhardwaj

Reputation: 528

Just go into you AndroidManifest.xml

over there change the values for android:minSdkVersion and android:targetSdkVersion

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.bd.redrover"
    android:versionCode="1"
    android:versionName="1.0" >


    /// MAKE YOUR CHANGES OVER HERE
    <uses-sdk
        android:minSdkVersion="13"
        android:targetSdkVersion="23" />



    <application
        android:allowBackup="true"
        android:icon="@drawable/logo"
        android:label="@string/app_name"
        android:largeHeap="true"
        android:theme="@style/AppTheme" >



        <activity
            android:name="com.example.test.SpalshScreenActivity"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>


    </application>



</manifest>

Let me know if this works! :)

Upvotes: 0

Bhargav
Bhargav

Reputation: 8277

You can try increasing the minsdkversion in gradle from 8 to 11, but if you are bent on supporting devices using api version less 11, then you will be restricted to use only limited resources from the sdk because of this restriction. By changing from minsdkversion 8 to 11 you won't be losing much customer base, because a very small percentage of the android device users population is using devices that has OS version below Android gingerbread 2.2, hell you can even set your minsdkversion to 16 and cover more than 90% of the android user base

Upvotes: 0

Jas
Jas

Reputation: 3212

This means that some of the methods you've used in your code requires minimum SDK version 11. You can change the minSDK to 11 in your manifest file.

Upvotes: 1

Related Questions