본문 바로가기

4. 테크니컬&팁/4.4.Android

[개발] 안드로이드 버전 설정

[2010-08-12 10:08:08 - xx] WARNING: Application does not specify an API level requirement!
[2010-08-12 10:08:08 - xx] Device API version is 8 (Android 2.2)


기본적으로 프로그램을 실행하면서 위와 같은 Warning을 보게 되었다.
위의 오류는 현재 어플리케이션의 API Level의 요구사항을 설정하지 않았다는 오류 같아 보인다.
현재 안드로이드 2.2의 가상 머신을 돌리고 있는 상황이다.

위와 같은 경고 메시지를 보지 않기 위해 아래와 같이 해결할 수 있다.

- AndroidManifest.xml 파일 - 

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="--"
      android:versionCode="1"
      android:versionName="1.0">
    <application android:icon="@drawable/icon" android:label="@string/app_name">
        <activity android:label="@string/app_name" android:name="MainWindow">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

    </application>
<uses-sdk android:minSdkVersion="4" />

</manifest> 

위와 같이 minSdkVersion을 설정할 수 있다.
참고로 위와 같이 4로 설정하면 안드로이드 1.6 이상에서 구동가능으로 설정된다.
참고로 안드로이드 버전별 API Level은 아래와 같다.

Platform Version API Level
Android 2.2 8
Android 2.1 7
Android 2.0.1 6
Android 2.0 5
Android 1.6 4
Android 1.5 3
Android 1.1 2
Android 1.0 1

현재 안드로이드 1.5 이하를 사용하는 단말기가 거의 없는 상황이기 때문에 정말 최소로 잡고 싶다면 1.5를 기준으로 하면된다. 대부분의 단말에서 동작하게 하기 위해서는 1.6이상으로 잡자.

참고로 현재 가장 낮은 국내의 안드로이드 단말기는 LG전자의 안드로원 모델이다.
기본 펌웨어 버전이 안드로이드 1.5이고 이후 1.6 펌웨어가 만들어져 출시되었다.

즉 Level 4 이상으로 잡으면 현재 국내에 출시한 모든 안드로이드 단말기에서 동작이 가능한 어플리케이션을 만들수 있다.