Vydia / react-native-background-upload

Upload files in your React Native app even while it's backgrounded. Supports Android and iOS, including camera roll assets.
MIT License
723 stars 330 forks source link

Can't build for android in RN 0.63.2 #212

Closed LcsGrz closed 4 years ago

LcsGrz commented 4 years ago

When I try to create a build for release or debug, the gradlew returns the following error:

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* Where:
Build file '.../react-native-app/node_modules/react-native-background-upload/android/build.gradle' line: 22

* What went wrong:
A problem occurred evaluating project ':react-native-background-upload'.
 > Could not initialize class org.jetbrains.kotlin.gradle.plugin.sources.DefaultKotlinSourceSetKt

* 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 full insights.
==============================================================================

2: Task failed with an exception.
-----------
* What went wrong:
A problem occurred configuring project ':react-native-background-upload'.
 > compileSdkVersion is not specified.

* 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 full insights.
==============================================================================

Libs "react": "16.13.1", "react-native": "0.63.2", "react-native-background-upload": "^6.0.0",

ivanzhang2 commented 4 years ago

same issue

iamraffe commented 4 years ago

Same issue here

reime005 commented 4 years ago

can you check with the example app? it should work: example/RNBackgroundExample

LcsGrz commented 4 years ago

can you check with the example app? it should work: example/RNBackgroundExample

Hey! Thanks! :D

I added this lines in android/build.gradle and now compile :')

buildscript {
 ext {
       ...
       ext.kotlinVersion = '1.3.41' // Your app's version
       ext.detoxKotlinVersion = ext.kotlinVersion // Detox' version: should be 1.1.0 or higher!
 }

 dependencies {
       ...
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
    }
}