2

It happened to me from a day to another that this error appeared after the cordova build command. It seemes an error caused by the recent release of SDK 27 P preview. here the full error

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

I've found here a way to solve the problem but it doesn't work 100% because the build ends without errors but I'm not able to install the apk on my phone because a device with apiSDK 27 is required. The only way to work it seems to be setting the Compile SDK Version to 27+ P preview otherwise that error is shown.

Does someone know a workaround or a way to fix it (either or directly on cordova or editing the manifest.xml is fine anyway)?

WartSemola
  • 23
  • 6

2 Answers2

3

I've added the following plugin to the config.xml:

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

it resolved problem.

akit
  • 31
  • 1
1

Maybe you should check your added plugin carefully to find if there are some plugins using design lib like: compile 'com.android.support:design:+'. Take care of some plugins may use a separate gradle file. If your cordova android version is 6+, you can change the design dependency to com.android.support:design:26.+.

I'm facing the same issue, and I found a plugin written by myself has the problem said above. After fix that, it works well. Hope this can help you.

Xhua
  • 118
  • 1
  • 7
  • Thanks for the reply. I've checked every single compile in every installed plugin but I don't have 'com.android.support:design'. Instead I've found 'com.android.support:support-v4:+ ' and I tried to change it in 'com.android.support:support-v4:26.+' but nothing changed and I still get the same error. I even tried to set the config.xml with but still nothing – WartSemola Mar 12 '18 at 12:06
  • I've solved the problem. I've just found a plugin who was using this I've changed to and that solved my problem. Thanks! – WartSemola Mar 12 '18 at 12:24