numandev1 / react-native-compressor

🗜️Compress Image, Video, and Audio same like Whatsapp 🚀✨

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Android build error

Simoon-F opened this issue · comments

Current behavior

Execution failed for task ':react-native-compressor:compileReleaseJavaWithJavac'.
23:16:34   > Could not resolve all files for configuration ':react-native-compressor:androidJdkImage'.
23:16:34      > Failed to transform core-for-system-modules.jar to match attributes {artifactType=_internal_android_jdk_image, org.gradle.libraryelements=jar, org.gradle.usage=java-runtime}.
23:16:34         > Execution failed for JdkImageTransform: /usr/local/android-sdk/platforms/android-33/core-for-system-modules.jar.
23:16:34            > jlink executable /usr/lib/jvm/java-11-openjdk-11.0.17.0.8-2.el7_9.x86_64/bin/jlink does not exist.

Expected behavior

The build should succeed

Platform

  • Android
  • [] iOS

React Native Version

"react-native": "0.71.14"

React Native Compressor Version

"react-native-compressor": "^1.8.23"

Reproducible Steps And Demo

build.gradle :


buildscript {
  ext {
    buildToolsVersion = "33.0.0"
    minSdkVersion = 24
    compileSdkVersion = 33
    targetSdkVersion = 33
    kotlinVersion = '1.7.20'

    appCompatVersion = "1.4.2"      // Or higher.  Required for new AndroidX compatibility.
    googlePlayServicesLocationVersion = "21.0.1"  // Or higher.
    VisionCameraCodeScanner_targetSdkVersion = 31
    VisionCameraCodeScanner_compileSdkVersion = 31

    // 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:7.3.1")
    classpath("com.facebook.react:react-native-gradle-plugin")
    
    classpath 'com.google.gms:google-services:4.3.15'
    classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
    classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.2'
  }
}

allprojects {
  repositories {
    jcenter() {
        content {
            includeModule("cn.aigestudio.wheelpicker", "WheelPicker")
        }
    }
    // Required for react-native-background-geolocation
    maven { url("${project(':react-native-background-geolocation').projectDir}/libs") }
    maven { url 'https://developer.huawei.com/repo/' }
    // Required for react-native-background-fetch
    maven { url("${project(':react-native-background-fetch').projectDir}/libs") }

  }
}

When I uninstall the react-native-compressor, work will return to normal.

👋 @Simoon-F
Thanks for opening your issue here! If you find this package useful hit the star🌟!