-
Notifications
You must be signed in to change notification settings - Fork 429
Cannot find a version of 'androidx.appcompat:appcompat' that satisfies the version constraints #757
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
Comments
Yes, migrating to AndroidX is going to be a pain for the next while. See here |
https://github.com/mikehardy/jetifier should ease the transition but gradle dependencies analysis is a skill that most have avoided so there's always some learning involved |
Thanks @mikehardy. I'm going to have to look into providing better support for AndroidX. I see what you did here. I knew AndroidX was going to be painful. Can't wait until this is all behind us. |
I’ve pushed a commit to master of private repo which should help fix this. |
Will your update be pushed to the public repo? kinda makes the library dead in the water as it is now |
See CHANGELOG |
Hi, compileOnly 'com.facebook.react:react-native:+' TO implementation('com.facebook.react:react-native:+') { full build.gradle: apply plugin: 'com.android.library' // Android dependencies // Plugin dependencies def safeExtGet(prop, fallback) { android {
} repositories{ dependencies {
} |
The latest version works perfectly fine with a new RN app - I didn’t have to change anything. |
I still get this error :(
Fixes it |
If you have to exclude com.android.support, you have problems with other plugins or you haven’t carefully followed the setup steps. There’s no such thing as com.android.support when using AndroidX. |
Changing compileonly too implementation('com.facebook.react:react-native:+') Without exclude group Works too.. I had/have only problems with "compileOnly" |
It’s always a good idea to generate a fresh new Sometimes it’s a good idea to regen a fresh app and move your JS into it. |
Hi again Just created a new test project , everything Works fine with only backgroundgeolocation installed, after installing firebase and react-native-maps i run into this problem again. :(.. I found the quick solution for changing compileonly to implementation here: Runing with RN 0.60.4 |
@christocracy I had/have the same issue. I am on 0.60.5 and have followed the guide for >= 0.60. I also have some of the same modules as people mention above. (rn-firebase, rn-maps). Though I am not sure it is the correct solution, it is true, that if I change your build.gradle to not use compileOnly the app compiles. To
Possibly without the exclude |
PS: I have jetifier enabled. That might be relevant |
Show me your gradle files:
|
react-native-firebase has some issues with androidx library specification, and an unrelated issue with CI that is stopping us from releasing v5.5.7 :-( invertase/react-native-firebase#2476 I have attached a patch-package file in a comment on that pull request for people to use in the meantime, I needed it in my project - either for this module in combo with react-native-firebase or another, I'm not sure invertase/react-native-firebase#2476 (comment) |
Thanks @mikehardy. |
Your Environment
"name": "newBackgroundGps",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "react-native start",
"test": "jest",
"lint": "eslint ."
},
"dependencies": {
"cocoa-lumberjack": "^3.0.5",
"react": "16.8.6",
"react-native": "0.60.0",
"react-native-background-fetch": "^2.6.0",
"react-native-background-geolocation": "^3.0.7"
},
"devDependencies": {
"@babel/core": "^7.4.5",
"@babel/runtime": "^7.4.5",
"@react-native-community/eslint-config": "^0.0.5",
"babel-jest": "^24.8.0",
"eslint": "^6.0.1",
"jest": "^24.8.0",
"metro-react-native-babel-preset": "^0.55.0",
"react-test-renderer": "16.8.6"
},
"jest": {
"preset": "react-native"
}
}
NA
Expected Behavior
Android can build successfully - using React-native 0.60.0
Actual Behavior
Failed with error message:
Steps to Reproduce
Context
Create a barebone project with react-native 0.60 and react-native-background-geolocation
See gif recording off all steps:
Debug logs
Logs
The text was updated successfully, but these errors were encountered: