react-native-compressor: Build failed on android

Build fail when add react-native-compressor package in project build failed on android only. On iOS works well.

Platform

  • Android

React Native Version

“react-native”: “0.72.4”

React Native Compressor Version

“react-native-compressor”: “^1.8.2”,

Project build.gradle

buildscript {
    ext {
        buildToolsVersion = "33.0.0"
        minSdkVersion = 21
        compileSdkVersion = 33
        targetSdkVersion = 33
        kotlinVersion = "1.7.0"

        // We use NDK 23 which has both M1 support and is the side-by-side NDK version from AGP.
        ndkVersion = "23.1.7779620"
    }
    repositories {
        google()
        mavenCentral()
    }
    dependencies {
        classpath("com.android.tools.build:gradle")
        classpath("com.facebook.react:react-native-gradle-plugin")
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
    }
}

Build output

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':react-native-compressor:compileReleaseKotlin'.
> A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
   > Compilation error. See log for more details

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

* Get more help at https://help.gradle.org

BUILD FAILED in 2m 20s

About this issue

  • Original URL
  • State: closed
  • Created 10 months ago
  • Comments: 15 (6 by maintainers)

Most upvoted comments

yes fixed 😍 thnx man

@hamdij0maa is it working now?

done thank you

@hamdij0maa can you try 1.8.8

@hamdij0maa its LGTM, i am using 0.72.4 version in example folder and it is working good,

https://github.com/numandev1/react-native-compressor/blob/f0d4b97b169651989d8a3906e72ab41db0abc4ff/example/package.json#L26C5-L26C30

it is not reproducing on my side, can you check the example folder inside this repo if it is working or not?

@hamdij0maa can you share your build.gradle file and react native version?

@numandev1 kotlin_version is 1.7.0 am getting this error :

  • What went wrong: Execution failed for task ‘:react-native-compressor:compileDebugKotlin’.

A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction Compilation error. See log for more details

@hamdij0maa which Kotlin version, you are using? can you check build.gradle for kotlin version

@tannguyen05 @techgrih fixed this error into 1.8.3 version, can you try this version and let me know?

@numandev1 Thank you ;

@tannguyen05 @techgrih fixed this error into 1.8.3 version, can you try this version and let me know?

@numandev1 Many thanks; that works. 🎉