Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/216.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/linux/26.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 为什么我无法设置默认版本_Android_Linux_Ubuntu_Ant_Command Line - Fatal编程技术网

Android 为什么我无法设置默认版本

Android 为什么我无法设置默认版本,android,linux,ubuntu,ant,command-line,Android,Linux,Ubuntu,Ant,Command Line,我无法找出任何原因,为什么我似乎无法从清单中为我的应用程序设置minSdkVersion。我使用UbuntuOS从终端进行编译-只需使用>ant debug即可 这是我的舱单: <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="self.redway.menubardemo"

我无法找出任何原因,为什么我似乎无法从清单中为我的应用程序设置minSdkVersion。我使用UbuntuOS从终端进行编译-只需使用>ant debug即可

这是我的舱单:

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

    <uses-sdk 
        minSdkVersion="11"
        targetSdkVersion="20"/>

    <application android:label="@string/app_name" android:icon="@drawable/ic_launcher">
        <activity android:name="MenuBarActivity"
                  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>

然而,当我编译终端中的输出时说:

[gettarget]项目目标:Android 4.4W [gettarget]API级别:20 [gettarget]警告:未设置minSdkVersion值。应用程序将安装在所有Android版本上。 [回声]----------

虽然它运行,但当我的最小目标设置为11时,应用程序并没有给我动作条或全息主题


我需要对构建路径做些什么,或者做些棘手的事情。在这里或谷歌上都找不到关于这个主题的东西。完全卡住了。

在属性中使用
android
名称空间前缀。也就是说,
android:minSdkVersion
而不是默认的
minSdkVersion


targetSdkVersion
也存在同样的问题。

在属性中使用
android
名称空间前缀。也就是说,
android:minSdkVersion
而不是默认的
minSdkVersion

targetSdkVersion也存在同样的问题。

使用以下方法:

<uses-sdk
    android:minSdkVersion="11"
    android:targetSdkVersion="20" />

使用以下方法:

<uses-sdk
    android:minSdkVersion="11"
    android:targetSdkVersion="20" />


Omg我真傻。非常感谢你发现它。天哪,我真傻。非常感谢你发现了它。