Closed fjsun123 closed 4 years ago
same issue
same issue
Fix: https://github.com/facebook/react-native/issues/22563#issuecomment-445523810 (or you can install a forked version of the repo with the issue fixed, like https://github.com/oseme-techguy/react-native-spinkit)
i fixed with this gradle setting `def safeExtGet(prop, fallback) { rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback }
buildscript { repositories { jcenter() google() maven { url 'https://maven.google.com/' name 'Google' } }
dependencies {
//noinspection GradleDependency
classpath 'com.android.tools.build:gradle:3.2.1'
}
}
apply plugin: 'com.android.library'
android { compileSdkVersion safeExtGet('compileSdkVersion', 27) //noinspection GradleDependency buildToolsVersion safeExtGet('buildToolsVersion', '27.0.3')
defaultConfig {
minSdkVersion safeExtGet('minSdkVersion', 16)
//noinspection OldTargetApi
targetSdkVersion safeExtGet('targetSdkVersion', 27)
}
lintOptions {
abortOnError false
}
}
repositories { mavenLocal() jcenter() google() maven { // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm url "$projectDir/../../../node_modules/react-native/android" } maven { url 'https://maven.google.com/' name 'Google' } }
dependencies { //noinspection GradleDynamicVersion implementation 'com.facebook.react:react-native:+' implementation 'com.github.ybq:Android-SpinKit:1.1.0' } `
@gifary the changes you made were to the build.gradle inside the android folder within the react-native-spinkit node_modules folder...correct? I just copied your file(minus the backticks). I was able to get the app to build, but I still don't see any changes to the spinner.
@vincentk42 yes inside react-native-spinkit node_modules folder. That's fixed build signed APK for me
@gifary I've tried building a second time. This time I've matched the CompiledSDKVersion, BuildToolVersion, MinSDKVersion, and TargetSDK to match their respective values inside the app level build.gradle. This has not worked either.
This is what my spinkit gradle file looks like now:
def safeExtGet(prop, fallback) {
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
}
buildscript {
repositories {
jcenter()
google()
maven {
url 'https://maven.google.com/'
name 'Google'
}
}
dependencies {
//noinspection GradleDependency
classpath 'com.android.tools.build:gradle:3.2.1'
}
}
apply plugin: 'com.android.library'
android {
compileSdkVersion safeExtGet('compileSdkVersion', 26)
//noinspection GradleDependency
buildToolsVersion safeExtGet('buildToolsVersion', '26.0.2')
defaultConfig {
minSdkVersion safeExtGet('minSdkVersion', 19)
//noinspection OldTargetApi
targetSdkVersion safeExtGet('targetSdkVersion', 26)
}
lintOptions {
abortOnError false
}
}
repositories {
mavenLocal()
jcenter()
google()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url "$projectDir/../../../node_modules/react-native/android"
}
maven {
url 'https://maven.google.com/'
name 'Google'
}
}
dependencies {
//noinspection GradleDynamicVersion
implementation 'com.facebook.react:react-native:+'
implementation 'com.github.ybq:Android-SpinKit:1.1.0'
}
@gifary I was able to get it to work only after I enabled animations in the developers options. For anyone else if you'd like to see a little more info
@gifary I was able to get it to work only after I enabled animations in the developers options. For anyone else if you'd like to see a little more info
What did u change to make it work?
@beng970804 I updated the gradle and made sure that the animations in the developer menu were TURNED ON.
@beng970804 I updated the gradle and made sure that the animations in the developer menu were TURNED ON.
May i know where did you find the developer menu?
On your android phone. Go to the settings menu..Developer Options will be the last item on the list. It should have a {} icon.
Daemon: AAPT2 aapt2-3.2.1-4818971-windows Daemon #0
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get ful
Get more help at https://help.gradle.org
BUILD FAILED in 2m 12s 309 actionable tasks: 8 executed, 301 up-to-date
D:\asdd\BAODAXIAKEJI\android>gradlew assembleRelease
What's the problem
咋了这是?