| # |
| # Test uses-sdk: it's an error for a library to require a minSdkVersion higher than the |
| # one defined in the main manifest. |
| # |
| # Also a uses-sdk with a lack of minSdkVersion is equivalent to using version=1. |
| # |
| |
| @fails |
| |
| @main |
| |
| <manifest |
| xmlns:android="http://schemas.android.com/apk/res/android" |
| package="com.example.app1" |
| android:versionCode="100" |
| android:versionName="1.0.0"> |
| |
| <!-- This is the same as writing android:minSdkVersion="1" --> |
| <uses-sdk android:targetSdkVersion="14" /> |
| |
| <application /> |
| |
| </manifest> |
| |
| |
| @lib1 |
| |
| <manifest |
| xmlns:android="http://schemas.android.com/apk/res/android" |
| package="com.example.lib1"> |
| |
| <!-- The app can cope with API 1 but this library can only cope with API 4. --> |
| <uses-sdk android:minSdkVersion="4" /> |
| |
| </manifest> |
| |
| |
| @lib2 |
| |
| <manifest |
| xmlns:android="http://schemas.android.com/apk/res/android" |
| package="com.example.lib2"> |
| |
| <uses-sdk android:minSdkVersion="10" /> |
| |
| </manifest> |
| |
| |
| @lib3 |
| |
| <manifest |
| xmlns:android="http://schemas.android.com/apk/res/android" |
| package="com.example.lib3"> |
| |
| <uses-sdk android:minSdkVersion="11" /> |
| |
| </manifest> |
| |
| |
| @lib4_parsingError |
| |
| <manifest |
| xmlns:android="http://schemas.android.com/apk/res/android" |
| package="com.example.lib4"> |
| |
| <!-- Parsing errors --> |
| <uses-sdk android:minSdkVersion="abcd" /> |
| |
| </manifest> |
| |
| |
| @lib5_parsingError |
| |
| <manifest |
| xmlns:android="http://schemas.android.com/apk/res/android" |
| package="com.example.lib5"> |
| |
| <!-- Parsing errors --> |
| <uses-sdk android:minSdkVersion="123456789123456789" /> |
| |
| </manifest> |
| |
| |
| @lib6_parsingError |
| |
| <manifest |
| xmlns:android="http://schemas.android.com/apk/res/android" |
| package="com.example.lib6"> |
| |
| <!-- Parsing errors --> |
| <uses-sdk android:minSdkVersion="0xFFFFFFFFFFFFFFFF" /> |
| |
| </manifest> |
| |
| |
| @lib7_parsingError |
| |
| <manifest |
| xmlns:android="http://schemas.android.com/apk/res/android" |
| package="com.example.lib7"> |
| |
| <!-- Parsing errors --> |
| <uses-sdk android:minSdkVersion="InvalidMinSdk" android:targetSdkVersion="InvalidTargetSdk" /> |
| |
| </manifest> |
| |
| |
| @lib8_parsingCodename |
| |
| <manifest |
| xmlns:android="http://schemas.android.com/apk/res/android" |
| package="com.example.lib8"> |
| |
| <!-- Test code names --> |
| <uses-sdk android:minSdkVersion="ApiCodename1" android:targetSdkVersion="ApiCodename10" /> |
| |
| </manifest> |
| |
| |
| @result |
| |
| <manifest |
| xmlns:android="http://schemas.android.com/apk/res/android" |
| package="com.example.app1" |
| android:versionCode="100" |
| android:versionName="1.0.0"> |
| |
| <!-- This is the same as writing android:minSdkVersion="1" --> |
| <uses-sdk android:targetSdkVersion="14" /> |
| |
| <application /> |
| |
| </manifest> |
| |
| |
| @errors |
| ERROR:uses-sdk:minSdkVersion 1 cannot be smaller than version 4 declared in library ManifestMerger2Test1_lib1.xml |