gpt4 book ai didi

android - Phone gap Namespace 'gap' is not bound 错误

转载 作者:行者123 更新时间:2023-11-29 00:04:47 28 4
gpt4 key购买 nike

我是 phone gap 的新手。我在 config.xml 中遇到错误。实际上我正在做 paypal 集成。

在 config.xml 中显示未绑定(bind)电话间隙命名空间。

当我运行时显示错误:(117) 解析 XML 时出错:未绑定(bind)前缀

错误:任务 ':app:processDebugResources' 执行失败。

com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Users\Sradhanjali\AppData\Local\Android\sdk\build-tools\23.0.2\aapt.exe'' finished with non-zero exit value 1

建议我。谢谢

下面是config.xml的编码

<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<widget xmlns = "http://www.w3.org/ns/widgets"
id = "io.cordova.helloCordova"
version = "2.0.0">
<name>Hello Cordova</name>

<description>
A sample Apache Cordova application that responds to the deviceready event.
</description>

<author href="http://cordova.io" email="dev@cordova.apache.org">
Apache Cordova Team
</author>

<access origin="*" subdomains="true"/>


<content src="index.html" />

<preference name="loglevel" value="DEBUG" />
<!--
<preference name="splashscreen" value="resourceName" />
<preference name="backgroundColor" value="0xFFF" />
<preference name="loadUrlTimeoutValue" value="20000" />
<preference name="InAppBrowserStorageEnabled" value="true" />
<preference name="disallowOverscroll" value="true" />
-->
<!-- CHINU -->
<preference name="orientation" value="portrait" />
<preference name="orientation" value="landscape" />



<feature name="App">
<param name="android-package" value="org.apache.cordova.App"/>
</feature>
<feature name="Geolocation">
<param name="android-package" value="org.apache.cordova.GeoBroker"/>
</feature>
<feature name="Device">
<param name="android-package" value="org.apache.cordova.Device"/>
</feature>
<feature name="Accelerometer">
<param name="android-package" value="org.apache.cordova.AccelListener"/>
</feature>
<feature name="Compass">
<param name="android-package" value="org.apache.cordova.CompassListener"/>
</feature>
<feature name="Media">
<param name="android-package" value="org.apache.cordova.AudioHandler"/>
</feature>
<feature name="Camera">
<param name="android-package" value="org.apache.cordova.CameraLauncher"/>
</feature>
<feature name="Contacts">
<param name="android-package" value="org.apache.cordova.ContactManager"/>
</feature>
<feature name="File">
<param name="android-package" value="org.apache.cordova.FileUtils"/>
</feature>
<feature name="NetworkStatus">
<param name="android-package" value="org.apache.cordova.NetworkManager"/>
</feature>
<feature name="Notification">
<param name="android-package" value="org.apache.cordova.Notification"/>
</feature>
<feature name="Storage">
<param name="android-package" value="org.apache.cordova.Storage"/>
</feature>
<feature name="FileTransfer">
<param name="android-package" value="org.apache.cordova.FileTransfer"/>
</feature>
<feature name="Capture">
<param name="android-package" value="org.apache.cordova.Capture"/>
</feature>
<feature name="Battery">
<param name="android-package" value="org.apache.cordova.BatteryListener"/>
</feature>
<feature name="SplashScreen">
<param name="android-package" value="org.apache.cordova.SplashScreen"/>
</feature>
<feature name="Echo">
<param name="android-package" value="org.apache.cordova.Echo"/>
</feature>
<feature name="Globalization">
<param name="android-package" value="org.apache.cordova.Globalization"/>
</feature>
<feature name="InAppBrowser">
<param name="android-package" value="org.apache.cordova.InAppBrowser"/>
</feature>


<feature name="ToastPlugin">
<param name="android-package" value="com.example.playtradewin.ToastPlugin" />
</feature>

<!-- Deprecated plugins element. Remove in 3.0 -->
<plugins>
<gap:plugin name="com.paypal.cordova.mobilesdk" version="3.1.8" />
</plugins>


</widget>

最佳答案

为了使用<gap:plugin>您需要在 <widget> 上通知 phonegap xml 命名空间的标记标签

添加

xmlns:gap="http://phonegap.com/ns/1.0"

所以你的小部件标签看​​起来像

<widget xmlns     = "http://www.w3.org/ns/widgets"
xmlns:gap="http://phonegap.com/ns/1.0"
id = "io.cordova.helloCordova"
version = "2.0.0">

它应该可以正常工作,如 this issue 所示

关于android - Phone gap Namespace 'gap' is not bound 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34654917/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com