Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android Can't Build: appcompat-v7 AAPT: error: resource android:attr/fontVariationSettings not found. #25338

Closed
Darwin-Li opened this issue Jun 20, 2019 · 8 comments
Labels
API: Settings Bug Platform: Android Android applications. Stale There has been a lack of activity on this issue and it may be closed soon.

Comments

@Darwin-Li
Copy link

Darwin-Li commented Jun 20, 2019

Issue
I know there is an recent issue from the new google api update. But I can seem to figure this out after many hours of debugging. Any help or insight would be greatly appreciated!

:react-native-push-notification:verifyReleaseResources/home/circleci/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.1.1.aar/537c9158e84b60ea7e5743fd405e631a/res/values/values.xml:251:5-69: AAPT: error: resource android:attr/fontVariationSettings not found.
    

/home/circleci/.gradle/caches/transforms-1/files-1.1/appcompat-v7-27.1.1.aar/537c9158e84b60ea7e5743fd405e631a/res/values/values.xml:251:5-69: AAPT: error: resource android:attr/ttcIndex not found.
    

android build.gradle

ext {
  compileSdkVersion = 26
  buildToolsVersion = "27.0.3"
  supportLibVersion = "27.1.1"
  googlePlayServicesVersion = "16.+"
}

buildscript {
    ext {
        buildToolsVersion = "27.0.3"
        minSdkVersion = 19
        compileSdkVersion = 26
        targetSdkVersion = 26
        supportLibVersion = "27.1.1"
        googlePlayServicesVersion = "16.+"
    }
    repositories {
        google()
        maven{
            url 'https://dl.bintray.com/android/android-tools'
        }
        maven {
            url 'https://maven.google.com/'
            name 'Google'
        }
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.1.4'
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

app build.gradle

configurations.all {
    resolutionStrategy {
        force 'com.google.android.gms:play-services-gcm:16.1.0'
    }
}

dependencies {
    implementation(project(':react-native-push-notification')) {
        exclude group: 'com.google.android.gms'
    }
    implementation 'com.google.android.gms:play-services-base:16.1.0'
    implementation 'com.google.android.gms:play-services-maps:16.1.0'
    implementation 'com.google.android.gms:play-services-gcm:16.1.0'
    implementation 'com.google.android.gms:play-services-basement:16.1.0'
}

React Native version:

    Binaries:
      Node: 8.11.4 - /var/folders/p3/kvdgygxj5tv_wbvzk308kgz00000gn/T/yarn--1561057276714-0.4231988255188943/node
      Yarn: 1.16.0 - /var/folders/p3/kvdgygxj5tv_wbvzk308kgz00000gn/T/yarn--1561057276714-0.4231988255188943/yarn
      npm: 5.6.0 - /usr/local/bin/npm
      Watchman: 4.9.0 - /usr/local/bin/watchman
    SDKs:
      iOS SDK:
        Platforms: iOS 12.1, macOS 10.14, tvOS 12.1, watchOS 5.1
    IDEs:
      Android Studio: 3.4 AI-183.6156.11.34.5522156
      Xcode: 10.1/10B61 - /usr/bin/xcodebuild
    npmPackages:
      react: 16.6.0-alpha.8af6728 => 16.6.0-alpha.8af6728 
      react-native: ^0.57.4 => 0.57.4 
    npmGlobalPackages:
      react-native-cli: 2.0.1

Steps To Reproduce

  1. ./gradlew assembleSignedRelease
@react-native-bot
Copy link
Collaborator

It looks like you are using an older version of React Native. Please update to the latest release, v0.59 and verify if the issue still exists.

The "Resolution: Old Version" label will be removed automatically once you edit your original post with the results of running `react-native info` on a project using the latest release.

@marco-solari
Copy link

marco-solari commented Jun 21, 2019

Same issue with the latest release, v0.59...

-------------------------------------------------------------------------------------------------------------------------
> Task :app:processDebugResources FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processDebugResources'.
> Android resource linking failed
  /home/marco/.gradle/caches/transforms-1/files-1.1/drawee-1.10.0.aar/ae4ff12ae8e33549f49fc4f7b2dabdcb/res/values/values.xml:3:5-58:857: AAPT: error: resource android:attr/fontVariationSettings not found.
      
  /home/marco/.gradle/caches/transforms-1/files-1.1/drawee-1.10.0.aar/ae4ff12ae8e33549f49fc4f7b2dabdcb/res/values/values.xml:3:5-58:857: AAPT: error: resource android:attr/ttcIndex not found.
      
  error: failed linking references.
-------------------------------------------------------------------------------------------------------------------------

$ react-native info
info 
  React Native Environment Info:
    System:
      OS: Linux 4.18 Ubuntu 18.04.2 LTS (Bionic Beaver)
      CPU: (4) x64 Intel(R) Core(TM) i5-4460S CPU @ 2.90GHz
      Memory: 4.91 GB / 15.58 GB
      Shell: 4.4.19 - /bin/bash
    Binaries:
      Node: 11.14.0 - ~/.nvm/versions/node/v11.14.0/bin/node
      Yarn: 1.16.0 - /usr/bin/yarn
      npm: 6.7.0 - ~/.nvm/versions/node/v11.14.0/bin/npm
    npmPackages:
      react: 16.8.3 => 16.8.3 
      react-native: 0.59.9 => 0.59.9 
    npmGlobalPackages:
      react-native-cli: 2.0.1

Any clue?
We are stuck desperate!

@uraquitanfilho
Copy link

same issue. I did tryed [email protected] but got others issues..

@uraquitanfilho
Copy link

In this post I found the solution:
https://forum.ionicframework.com/t/firebase-app-unable-to-compile-on-android-with-aapt-error/166564/6

@Darwin-Li
Copy link
Author

I think I finally got it. I called ./gradlew app:dependencies and made sure that every single library from https://developers.google.com/android/guides/releases#june_17_2019 was that being used was using the version that was not updated recently

@vivek-aecor
Copy link

vivek-aecor commented Sep 1, 2019

How to resolve this error ?? Does anyone help me? @react-native-bot
android/build.gradle File

`buildscript {
ext {
buildToolsVersion = "27.0.3"

    minSdkVersion = 16

    compileSdkVersion = 27

    targetSdkVersion = 26

    supportLibVersion = "27.1.1"

    // googlePlayServicesVersion = "16.+"
}`

image

@stale
Copy link

stale bot commented Nov 30, 2019

Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions.

@stale stale bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Nov 30, 2019
@stale
Copy link

stale bot commented Dec 7, 2019

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.

@stale stale bot closed this as completed Dec 7, 2019
@facebook facebook locked as resolved and limited conversation to collaborators Dec 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
API: Settings Bug Platform: Android Android applications. Stale There has been a lack of activity on this issue and it may be closed soon.
Projects
None yet
Development

No branches or pull requests

5 participants