1. 程式人生 > >ReactNative安卓端報錯Could not find play-services-basement.aar

ReactNative安卓端報錯Could not find play-services-basement.aar

報錯.png
這兩天同事在寫專案的過程中,啟動Android端進行編譯報瞭如上的錯誤,從報錯中可以知道,是因為第三方庫react-native-device-info引起的,從其原始碼中可以看到:
image.png
它的安卓部分依賴了google的服務,為啥要依賴這個服務呢?不是特別清楚。既然罪魁禍首是這個庫,就去github上看看她的issues吧。
https://github.com/rebeccahughes/react-native-device-info/issues/414
最終我們找到解決方案,
image.png