Phonegap build config.xml

问题描述:

我有一个用PhoneGap构建的混合应用程序。如果我使用Android Studio/XCode编译应用程序,一切正常,但我想使用PhoneGap Build。在我的Android设备上启动使用PhoneGap构建的应用程序时,它无法工作。这似乎是一个权限问题。我的应用程序需要互联网连接和访问位置服务。我不知道如何将其包含在我的​​3210中。Phonegap build config.xml

有什么想法?

添加到您的config.xml

<preference name="android-build-tool" value="gradle" /> 
<plugin name="cordova-plugin-whitelist" /> 
<access origin="*"/> 
<allow-navigation href="*" /> 
<allow-navigation href="data:*" /> 
<allow-intent href="*" /> 
<allow-intent href="itms:*" /> 
<allow-intent href="itms-apps:*" /> 
<allow-intent href="http://*/*" /> 
<allow-intent href="https://*/*" /> 
<allow-intent href="tel:*" /> 
<allow-intent href="sms:*" /> 
<allow-intent href="mailto:*" /> 
<allow-intent href="geo:*" /> 
<allow-intent href="market:*" /> 

通配符将使一切,按照意图的例子,你可以更具体。

+0

不起作用。看来,没有可用的互联网连接 – Lukas

+0

。你能一步一步解释你在做什么,也许在这里显示你的config.xml文件?我假设实际构建中没有任何冲突的代码,或者其他任何扩展已经存在?在phonegap编译时编译cordova白名单是否会被加载? – Michael

+0

从你说的一定是你的config.xml文件,请你可以发布在这里。 – Michael