【问题标题】:Phonegap: unable to override AndroidManifest.xmlPhonegap:无法覆盖 AndroidManifest.xml
【发布时间】:2014-10-20 09:18:53
【问题描述】:

我想将我的 Phonegap 应用程序的使用限制在平板电脑上。 通过 config.xml 文件读取this page 似乎是可能的。

在我的 config.xml 文件中,我做了以下更改:

  1. 已添加:xmlns:android = "http://schemas.android.com/apk/res/android"
  2. 添加

    <gap:config-file platform="android" parent="/manifest"> <supports-screens android:smallScreens="false" android:normalScreens="false" android:largeScreens="true" android:xlargeScreens="true" android:requiresSmallestWidthDp="600" /> </gap:config-file>

当我构建应用程序时,我看不到 AndroidManifest.xml 上的更改。 我的错误在哪里?此过程应该适用于本地构建和使用 build.phonegap.com 的远程构建?

提前致谢。

【问题讨论】:

    标签: android cordova


    【解决方案1】:

    好的,几个小时后我明白发生了什么:gap:config-file 只有在您使用 PhoneGap Build (build.phonegap.com) 时才能正常工作。之后我使用 android-apktool 从生成的 .apk 中获取 AndroidManifest.xml 并看到了我的配置。

    【讨论】:

    • 您还可以在 Phonegap 本地的 android/androidmanifest.xml 文件中查看更改(以及缺少更改)。你有没有找到一种方法来更改配置文件而无需进行远程构建?
    猜你喜欢
    • 2012-09-04
    • 2013-07-22
    • 2015-07-16
    • 1970-01-01
    • 2012-04-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多