Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/180.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
“获取错误”;未绑定前缀";在android config.xml中_Android_Cordova - Fatal编程技术网

“获取错误”;未绑定前缀";在android config.xml中

“获取错误”;未绑定前缀";在android config.xml中,android,cordova,Android,Cordova,因此,我试图设置一个应用程序链接到我的应用程序,但我在尝试编译时遇到了这个错误 我正在使用cordova编写应用程序 :app:mergeDebugResourcesC:\projectPath\platforms\android\app\src\main\res\xml\config.xml:23: AAPT: error: unbound prefix. C:\projectPath\platforms\android\app\src\main\res\xml\config.xml:23:

因此,我试图设置一个应用程序链接到我的应用程序,但我在尝试编译时遇到了这个错误

我正在使用cordova编写应用程序

:app:mergeDebugResourcesC:\projectPath\platforms\android\app\src\main\res\xml\config.xml:23: AAPT: error: unbound prefix.

C:\projectPath\platforms\android\app\src\main\res\xml\config.xml:23: error: unbound prefix.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:mergeDebugResources'.
> Error: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
//config.xml

<?xml version='1.0' encoding='utf-8'?>
<widget id="io.cordova.hellocordova" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
    <name>HelloCordova</name>
    <description>
        A sample Apache Cordova application that responds to the deviceready event.
    </description>
    <author email="dev@cordova.apache.org" href="http://cordova.io">
        Apache Cordova Team
    </author>
    <content src="index.html" />
    <plugin name="cordova-plugin-whitelist" spec="1" />
    <access origin="*" />
    <allow-intent href="http://*/*" />
    <allow-intent href="https://*/*" />
    <allow-intent href="tel:*" />
    <allow-intent href="sms:*" />
    <allow-intent href="mailto:*" />
    <allow-intent href="geo:*" />
    <intent-filter>
        <action android:name="android.intent.action.VIEW" />
        <category android:name="android.intent.category.DEFAULT" />
        <category android:name="android.intent.category.BROWSABLE" />
        <data android:host="rezz" android:scheme="rezz" />
    </intent-filter>
    <platform name="android">
        <allow-intent href="market:*" />
    </platform>
    <platform name="ios">
        <allow-intent href="itms:*" />
        <allow-intent href="itms-apps:*" />
    </platform>
    <engine name="android" spec="^7.0.0" />
</widget>

HelloCordova
响应deviceready事件的Apache Cordova应用程序示例。
阿帕奇科尔多瓦团队

基本上是由于“意图过滤器”的设置,我需要添加一些东西,但不知道是什么。如果我删除该设置,它将正常工作。

如果要使用,则应将xmlns:android=“”属性添加到config.xml内的根标记中。希望这对你有帮助,解决了这个问题,谢谢!但我似乎无法从浏览器打开应用程序。我只是在放一个浏览器“rezz://rezz/“URL。我还需要做点别的吗?@BhupatBheda有什么想法吗?