我在试图建立在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.
参考: http://docs.build.phonegap.com/en_US/3.3.0/configuring_$p$pferences.md.html#$p$pferences
<preference name="android-minSdkVersion" value="10" />