android - 错误: No resource found that matches the given name (at 'dial ogCornerRadius' with value '?android:attr/dialogCornerRadius' )

标签 android cordova

我一天又一天地在cordova build命令之后出现这个错误。这似乎是由最近发布的 SDK 27 P 预览版引起的错误。这是完整的错误

FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':processDebugResources'. com.android.ide.common.process.ProcessException: Failed to execute aapt

Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Error: cmd: Command failed with exit code 1 Error output: C:\Users...\platforms\android\build\intermediates\res\merged\debug\values-v28\values-v28.xml:7:41-73: AAPT: No resource found that matches the given name (at 'dialog CornerRadius' with value '?android:attr/dialogCornerRadius').

Failed to generate resource table for split '' C:\Users...\platforms\android\build\intermediates\res\merged\debug\values-v28\values-v28.xml:7: error: Error: No resource found that matches the given name (at 'dial ogCornerRadius' with value '?android:attr/dialogCornerRadius').

FAILURE: Build failed with an exception.

What went wrong: Execution failed for task ':processDebugResources'. com.android.ide.common.process.ProcessException: Failed to execute aapt

我找到了here一种解决问题的方法,但它不能 100% 工作,因为构建结束时没有错误,但我无法在手机上安装 apk,因为需要具有 apiSDK 27 的设备。 唯一的工作方法似乎是将编译 SDK 版本设置为 27+ P 预览,否则会显示错误。

有人知道解决方法或修复它的方法(直接在cordova上或编辑manifest.xml都可以)吗?

最佳答案

我已将以下插件添加到 config.xml 中:

<plugin name="cordova-android-support-gradle-release" source="npm" spec="1.2.0"/>

它解决了问题。

关于android - 错误: No resource found that matches the given name (at 'dial ogCornerRadius' with value '?android:attr/dialogCornerRadius' ),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49200841/

相关文章:

android - Google Map api 2 如何显示/隐藏 Google map ?

Android - GoogleApiClient 实例在 IntentService 中的 .connect() 和 onConnected() 之间丢失

java - 如何分包自定义arraylist?

iphone - 使用phonegap控制iPhone音量?

javascript - Android Cordova 状态栏插件 - "StatusBar.hide();"去哪里了?

android - 如何单元测试 FragmentDialog 和实现接口(interface)的 Activity 之间的交互

Android onResume 和 onCreate

javascript - 如何使用phonegap localnotification插件清除通知栏上的项目

android - 如何修复 Ionic 在 cordova 5.0.0 中不起作用

Cordova 设备和应用程序事件