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

ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:font #694

Closed
nandini12396 opened this issue Jun 18, 2019 · 34 comments

Comments

Projects
None yet
@nandini12396
Copy link

commented Jun 18, 2019

Bug

I am getting the following errors:
ERROR: In FontFamilyFont, unable to find attribute android:font
ERROR: In FontFamilyFont, unable to find attribute android:fontStyle
ERROR: In FontFamilyFont, unable to find attribute android:fontVariationSettings
ERROR: In FontFamilyFont, unable to find attribute android:fontWeight
ERROR: In FontFamilyFont, unable to find attribute android:ttcIndex
ERROR: In GradientColor, unable to find attribute android:endX
ERROR: In GradientColor, unable to find attribute android:endY
ERROR: In GradientColor, unable to find attribute android:startX
ERROR: In GradientColor, unable to find attribute android:startY
ERROR: In GradientColorItem, unable to find attribute android:offset

:react-native-device-info:processReleaseResources FAILED

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':react-native-device-info:processReleaseResources'.

com.android.ide.common.process.ProcessException: Failed to execute aapt

Environment info

Environment:
OS: Windows 10
Node: 10.13.0
Yarn: 1.12.3
npm: 6.4.1
Watchman: Not Found
Xcode: N/A
Android Studio: Version 3.2.0.0 AI-181.5540.7.32.5056338

Packages: (wanted => installed)
react: 16.3.2 => 16.3.2
react-native: 0.55.4 => 0.55.4
React native info output:

"react-native-device-info": "^0.21.5",
@javascriptNode

This comment has been minimized.

Copy link

commented Jun 18, 2019

我也遇到了就是今天

@myshowject

This comment has been minimized.

Copy link

commented Jun 18, 2019

我也遇到这个报错

@cheneywan

This comment has been minimized.

Copy link

commented Jun 18, 2019

The same problem

@nandini12396

This comment has been minimized.

Copy link
Author

commented Jun 18, 2019

Any solution? Tried using older version also. Blocked completely!

@Janain

This comment has been minimized.

Copy link

commented Jun 18, 2019

版本升级后,项目跑不起来了,sdk之前是26,今天项目跑不起来了 ,是因为androidx库,android.supoort不一致,是这个问题导致的吗,求赐教下????在线等!!急急急

@mikehardy

This comment has been minimized.

Copy link
Collaborator

commented Jun 18, 2019

that's pretty odd - have you guys tried upgrading, we're on 2.1.2 now and the only version listed here is very old. We just pushed a release that limits the play services dependency to a pre-AndroidX version, as that may cause build breaks - 2.1.2 has that. The changes from 0.x.x to 1.x.x and from 1.x.x to 2.x.x are very easy to adapt to, nothing serious from a breaking change perspective

@Janain

This comment has been minimized.

Copy link

commented Jun 18, 2019

After the version is upgraded, the project can't run. The sdk was 26 before. Today, the project can't run. It is because the androidx library and android.supoort are inconsistent. Is this caused by this problem? ? ? ? Online, etc.!

@Janain

This comment has been minimized.

Copy link

commented Jun 18, 2019

You said that you just retired the previous version, but my project still can't run?

@dandan6002

This comment has been minimized.

Copy link

commented Jun 18, 2019

My project can't run up.

@MikePodgorniy

This comment has been minimized.

Copy link

commented Jun 18, 2019

the very old "react-native-device-info": "0.24.0" is broke too

@nandini12396

This comment has been minimized.

Copy link
Author

commented Jun 18, 2019

same for me. I tried 2.1.2 as well as the version I was using before. Nothing is working. Tried gradle clean and build also.

@Janain

This comment has been minimized.

Copy link

commented Jun 18, 2019

我也是

你是什么问题 ,项目能起来不

@myshowject

This comment has been minimized.

Copy link

commented Jun 18, 2019

the very old"react-native-device-info": "^0.12.0" is broke too

@tututututututu

This comment has been minimized.

Copy link

commented Jun 18, 2019

because compile "com.google.android.gms:play-services-gcm:$googlePlayServicesVersion"
the googlePlayServicesVersion default is use "+" and com.google.android.gms:play-services-gcm update today and bringin androidX

add this code to your project build.gradle
solved
ext {
buildToolsVersion = "28.0.3"
minSdkVersion = 18
compileSdkVersion = 28
targetSdkVersion = 28
supportLibVersion = "28.0.0"
googlePlayServicesVersion="15.0.1"
}

@Janain

This comment has been minimized.

Copy link

commented Jun 18, 2019

将此代码添加到您的项目build.gradle
解决了
ext {
buildToolsVersion =“28.0.3”
minSdkVersion = 18
compileSdkVersion = 28
targetSdkVersion = 28
supportLibVersion =“28.0.0”
googlePlayServicesVersion =“15.0.1”
}

那我只想把sdk依赖停留在26,所以这怎么破?
Then I just want to keep the sdk dependency at 26, so how is this broken?

@ctysc2

This comment has been minimized.

Copy link

commented Jun 18, 2019

将此代码添加到您的项目build.gradle
解决了
ext {
buildToolsVersion =“28.0.3”
minSdkVersion = 18
compileSdkVersion = 28
targetSdkVersion = 28
supportLibVersion =“28.0.0”
googlePlayServicesVersion =“15.0.1”
}

那我只想把sdk依赖停留在26,所以这怎么破?
Then I just want to keep the sdk dependency at 26, so how is this broken?

重点是这句:googlePlayServicesVersion =“15.0.1”

@tututututututu

This comment has been minimized.

Copy link

commented Jun 18, 2019

将此代码添加到您的项目build.gradle
解决了
ext {
buildToolsVersion =“28.0.3”
minSdkVersion = 18
compileSdkVersion = 28
targetSdkVersion = 28
supportLibVersion =“28.0.0”
googlePlayServicesVersion =“15.0.1”
}

那我只想把sdk依赖停留在26,所以这怎么破?
Then I just want to keep the sdk dependency at 26, so how is this broken?

just add googlePlayServicesVersion="15.0.1"

@tututututututu

This comment has been minimized.

Copy link

commented Jun 18, 2019

THINKS!@tututututututu
node_modules/react-native-device-info/android/build.gradle
def DEFAULT_GOOGLE_PLAY_SERVICES_VERSION = "15.0.1"

why not define ext googlePlayServicesVersion to your project build.gradle are you maintenance by your self?

@Janain

This comment has been minimized.

Copy link

commented Jun 18, 2019

谢谢 已解决

@dandan6002

This comment has been minimized.

Copy link

commented Jun 18, 2019

because compile "com.google.android.gms:play-services-gcm:$googlePlayServicesVersion"
the googlePlayServicesVersion default is use "+" and com.google.android.gms:play-services-gcm update today and bringin androidX

add this code to your project build.gradle
solved
ext {
buildToolsVersion = "28.0.3"
minSdkVersion = 18
compileSdkVersion = 28
targetSdkVersion = 28
supportLibVersion = "28.0.0"
googlePlayServicesVersion="15.0.1"
}

thank you!

@Aj1402

This comment has been minimized.

Copy link

commented Jun 18, 2019

THINKS!@tututututututu
node_modules/react-native-device-info/android/build.gradle
def DEFAULT_GOOGLE_PLAY_SERVICES_VERSION = "15.0.1"

why not define ext googlePlayServicesVersion to your project build.gradle are you maintenance by your self?

Worked :)

@nandini12396

This comment has been minimized.

Copy link
Author

commented Jun 18, 2019

because compile "com.google.android.gms:play-services-gcm:$googlePlayServicesVersion"
the googlePlayServicesVersion default is use "+" and com.google.android.gms:play-services-gcm update today and bringin androidX

add this code to your project build.gradle
solved
ext {
buildToolsVersion = "28.0.3"
minSdkVersion = 18
compileSdkVersion = 28
targetSdkVersion = 28
supportLibVersion = "28.0.0"
googlePlayServicesVersion="15.0.1"
}

Worked for me. Thank you! Closing it

@LsFern

This comment has been minimized.

Copy link

commented Jun 18, 2019

If you don't want to use this field, you can pull this plug-in out and comment the following code. That's it.
It's easy to maintain later

TIM截图20190618173944
TIM截图20190618174004

@mikehardy

This comment has been minimized.

Copy link
Collaborator

commented Jun 18, 2019

@LsFern that is true, but not great advice unless coupled with a pointer to the 'patch-package' npm, as maintaining modified node_modules differences is dangerous otherwise - your changes could be wiped out any time.

Adding an ext {} block to android/build.gradle with the play services dependency is better advice (it is easy and everyone should do it or you are open to other problems), but even better is to just update your compileSdk to 28 and targetSdk to 28 since Google will force you to shortly anyway and use the 2.1.2 version...

@mikehardy

This comment has been minimized.

Copy link
Collaborator

commented Jun 18, 2019

Gigantic distributed systems with free but loosely couple dependencies are amazing and save you days with all their free functionality, but they do not digest breaking change well, no.

@myshowject

This comment has been minimized.

Copy link

commented Jun 18, 2019

我现在还没解决,真的服气

@HanAsteroid

This comment has been minimized.

Copy link

commented Jun 18, 2019

Thanks for your resolution, I just complained about sorry.

@mikehardy

This comment has been minimized.

Copy link
Collaborator

commented Jun 18, 2019

@HanAsteroid no worries, honestly it cost me half a day building jetifier so people could have a bridge to use AndroidX https://github.com/mikehardy/jetifier - it's going to be a messy transition in the react-native ecosystem

@2qiaoyu

This comment has been minimized.

Copy link

commented Jun 19, 2019

for the old version like '0.12.1',find /node_modules/react-native-device-info/android/build.gradle,
modify 'com.google.android.gms:play-services-gcm:+' to 'com.google.android.gms:play-services-gcm:15.0.1'

@mikehardy

This comment has been minimized.

Copy link
Collaborator

commented Jun 19, 2019

Use patch-package rather than modifying in node_modules directly, that way it will be persistent

@HighSoftWare96

This comment has been minimized.

Copy link

commented Jun 19, 2019

because compile "com.google.android.gms:play-services-gcm:$googlePlayServicesVersion"
the googlePlayServicesVersion default is use "+" and com.google.android.gms:play-services-gcm update today and bringin androidX

add this code to your project build.gradle
solved
ext {
buildToolsVersion = "28.0.3"
minSdkVersion = 18
compileSdkVersion = 28
targetSdkVersion = 28
supportLibVersion = "28.0.0"
googlePlayServicesVersion="15.0.1"
}

I tried with this solution and with react-native-device-info latest version but the issue persist...

@tututututututu

This comment has been minimized.

Copy link

commented Jun 20, 2019

because compile "com.google.android.gms:play-services-gcm:$googlePlayServicesVersion"
the googlePlayServicesVersion default is use "+" and com.google.android.gms:play-services-gcm update today and bringin androidX
add this code to your project build.gradle
solved
ext {
buildToolsVersion = "28.0.3"
minSdkVersion = 18
compileSdkVersion = 28
targetSdkVersion = 28
supportLibVersion = "28.0.0"
googlePlayServicesVersion="15.0.1"
}

I tried with this solution and with react-native-device-info latest version but the issue persist...

1.project build.gradle
2.ext node is the first level

@GabeConsalter

This comment has been minimized.

Copy link

commented Jun 25, 2019

For conflicts with different libraries versions, try to resolve changing this:

compile project(':react-native-device-info')

To this:

compile(project(':react-native-device-info')) {
    exclude group: 'com.google.android.gms'
}
@mikehardy

This comment has been minimized.

Copy link
Collaborator

commented Jun 25, 2019

@GabeConsalter no - just use the latest version of the library or - better - you should always pin your dependencies in android/build.gradle’s ext {} block by specifying googlePlayServicesVersion

9588763

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.