在 PhoneGap config.xml 中放置 gap:config 文件的位置
Where to put gap:config-file in PhoneGap config.xml
我想隐藏 PhoneGap 应用程序的标题栏,该应用程序启动时会快速显示。我找到了一个解决方案 (Remove Title Bar Phonegap),但是当我尝试应用它时,PhoneGap Build 告诉我我的 config.xml 有错误。
<?xml version='1.0' encoding='utf-8'?>
<widget id="com.phonegap.helloworld" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:gap="http://phonegap.com/ns/1.0">
<name>Hello World</name>
<description>
Hello World sample application that responds to the deviceready event.
</description>
<author email="support@phonegap.com" href="http://phonegap.com">
PhoneGap Team
</author>
<content src="index.html" />
<preference name="permissions" value="none" />
<preference name="phonegap-version" value="3.7.0" />
<preference name="orientation" value="default" />
<preference name="target-device" value="universal" />
<preference name="fullscreen" value="true" />
<preference name="android-minSdkVersion" value="7" />
<gap:plugin name="org.apache.cordova.splashscreen" />
<preference name="SplashScreen" value="screen"/>
<preference name="SplashScreenDelay" value="10000" />
<gap:splash src="splash.png" />
<gap:config-file platform="android" parent="/manifest">
<supports-screens
android:xlargeScreens="true"
android:largeScreens="true"
android:smallScreens="true" />
<application android:theme="@android:style/Theme.NoTitleBar" >
<activity android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
</activity>
</application>
</gap:config-file>
</widget>
这是最后一部分,它说 <gap:config-file
应该隐藏标题栏。
谁能告诉我我做错了什么?我是 PhoneGab 的新手,还做了很多复制和粘贴工作。但我当然会尝试理解事物。
我怀疑你得到了 "undefined error"。我发现您缺少第一个 XML 元素 <widget>
中的 Android 部分
您应该添加:
xmlns:android = "http://schemas.android.com/apk/res/android"
我想隐藏 PhoneGap 应用程序的标题栏,该应用程序启动时会快速显示。我找到了一个解决方案 (Remove Title Bar Phonegap),但是当我尝试应用它时,PhoneGap Build 告诉我我的 config.xml 有错误。
<?xml version='1.0' encoding='utf-8'?>
<widget id="com.phonegap.helloworld" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:gap="http://phonegap.com/ns/1.0">
<name>Hello World</name>
<description>
Hello World sample application that responds to the deviceready event.
</description>
<author email="support@phonegap.com" href="http://phonegap.com">
PhoneGap Team
</author>
<content src="index.html" />
<preference name="permissions" value="none" />
<preference name="phonegap-version" value="3.7.0" />
<preference name="orientation" value="default" />
<preference name="target-device" value="universal" />
<preference name="fullscreen" value="true" />
<preference name="android-minSdkVersion" value="7" />
<gap:plugin name="org.apache.cordova.splashscreen" />
<preference name="SplashScreen" value="screen"/>
<preference name="SplashScreenDelay" value="10000" />
<gap:splash src="splash.png" />
<gap:config-file platform="android" parent="/manifest">
<supports-screens
android:xlargeScreens="true"
android:largeScreens="true"
android:smallScreens="true" />
<application android:theme="@android:style/Theme.NoTitleBar" >
<activity android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
</activity>
</application>
</gap:config-file>
</widget>
这是最后一部分,它说 <gap:config-file
应该隐藏标题栏。
谁能告诉我我做错了什么?我是 PhoneGab 的新手,还做了很多复制和粘贴工作。但我当然会尝试理解事物。
我怀疑你得到了 "undefined error"。我发现您缺少第一个 XML 元素 <widget>
您应该添加:
xmlns:android = "http://schemas.android.com/apk/res/android"