凡改变PhoneGap的应用程序的minSdkVersion设置 [英] Where to change minSdkVersion setting in PhoneGap app

查看:259
本文介绍了凡改变PhoneGap的应用程序的minSdkVersion设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在试图建立在OS X基本PhoneGap的应用程序,该应用程序是安装程序,只需在Android平台时,一个奇怪的问题。我收到以下错误,当我进入的PhoneGap构建。

I'm having a strange issue when trying to build a basic PhoneGap app on OS X. The app is setup with just the Android platform. I'm getting the following error when I enter "PhoneGap build".

:processDebugManifest
/Volumes/Data/Tests/my-app/platforms/android/AndroidManifest.xml:15:5 Error:

uses-sdk:minSdkVersion 7 cannot be smaller than version 10 declared in library /Volumes/Data/Tests/my-app/platforms/android/build/intermediates/exploded-aar/android/CordovaLib/unspecified/debug/AndroidManifest.xml
Suggestion: use tools:overrideLibrary="org.apache.cordova" to force usage

当我再编辑指示文件,并设置该行

When I then edit the indicated file and set the line to

<uses-sdk android:minSdkVersion="10" android:targetSdkVersion="22" />

和再建,误差不会改变。这是否设置存在别的地方?还是有别的东西怎么回事?

and build again, the error doesn't change. Does this setting exist somewhere else? Or is there something else going on here?

推荐答案

在AndroidManifest.xml文件是在生成过程中通过config.xml中的值覆盖。你应该在config.xml文件中定义这个属性。

The AndroidManifest.xml file is overwritten during the build process by the values from config.xml. You should define this properties in the config.xml file.

参考: <一href="http://docs.build.phonegap.com/en_US/3.3.0/configuring_$p$pferences.md.html#$p$pferences">http://docs.build.phonegap.com/en_US/3.3.0/configuring_$p$pferences.md.html#$p$pferences

<preference name="android-minSdkVersion" value="10" />

这篇关于凡改变PhoneGap的应用程序的minSdkVersion设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆