maxs15 / react-native-spinkit

A collection of animated loading indicators for React Native
MIT License
2.36k stars 300 forks source link

Build Project failed #110

Closed Dante-dan closed 5 years ago

Dante-dan commented 5 years ago

When I run react-native run-android, it's failed.

* What went wrong:
Could not resolve all files for configuration ':app:debugCompileClasspath'.
> Could not find com.github.ybq:Android-SpinKit:1.1.0.
  Searched in the following locations:
      file:/D:/Program Files/Android/Sdk/extras/m2repository/com/github/ybq/Android-SpinKit/1.1.0/Android-SpinKit-1.1.0.pom
      file:/D:/Program Files/Android/Sdk/extras/m2repository/com/github/ybq/Android-SpinKit/1.1.0/Android-SpinKit-1.1.0.jar
      file:/D:/Program Files/Android/Sdk/extras/google/m2repository/com/github/ybq/Android-SpinKit/1.1.0/Android-SpinKit-1.1.0.pom
      file:/D:/Program Files/Android/Sdk/extras/google/m2repository/com/github/ybq/Android-SpinKit/1.1.0/Android-SpinKit-1.1.0.jar
      file:/D:/Program Files/Android/Sdk/extras/android/m2repository/com/github/ybq/Android-SpinKit/1.1.0/Android-SpinKit-1.1.0.pom
      file:/D:/Program Files/Android/Sdk/extras/android/m2repository/com/github/ybq/Android-SpinKit/1.1.0/Android-SpinKit-1.1.0.jar
      https://jitpack.io/com/github/ybq/Android-SpinKit/1.1.0/Android-SpinKit-1.1.0.pom
      https://jitpack.io/com/github/ybq/Android-SpinKit/1.1.0/Android-SpinKit-1.1.0.jar
      https://dl.google.com/dl/android/maven2/com/github/ybq/Android-SpinKit/1.1.0/Android-SpinKit-1.1.0.pom
.
.
.
    file:/E:/code/gitlab/soa-app/node_modules/react-native/android/com/github/ybq/Android-SpinKit/1.1.0/Android-SpinKit-1.1.0.jar
    file:/E:/code/gitlab/soa-app/android/app/libs/Android-SpinKit-1.1.0.jar
    file:/E:/code/gitlab/soa-app/android/app/libs/Android-SpinKit.jar
  Required by:
  project :app > project :react-native-spinkit

maybe it change url , we can change it's url to 1.2

bitRequired commented 5 years ago

The same

Dante-dan commented 5 years ago

I resolve it, I set the com.github.ybq:Android-SpinKit : 1.2.0

/node_modules/react-native-spinkit/android/build.gradle

dependencies {
   compile 'com.facebook.react:react-native: +'
   compile 'com.github.ybq:Android-SpinKit:1.2.0'
}
maxs15 commented 5 years ago

Fix merged in 1.2.0

lemonkey commented 5 years ago

I'm curious as to why the error is happening in the first place. Just bumping to a newer version doensn't sit well with me.

https://mvnrepository.com/artifact/com.github.ybq/Android-SpinKit shows that Android-SpinKit 1.1.0 exists, just not on the jcenter repo. It only shows up on the mulesoft repo.

HamedNN76 commented 5 years ago

I resolve it, I set the com.github.ybq:Android-SpinKit : 1.2.0

/node_modules/react-native-spinkit/android/build.gradle

dependencies {
   compile 'com.facebook.react:react-native: +'
   compile 'com.github.ybq:Android-SpinKit:1.2.0'
}

That's the thing but you should not overwrite node_modules files! You should set the react-native-spinkit version to "^1.3.0" in the package.json file. Then remove node_mosules and run npm i. This will set the Android-SpinKit 1.2.0, and solve the problem