hyochan / react-native-audio-recorder-player

react-native native module for audio recorder and player.
MIT License
709 stars 212 forks source link

Android RN 0.73.0 support #574

Closed janvandertaelen closed 9 months ago

janvandertaelen commented 10 months ago

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

Version of React Native

0.73.0

Platforms you faced the error (IOS or Android or both?)

Android

Expected behavior

Android builds successfully

Actual behavior

Steps to reproduce the behavior

./gradlew installRelease

claudiozam commented 10 months ago

Same issue RN 0.73.0.

janvandertaelen commented 10 months ago

Same issue RN 0.73.0.

I currently patched the library with npx patch-package. I modified the build.gradle file

-  kotlinOptions {
-      jvmTarget = "1.8"
+  compileOptions {
+    sourceCompatibility JavaVersion.VERSION_17
+    targetCompatibility JavaVersion.VERSION_17
   }

it works

Rossella-Mascia-Neosyn commented 9 months ago

Same issue

jadentangsjfood commented 9 months ago

Task :react-native-audio-recorder-player:compileDebugKotlin 'compileDebugJavaWithJavac' task (current target is 17) and 'compileDebugKotlin' task (current target is 1.8) jvm target compatibility should be set to the same Java version.

FAILURE: Build failed with an exception.

Same issue

System: OS: macOS 14.2.1 CPU: (8) x64 Apple M1 Memory: 26.65 MB / 16.00 GB Shell: 5.9 - /bin/zsh Binaries: Node: 16.17.0 - /usr/local/bin/node Yarn: 1.22.19 - /usr/local/bin/yarn npm: 8.15.0 - /usr/local/bin/npm Watchman: 2023.12.04.00 - /usr/local/bin/watchman Managers: CocoaPods: 1.14.2 - /Users/jaden.t/.rbenv/shims/pod SDKs: iOS SDK: Platforms: DriverKit 23.2, iOS 17.2, macOS 14.2, tvOS 17.2, watchOS 10.2 Android SDK: Android NDK: 22.1.7171670 IDEs: Android Studio: 2023.1 AI-231.9392.1.2311.11076708 Xcode: 15.1/15C65 - /usr/bin/xcodebuild Languages: Java: 11.0.21 - /usr/bin/javac npmPackages: @react-native-community/cli: Not Found react: 17.0.2 => 17.0.2 react-native: 0.67.2 => 0.67.2 react-native-macos: Not Found npmGlobalPackages: react-native: Not Found

hyochan commented 9 months ago
  • react

@jadentangsjfood Have you setup ext variable properly? Here is link to Example project. https://github.com/hyochan/react-native-audio-recorder-player/blob/a7fb3f688035c8448e8214454cf4c684db81ae55/Example/android/build.gradle#L4-L18

young-st511 commented 5 months ago

Hi, @hyochan

Even after modifying the Android build.gradle settings as described, the same issue as mentioned above occurs(Execution failed for task ':react-native-audio-recorder-player:compileDebugJavaWithJavac'.). It seems that versions of gradle prior to RN 0.73 use Java 11. Currently(I'm using RN 0.71), I am using this PR #574 reverted with patch-package.