Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Execution failed for task ':react-native-audio-recorder-player:compileDebugJavaWithJavac' #577

Open
TheScalion opened this issue Jan 5, 2024 · 3 comments

Comments

@TheScalion
Copy link

Please fill the template to help you out. Also, please try the Example project compare before submiting the issue when you have certain issue with your project setup.

Version of react-native-audio-recorder-player : ^3.5.3

Tried with latest version - ^3.6.5

Version of React Native : "0.68.2",

Platforms you faced the error (Android )

  • What went wrong:
    Execution failed for task ':react-native-audio-recorder-player:compileDebugJavaWithJavac'.

error: invalid source release: 17

Build.gradle file

import org.apache.tools.ant.taskdefs.condition.Os

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
ext {
buildToolsVersion = "31.0.0"
minSdkVersion = 24
compileSdkVersion = 33
targetSdkVersion = 33
supportLibVersion = "28.0.0"
googlePlayServicesVersion = "18.0.0" // default: "+"
googlePlayServicesIidVersion = "16.0.1"
androidXCore = "1.7.0"
firebaseVersion = "17.3.4" // default: "+"
kotlinVersion = '1.6.10'
if (System.properties['os.arch'] == "aarch64") {
// For M1 Users we need to use the NDK 24 which added support for aarch64
ndkVersion = "24.0.8215888"
} else {
// Otherwise we default to the side-by-side NDK version from AGP.
ndkVersion = "21.4.7075529"
}
}
repositories {
google()
mavenCentral()
}
dependencies {
classpath("com.android.tools.build:gradle:7.0.4")
classpath("com.facebook.react:react-native-gradle-plugin")
classpath("de.undercouch:gradle-download-task:4.1.2")
classpath 'com.google.gms:google-services:4.3.10'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

allprojects {
repositories {
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url("$rootDir/../node_modules/react-native/android")
}
maven {
// Android JSC is installed from npm
url("$rootDir/../node_modules/jsc-android/dist")
}
mavenCentral {
// We don't want to fetch react-native from Maven Central as there are
// older versions over there.
content {
excludeGroup "com.facebook.react"
}
}
google()
maven { url 'https://www.jitpack.io' }
}
}

@haisamMH
Copy link

haisamMH commented Jan 8, 2024

Same problem

@TheScalion
Copy link
Author

TheScalion commented Jan 9, 2024

i have resolve this issue by doing this.

"react-native-audio-recorder-player": "3.6.4", removed ^ sign and used this version

android/build.gradle

  • buildToolsVersion = "33.0.0"

@Saliheen
Copy link

Saliheen commented May 8, 2024

same problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants