1

I made an app with Construct 2 and I exported to Intel XDK. Then I exported to cordova and everytime I try to build with "cordova build android" I get this error:

ERROR: In FontFamilyFont, unable to find attribute android:t tcIndex

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: 47.337 secs

Command finished with error code 1: cmd /s /c "C:\Users\Gustavo\app\platfo
rms\android\gradlew.bat cdvBuildDebug -b C:\Users\Gustavo\app\platforms\an
droid\build.gradle -Dorg.gradle.daemon=true -Dorg.gradle.jvmargs=-Xmx2048m -Pand
roid.useDeprecatedNdk=true"
Error: cmd: 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

It's my first time posting here, so if I am doing something wrong, please tell me.

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62

2 Answers2

2

Thanks for the help!

I got a build successful by adding this in the build-extras.gradle file:

configurations.all {
    resolutionStrategy {
        force 'com.android.support:support-v4:27.1.0'
    }
}

And by installing the cordova-android-support-gradle-release.

0

Gustavo,

Its is possible that you have a conflict in cordova plugins or platform. A second possiblity is that, you have added components via npm but haven't installed it. For both scenario, I suggest that you list out the current versions installed, note them down then do an update to cordova. Here is how to list out the versions, like what I have.

cd projectfolder $ cordova plugin cordova-plugin-console 1.1.0 "Console" cordova-plugin-device 2.0.1 "Device" cordova-plugin-whitelist 1.3.3 "Whitelist" $ cordova platform Installed platforms: android 7.0.0 browser 5.0.3 Available platforms: ios ~4.5.4 osx ~4.0.1 windows ~5.0.0 www ^3.12.0 $ npm -v 3.10.10

Here is how you update cordova for the project. This example assumes you are using android platform. If you have other plugins/platform, do the necessary.

npm install
npm update
cordova platform rm android --nosave
cordova platform add android

Alternatively

cordova platform update android

If you notice a specific plugin with version error, remove and the plugin with required version.

Tboxmy
  • 86
  • 5
  • Thanks for the response! I checked the versions, take a look: C:\Users\Gustavo\app>cordova plugin cordova-plugin-crosswalk-webview 2.4.0 "Crosswalk WebView Engine" cordova-plugin-media 5.0.2 "Media" cordova-plugin-whitelist 1.2.2 "Whitelist" C:\Users\Gustavo\app>cordova platform Installed platforms: android 6.3.0 Available platforms: amazon-fireos ~3.6.3 (deprecated) blackberry10 ~3.8.0 browser ~4.1.0 firefoxos ~3.6.3 webos ~3.7.0 windows ~4.4.0 wp8 ~3.8.2 (deprecated) C:\Users\Gustavo\app>npm -v 5.7.1 Should I update something? – Gustavo Henrique Mar 19 '18 at 05:49
  • Try the 4 steps above. Start with npm install. – Tboxmy Mar 19 '18 at 12:39