maxs15 / react-native-spinkit

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

gradlew assembleRelease come to nothing #106

Closed fjsun123 closed 4 years ago

fjsun123 commented 5 years ago
      -R\
      D:\asdd\BAODAXIAKEJI\node_modules\react-native-spinkit\android\build\intermediates\res\compiled\release\values_values.arsc.flat\
      -R\
      D:\asdd\BAODAXIAKEJI\node_modules\react-native-spinkit\android\build\intermediates\res\compiled\release\xml_preferences.xml.flat\
      --auto-add-overlay\
      --non-final-ids\
      -0\
      apk\
      --no-version-vectors

Daemon: AAPT2 aapt2-3.2.1-4818971-windows Daemon #0

BUILD FAILED in 2m 12s 309 actionable tasks: 8 executed, 301 up-to-date

D:\asdd\BAODAXIAKEJI\android>gradlew assembleRelease

What's the problem

咋了这是?

farahty commented 5 years ago

same issue

andycodesstuff commented 5 years ago

same issue

andycodesstuff commented 5 years ago

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)

gifary commented 5 years ago

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' } `

vincentk42 commented 5 years ago

@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.

gifary commented 5 years ago

@vincentk42 yes inside react-native-spinkit node_modules folder. That's fixed build signed APK for me

vincentk42 commented 5 years ago

@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'
}
vincentk42 commented 5 years ago

@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

https://stackoverflow.com/questions/50159860/activityindicator-not-spinning-or-animated-only-static-image-on-android

beng970804 commented 5 years ago

@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

https://stackoverflow.com/questions/50159860/activityindicator-not-spinning-or-animated-only-static-image-on-android

What did u change to make it work?

vincentk42 commented 5 years ago

@beng970804 I updated the gradle and made sure that the animations in the developer menu were TURNED ON.

beng970804 commented 5 years ago

@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?

vincentk42 commented 5 years ago

On your android phone. Go to the settings menu..Developer Options will be the last item on the list. It should have a {} icon.