将清单属性设置为phonegap应用程序

时间:2016-11-14 10:29:41

标签: android xml cordova phonegap-build

我有一个Phone-Gap应用程序,使用Phone-Gap Build Service构建,我试图直接编辑Android Manifest,使用config.xml中的以下代码。

<gap:config-file platform="android" parent="/manifest">
    <!-- Manifest Tags -->
</gap:config-file>

在添加清单的子标记时可以正常工作,例如;

<application android:theme="@android:style/Theme.Material.Light"></application>

但是,在尝试从根清单标记中添加attributes时遇到问题,例如;

  • 机器人:sharedUserId

我尝试直接在gap:config-file代码

中添加清单
<gap:config-file>
    <manifest android:sharedUserId="com.domain.app.sharedcontainer"></manifest>
<gap:config-file>

我还尝试在config.xml中的根小部件标记中添加值,因为其中定义了诸如包名称之类的属性。虽然我没有找到任何证明可行的文件,但我还是想尝试一下。

<widget
  xmlns = "http://www.w3.org/ns/widgets"
  xmlns:cdv = "http://cordova.apache.org/ns/1.0"
  xmlns:android = "http://schemas.android.com/apk/res/android"
  xmlns:gap = "http://phonegap.com/ns/1.0"
  id = "com.domain.app.id"
  android: sharedUserId = "com.domain.app.sharedcontainer"
  defaultlocale = "en-GB"
  version = "1.1.0">

我的方法都没有用,所以我的问题是这个;

  • 如何将清单属性设置为Phone-Gap应用程序。

0 个答案:

没有答案