AAPT: error: resource android:attr/fontVariationSettings not found and resource android:attr/ttcIndex not found

后端 未结 3 1967
天命终不由人
天命终不由人 2020-12-02 02:41

I m currently working on an android project, so when I upgrade the project from android targetSdkVersion 21 to 27, the project won\'t work. so if there\'s anyon

相关标签:
3条回答
  • 2020-12-02 03:02

    The error is:

    AAPT: error: resource android:attr/fontVariationSettings not found.
    AAPT: error: resource android:attr/ttcIndex not found

    Change the compileSdkVersion to:

    compileSdkVersion 28
    

    fontVariationSettings and ttcIndex were added in api level 28.

    0 讨论(0)
  • 2020-12-02 03:05

    If you have stumbled upon this problem due to getting this error recently out of nowhere in react native- 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 -

    https://github.com/facebook/react-native/issues/25293

    And solution would mostly be like this -

    https://github.com/facebook/react-native/issues/25293#issuecomment-503045776

    0 讨论(0)
  • 2020-12-02 03:23

    I just found the source of the issue by using CTRL+SHIFT+F and looking for the problematic attributes in the code (of the entire scope). Turns out in my case the culprit was a third party dependency. Once i uninstalled it it was fixed. I guess the issue came from updating gradle and these outdated libraries somehow interfering with it. I still dont understand the nature of the issue exactly but I hope this helps someone else dealing with the same issue.

    0 讨论(0)
提交回复
热议问题