gpt4 book ai didi

android - 手机间隙 : Change style to holo (changing in manifest leading to build errors)

转载 作者:太空狗 更新时间:2023-10-29 15:02:13 26 4
gpt4 key购买 nike

我正在尝试更改 Phonegap 中的 Android 主题样式。我开始尝试以下操作:

<gap:config-file platform="android" parent="/manifest">
<activity android:theme="@android:style/Theme.Holo.Light.NoActionBar" />
</gap:config-file>

我读到的应该有效,但是,一旦我从命令行构建应用程序,那和类似的尝试就没有任何区别。

所以我直接转到 AndroidManifest.xml 并将 android:theme="@android:style/Theme.Black.NoTitleBar" 更改为 android:theme="@android:style/Theme.Holo.Light.NoTitleBar"

然而,这只会导致构建错误...

BUILD FAILED
D:\Android\android-sdk\tools\ant\build.xml:653: The f
ollowing error occurred while executing this line:
D:\Android\android-sdk\tools\ant\build.xml:698: null
returned: 1

Total time: 1 second
Error code 1 for command: cmd with args: /s,/c,ant,debug,-f,D:\app\platforms\android\build.xml,-Dout.dir=ant-build
,-Dgen.absolute.dir=ant-gen
Error: D:\app\platforms\android\co
rdova\build.bat: Command failed with exit code 2
at ChildProcess.whenDone (C:\Users\a\AppData\Roaming\npm\node_modules\c
ordova\node_modules\cordova-lib\src\cordova\superspawn.js:135:23)
at ChildProcess.emit (events.js:98:17)
at maybeClose (child_process.js:756:16)
at Process.ChildProcess._handle.onexit (child_process.js:823:5)

我要怎么做才能让这个 Phonegap 应用程序使用全息主题而不是旧 Gingerbread 主题?

最佳答案

在AndroidManifest.xml中,需要改成android:theme="@android:style/Theme.Black.NoTitleBar"android:theme="@android:style/Theme.Holo.Light"

关于android - 手机间隙 : Change style to holo (changing in manifest leading to build errors),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25537641/

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