0

I'm trying to build my React Native project

react-native run-android

I get this error

Could not resolve com.android.support:support-compat:26.1.0.
....
 Required by: project :react-native-maps
...
 Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.

However, my build.gradle file has

implementation "com.android.support:appcompat-v7:28.0.0"

and the builTools 28.0.3 exist in my ~/Library/Android/sdk/tools, i have also tried using both

implementation "com.android.support:appcompat-v7:${rootProject.ext.supportLibVersion}"
implementation "com.android.support:appcompat-v7:+"

This doesn't work for me either.

Africa Matji
  • 345
  • 3
  • 19
  • check your `/node_modules/react-native-maps` folder. this package is using `support-compat:26.1.0`. maybe some version changes in its configuration solve your problem – Ali SabziNezhad Apr 13 '19 at 11:43
  • I hear you, but i don't understand. Is there a specific file i should change inside `/node_modules/react-native-maps` – Africa Matji Apr 13 '19 at 12:07

1 Answers1

0

I have solved this by upgrading to the latest version of the react-native-maps plugin.

npm install --save "react-native-maps@react-native-community/react-native-maps#master".

I think its very important to make sure that all plugins are updated, especially if you haven't touched your project for some time and when you do everything just breaks.

Africa Matji
  • 345
  • 3
  • 19