Skip to content
This repository has been archived by the owner on Apr 3, 2020. It is now read-only.

Error: resource android:attr/fontVariationSettings not found. #207

Closed
nhohb07 opened this issue Mar 9, 2018 · 14 comments
Closed

Error: resource android:attr/fontVariationSettings not found. #207

nhohb07 opened this issue Mar 9, 2018 · 14 comments

Comments

@nhohb07
Copy link

nhohb07 commented Mar 9, 2018

Hi guys,

The last week, I still built success project on Android, but now, I have an issue with run build on Android.

/Users/username/.gradle/caches/transforms-1/files-1.1/xwalk_core_library-22.52.561.4.aar/bd30a34e94f50c29b28a7ad58f86f45c/res/values/ui_java_dimens.xml Error:(14, 5) error: resource android:attr/fontVariationSettings not found. Error:(14, 5) error: resource android:attr/ttcIndex not found. /project/platforms/android/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml Error:(106) resource android:attr/fontVariationSettings not found. Error:(106) resource android:attr/ttcIndex not found. Error:failed linking references. Error:java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details Error:java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details Error:com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details Error:Execution failed for task ':processDebugResources'. Failed to execute aapt

Plugin list:

`

<plugin name="cordova-plugin-whitelist" spec="~1.2.1" />
<plugin name="cordova-plugin-splashscreen" spec="~3.2.1" />
<plugin name="cordova-plugin-statusbar" spec="~2.1.0" />
<plugin name="ionic-plugin-keyboard" spec="~1.0.8" />
<plugin name="cordova-plugin-inappbrowser" spec="~1.2.0" />
<plugin name="cordova-plugin-google-analytics" spec="https://github.com/danwilson/google-analytics-plugin.git" />
<plugin name="cordova-plugin-crosswalk-webview" spec="^2.2.0">
    <variable name="XWALK_VERSION" value="22+" />
    <variable name="XWALK_LITEVERSION" value="xwalk_core_library_canary:17+" />
    <variable name="XWALK_COMMANDLINE" value="--disable-pull-to-refresh-effect" />
    <variable name="XWALK_MODE" value="embedded" />
    <variable name="XWALK_MULTIPLEAPK" value="true" />
</plugin>
<engine name="ios" spec="^4.5.4" />
<engine name="android" spec="^6.4.0" />`

Please help me provide a solution on this issue.

Many thanks.

@nhohb07
Copy link
Author

nhohb07 commented Mar 9, 2018

I try with suggest solution here: #205 (comment)

and now, I built success.

Thanks

@nhohb07 nhohb07 closed this as completed Mar 9, 2018
@fongfuse
Copy link

try to change the compileSdkVersion to: compileSdkVersion 28

@Madhuri98
Copy link

try to change the compileSdkVersion to: compileSdkVersion 28

working thanks(y)

stephanenicolas added a commit to f2prateek/dart that referenced this issue Sep 26, 2018
* solves issue #228

* update build number for integration tests. I had to deploy a snapshot

* reduce logs

* upgrade plugin for integration tests

* upgrade to compileSdk 28 according to crosswalk-project/cordova-plugin-crosswalk-webview#207
@cerw
Copy link

cerw commented Nov 5, 2018

This is still causing issue for me, I tried change the compileSdkVersion 28 in build.gradle but stil Fails. Do we need to change gradle to 4 as well? thanks

@ringatech
Copy link

ringatech commented Dec 22, 2018

updated  the code at platforms/android/app/build.gradle and worked like charm ;
dependencies {
    implementation fileTree(dir: 'libs', include: '*.jar')
    // SUB-PROJECT DEPENDENCIES START
    implementation(project(path: ":CordovaLib"))
    compile "com.android.support:support-v4:+"
    compile "com.android.support:support-v4:25.+"
    compile "com.android.support:appcompat-v7:25.+"
    // SUB-PROJECT DEPENDENCIES END
}

@MrDEV0
Copy link

MrDEV0 commented Feb 19, 2019

It was fixed by updating this line implementation "com.android.support:support-v4:+"
to:
implementation "com.android.support:support-v4:27.0.0"

@vishakhavaidywan
Copy link

try to change the compileSdkVersion to: compileSdkVersion 28
Mine is a cordova project. Can you tell me where to make this change? I cannot find this anywhere..

@pengcao1
Copy link

change the compileSdkVersion to: compileSdkVersion 28
resolved my issue

@marvinkosmider
Copy link

marvinkosmider commented Jun 19, 2019

change the compileSdkVersion to: compileSdkVersion 28
resolved my issue

I have the same error and cannot find compileSdkVersion...

Edit:
Nevermind, i found it..

android/app/gradle.build

//...
android {
//...
compileSdkVersion

@anirudha-ani
Copy link

If anyone has stumbled upon this problem due to getting this error recently out of nowhere in your previously working fine react native projects - this is due to the latest BREAKING CHANGE in Google Play service and Firebase. Specially you will have problem with the packages which are dependent on -

com.google.android.gms:play-services-gcm

Check this thread first -

facebook/react-native#25293

And solution would mostly be like this -

facebook/react-native#25293 (comment)

@DarkKnight1992
Copy link

DarkKnight1992 commented Jun 22, 2019

If anyone has stumbled upon this problem due to getting this error recently out of nowhere in your previously working fine react native projects - this is due to the latest BREAKING CHANGE in Google Play service and Firebase. Specially you will have problem with the packages which are dependent on -

com.google.android.gms:play-services-gcm

Check this thread first -

facebook/react-native#25293

And solution would mostly be like this -

facebook/react-native#25293 (comment)

I almost gave up, since i have going to different thread for almost 4 days. This is really frustrating that this can break you app without any apparent reason.

check project.properties in the android project root folder for
com.google.android.gms:play-services-gcm and com.google.firebase:firebase-messaging if it value is com.google.android.gms:play-services-gcm:+ and com.google.firebase:firebase-messaging:+ you would need downgrade play services possible to com.google.android.gms:play-services-gcm:16.1.0 and com.google.firebase:firebase-messaging:18.0.0 should fix for most people if they problem occurred. You try different versions but making changes in the files itself to fully fix it you would need to identify the package using it and install is properly. Here is the link to the releases https://developers.google.com/android/guides/releases you can find the version which suits you.

@akildemir
Copy link

@pengcao1 @MarvinMakes I changed compileSdkVersion cdvCompileSdkVersion to compileSdkVersion 28 and It stucks in after License for package Android SDK Platform 28 accepted. Preparing "Install Android SDK Platform 28 (revision: 6)".

Also I tried to change compileSdkVersion cdvCompileSdkVersion to compileSdkVersion 28 cdvCompileSdkVersion and again it stucks after License for package Android SDK Build-Tools 26.0.2 accepted. Preparing "Install Android SDK Build-Tools 26.0.2 (revision: 26.0.2)".

The versions were different but it doesn't install none of it. Did it install the version 28 in your case?

@greyvugrin
Copy link

@DarkKnight1992 you're a life-saver, thanks to you and the others here for the fix. Will think twice about using the + notation again!

@VarikuntlaSubbarao
Copy link

compileSdkVersion increase to 28

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests