React-native-screens: Build failed with an exception on Android

Created on 5 Nov 2019  路  7Comments  路  Source: software-mansion/react-native-screens

Hi,

My app is working well on iOS on dev. but when it goes to andorid I have below error :

> Could not resolve all files for configuration ':react-native-screens:debugCompileClasspath'.
   > Could not find coordinatorlayout.jar (androidx.coordinatorlayout:coordinatorlayout:1.0.0).
     Searched in the following locations:
         https://dl.google.com/dl/android/maven2/androidx/coordinatorlayout/coordinatorlayout/1.0.0/coordinatorlayout-1.0.0.jar

react-native run-android
Screen Shot 2019-11-05 at 11 42 52 AM

package.json
Screen Shot 2019-11-05 at 11 58 08 AM

build.gradle
Screen Shot 2019-11-05 at 11 57 49 AM

seems it's an enviromental problem, cause it's working on my friend's laptop!!

any idea to make it work ?
Thanks

Most helpful comment

fixed!

in node_modules/react-native-screens/build.gradle I changed

implementation 'androidx.coordinatorlayout:coordinatorlayout:1.0.0'

from dependencies to

implementation 'androidx.coordinatorlayout:coordinatorlayout:1.0.0@aar'

@kmagiera sry for mention, any suggestion to fix this permanently ? thanks

All 7 comments

fixed!

in node_modules/react-native-screens/build.gradle I changed

implementation 'androidx.coordinatorlayout:coordinatorlayout:1.0.0'

from dependencies to

implementation 'androidx.coordinatorlayout:coordinatorlayout:1.0.0@aar'

@kmagiera sry for mention, any suggestion to fix this permanently ? thanks

fixed!

in node_modules/react-native-screens/build.gradle I changed

implementation 'androidx.coordinatorlayout:coordinatorlayout:1.0.0'

from dependencies to

implementation 'androidx.coordinatorlayout:coordinatorlayout:1.0.0@aar'

@kmagiera sry for mention, any suggestion to fix this permanently ? thanks

Its worked for me, Tnx

Thank you , worked for me

fixed!

in node_modules/react-native-screens/build.gradle I changed

implementation 'androidx.coordinatorlayout:coordinatorlayout:1.0.0'

from dependencies to

implementation 'androidx.coordinatorlayout:coordinatorlayout:1.0.0@aar'

@kmagiera sry for mention, any suggestion to fix this permanently ? thanks

also worked for me thanks, however i changed
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.0.0' to
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.0.0@aar'

I think the original problem reported here has been resolved. Not sure what is happening for you now but the dependency mentioned in the orig report is no longer needed and was removed so shouldn't cause build failures.

For all build related issues I suggest to create a clean app using react-native init, add screens to it and try building. This helps determine if there is a problem with your dev setup or an actual problem with the library. When the project builds succesfully it is a strong indicator that the issue is due to your project setup where the build failes. In such a case I suggest to look for differences in project configuration between your project and clean react-native one.

@kmagiera strange is that seems all people here facing this issue are located inside Iran! we normally have problem with gradle and have to use VPN to download dependencies, and as I know on a situation we get 404 for these packages! lol

fixed!

in node_modules/react-native-screens/build.gradle I changed

implementation 'androidx.coordinatorlayout:coordinatorlayout:1.0.0'

from dependencies to

implementation 'androidx.coordinatorlayout:coordinatorlayout:1.0.0@aar'

@kmagiera sry for mention, any suggestion to fix this permanently ? thanks

Worked for me, Thanks.

Was this page helpful?
0 / 5 - 0 ratings