我在萬維網/ config.xml中設置的minSdkVersion至8:PhoneGap的3.3和的minSdkVersion = 8變的minSdkVersion = 10
<preference name="android-minSdkVersion" value="8" />
<preference name="android-installLocation" value="auto" />
當運行 「的PhoneGap本地構建機器人」,生成了以下文件:
find /Users/alain/Documents/projects/pg33_3/platforms/android -type d \(-name RCS -o -name CVS -o -name .svn -o -name SCCS \) -prune -o -type f \! -name \*\~ \! -name \*\,v \! -name s.\* \! -name .\#\* -print0 | xargs -0 grep -n -e minSdkVersion /dev/null
/Users/alain/Documents/projects/pg33_3/platforms/android/AndroidManifest.xml:13: <uses-sdk android:minSdkVersion="10" android:targetSdkVersion="19" />
/Users/alain/Documents/projects/pg33_3/platforms/android/assets/www/config.xml:26: <preference name="android-minSdkVersion" value="8" />
/Users/alain/Documents/projects/pg33_3/platforms/android/bin/AndroidManifest.xml:13: <uses-sdk android:minSdkVersion="10" android:targetSdkVersion="19" />/Users/alain/Documents/projects/pg33_3/platforms/android/CordovaLib/AndroidManifest.xml:22: <uses-sdk android:minSdkVersion="8" />
/Users/alain/Documents/projects/pg33_3/platforms/android/CordovaLib/bin/AndroidManifest.xml:22: <uses-sdk android:minSdkVersion="8" />
/Users/alain/Documents/projects/pg33_3/platforms/android/res/xml/config.xml:53: <preference name="android-minSdkVersion" value="8" />
那麼爲什麼在AndroidManifest.xml和bin/AndroidManifest.xml中它突然變爲minSdkVersion = 10?
這裏是我的config.xml文件:
<?xml version='1.0' encoding='utf-8'?>
<widget id="it.myapp.MyApp" version="1.5.0" xmlns="http://www.w3.org/ns/widgets" xmlns:gap="http://phonegap.com/ns/1.0">
<name>MyApp</name>
<description>
My App
</description>
<author email="[email protected]" href="http://myapp.it">
MyApp Team
</author>
<feature name="http://api.phonegap.com/1.0/device" />
<preference name="permissions" value="none" />
<preference name="orientation" value="portrait" />
<preference name="target-device" value="universal" />
<preference name="fullscreen" value="true" />
<preference name="webviewbounce" value="true" />
<preference name="prerendered-icon" value="true" />
<preference name="stay-in-webview" value="false" />
<preference name="ios-statusbarstyle" value="black-opaque" />
<preference name="detect-data-types" value="true" />
<preference name="exit-on-suspend" value="false" />
<preference name="show-splash-screen-spinner" value="true" />
<preference name="auto-hide-splash-screen" value="false" />
<preference name="AutoHideSplashScreen" value="false" />
<preference name="disable-cursor" value="false" />
<preference name="android-minSdkVersion" value="8" />
<preference name="android-installLocation" value="auto" />
<icon src="icon.png" />
<icon gap:density="ldpi" gap:platform="android" src="res/icon/android/icon-36-ldpi.png" />
<icon gap:density="mdpi" gap:platform="android" src="res/icon/android/icon-48-mdpi.png" />
<icon gap:density="hdpi" gap:platform="android" src="res/icon/android/icon-72-hdpi.png" />
<icon gap:density="xhdpi" gap:platform="android" src="res/icon/android/icon-96-xhdpi.png" />
<icon gap:platform="blackberry" src="res/icon/blackberry/icon-80.png" />
<icon gap:platform="blackberry" gap:state="hover" src="res/icon/blackberry/icon-80.png" />
<icon gap:platform="ios" height="57" src="res/icon/ios/icon-57.png" width="57" />
<icon gap:platform="ios" height="72" src="res/icon/ios/icon-72.png" width="72" />
<icon gap:platform="ios" height="114" src="res/icon/ios/icon-57-2x.png" width="114" />
<icon gap:platform="ios" height="144" src="res/icon/ios/icon-72-2x.png" width="144" />
<icon gap:platform="webos" src="res/icon/webos/icon-64.png" />
<icon gap:platform="winphone" src="res/icon/windows-phone/icon-48.png" />
<icon gap:platform="winphone" gap:role="background" src="res/icon/windows-phone/icon-173.png" />
<gap:splash gap:density="ldpi" gap:platform="android" src="res/screen/android/screen-ldpi-portrait.png" />
<gap:splash gap:density="mdpi" gap:platform="android" src="res/screen/android/screen-mdpi-portrait.png" />
<gap:splash gap:density="hdpi" gap:platform="android" src="res/screen/android/screen-hdpi-portrait.png" />
<gap:splash gap:density="xhdpi" gap:platform="android" src="res/screen/android/screen-xhdpi-portrait.png" />
<gap:splash gap:platform="blackberry" src="res/screen/blackberry/screen-225.png" />
<gap:splash gap:platform="ios" height="480" src="res/screen/ios/screen-iphone-portrait.png" width="320" />
<gap:splash gap:platform="ios" height="960" src="res/screen/ios/screen-iphone-portrait-2x.png" width="640" />
<gap:splash gap:platform="ios" height="1024" src="res/screen/ios/screen-ipad-portrait.png" width="768" />
<gap:splash gap:platform="ios" height="768" src="res/screen/ios/screen-ipad-landscape.png" width="1024" />
<gap:splash gap:platform="winphone" src="res/screen/windows-phone/screen-portrait.jpg" />
<gap:plugin name="org.apache.cordova.splashscreen" />
<access origin="http://127.0.0.1*" />
</widget>
你能告訴我你的config.xml文件,我應該能夠進一步提供幫助嗎? – keldar
謝謝。我已將它添加到我的問題中。 –