I use react-native-vector-icons with react-native-elements
The problem is that when I debug my app icons do not show up, and if I try to build release .apk I get :
FAILURE: Build failed with an exception.
What went wrong: Could not resolve all files for configuration ':react-native-vector-icons:releaseCompileClasspath'. Could not find common.jar (android.arch.lifecycle:common:1.1.0). Searched in the following locations: https://jcenter.bintray.com/android/arch/lifecycle/common/1.1.0/common-1.1.0.jar Could not find common.jar (android.arch.core:common:1.1.0). Searched in the following locations: https://jcenter.bintray.com/android/arch/core/common/1.1.0/common-1.1.0.jar
ok, the solution to this was ... funny
when you run build, build script must be downloaded from a repo, so the solution is to change URL/repo ur using when building
1 - open android/build.gradle and node_modules/react-native-vector-icons/android/build.gradle 2 - in both files u shall see jcenter() function that gives URL to repo, 3 - to solve the problem, place google() function above jcenter() in both files(in repositories section, and in allprojects section of android/build.graddle)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.