Android builds failing (CLI 7.1.0)

Contributor ,
Mar 09, 2018

Copy link to clipboard

Copied

Hi PGB community,

suddenly from yesterday afternoon all CLI 7.1.0 Android builds started failing on Phonegap Build. No changes have been made on my config.xml and the Android builds were built successfully weeks ago, so i guess this is a backend PGB issue.

Here's my log error output:

ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:ttcIndex

FAILED

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.

BUILD FAILED

Total time: 4.065 secs

Error: /gradlew: Command failed with exit code 1 Error output:

Note: Some input files use or override a deprecated API.

Note: Recompile with -Xlint:deprecation for details.

Note: Some input files use or override a deprecated API.

Note: Recompile with -Xlint:deprecation for details.

ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:fontVariationSettings

ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:ttcIndex

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.

  at ChildProcess.whenDone (/cordova/node_modules/cordova-common/src/superspawn.js:169:23)

  at emitTwo (events.js:106:13)

  at ChildProcess.emit (events.js:191:7)

  at maybeClose (internal/child_process.js:877:16)

  at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)

Views

6.0K

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

1 Correct Answer

New Here , Mar 09, 2018
dmytrok96343148 New Here , Mar 09, 2018

Likes

Translate

Translate
Jump to answer Jump to answer
New Here ,
Mar 09, 2018

Copy link to clipboard

Copied

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Contributor ,
Mar 09, 2018

Copy link to clipboard

Copied

Yes, looks like the plugin you suggested fixes the issue and build works again.

Is there any chance that this plugin will break any 3rd party plugin i use?

I wonder why PGB it was working fine for so long time and builds were successfully built, and from yesterday afternoon all Android builds failing.

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Advocate ,
Mar 09, 2018

Copy link to clipboard

Copied

This is caused by Google releasing the 28.0.0-Alpha tools, and some plugin using + for getting android-support libraries. The + should never pick an Alpha version, but it happens very often.
So use the workaround provided by dmytrok96343148, it shouldn't break anything, it just fix a common version for the android-support libraries for all plugins, but maybe if a plugin is using old things might break.
Also, check your plugins and report issues to the ones using + as version so they add a preference instead to be configured by the user.

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Participant ,
Mar 09, 2018

Copy link to clipboard

Copied

This issue is popping up all over the internet in the past 2 days. Apparently a new android support library "28-alpha-1" was pushed out overnight. It introduces attributes ttcIndex and fontVariationSettings to my project. Furthermore, it duplicates the reference inside a single tag. One of my plugins DOES use the com.android.support:support-v4:+ library albeit obliquely. It does it right at runtime, so you can't search for the string.

I think, actually, that you may just have to wait for the powers that be to go from 28alpha to release because I don't know how you'd force the usage of a specific library in PGB (the solution for Cordova CLI users)​. Maybe you could keep an eye on revisions over at Android

At least you know you're not crazy. It was a sudden problem in unmodified dev environments. Some people went for a cup of coffee and came back to find this error.

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Contributor ,
Mar 09, 2018

Copy link to clipboard

Copied

Thank you all for the fast responses and the issue explanation.

Looks like the release of the alpha version broke the builds for PGB too. Hope this would be fixed on the release version 28 of Support Libraries, in the meantime i started using the plugin @dmytrok96343148 suggested and works fine for me.

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Community Beginner ,
Mar 13, 2018

Copy link to clipboard

Copied

Any update for this?

I still have this issue, also with plugin suggested by @dmytrok96343148.

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Community Beginner ,
Mar 23, 2018

Copy link to clipboard

Copied

guys any update for this?
we're still encountering this error too

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
New Here ,
Apr 05, 2018

Copy link to clipboard

Copied

Any news?? I install the cordova-android-support-gradle-release and all my api calls returns 404

Likes

Translate

Translate

Report

Report
Reply
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more