• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps minSdkVersion warning even after having put in the value

I'm trying to set the minimum SDK version. I'm building my projects from the command line in a Mac dev environment. I changed the AndroidManifest.xml file to this.

Code:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="apt.tutorial"
      android:versionCode="1.0.0.0"
      android:versionName="1.0.0.0">
    <uses-sdk minSdkVersion="6" />
    <application android:label="@string/app_name" android:icon="@drawable/icon">
        <activity android:name="FirstApp"
                  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>
I set the SDK to 6 and having Firmware 2.1-update1 on my phone, I figured that it would be a good test. When I run ant, I get the following warning:
Code:
% ant                  
Buildfile: build.xml
    [setup] Android SDK Tools Revision 6
    [setup] Project Target: Android 2.1-update1
    [setup] API level: 7
    [setup] WARNING: No minSdkVersion value set. Application will install on all Android versions.
    [setup] Importing rules file: platforms/android-7/ant/ant_rules_r2.xml

help:
     [echo] Android Ant Build. Available targets:
     [echo]    help:      Displays this help.
     [echo]    clean:     Removes output files created by other targets.
     [echo]    compile:   Compiles project's .java files into .class files.
     [echo]    debug:     Builds the application and signs it with a debug key.
     [echo]    release:   Builds the application. The generated apk file must be
     [echo]               signed before it is published.
     [echo]    install:   Installs/reinstalls the debug package onto a running
     [echo]               emulator or device.
     [echo]               If the application was previously installed, the
     [echo]               signatures must match.
     [echo]    uninstall: Uninstalls the application from a running emulator or
     [echo]               device.

BUILD SUCCESSFUL
Total time: 0 seconds

This isn't a huge problem, but I don't want to be stuck at 1.0 without trying any of the newer features that are available... anyone know how to fix this?
 
The solution was pretty easy, just add "android:" before the minSdkVersion :p . But I got another problem.

The compiler would complain that the versions were incompatible. The solution is pretty bizarre, I'd have to create a project with a target of 6 and for the minSdkVersion, but for the AndroidManifest.xml I'd set it to 7...

I'm a little tired at the moment, so I'll have get back to this.
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones