hyochan / react-native-audio-recorder-player

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

Integration error: app build failed #594

Open crazyu opened 4 months ago

crazyu commented 4 months ago

Error:mainApplication.java import com.dooboolab.audiorecorderplayer.RNAudioRecorderPlayerPackage; && packages.add(new RNAudioRecorderPlayerPackage()); throw Errror if don not add code. the app can build sucessful, but use AudioRecorderPlayer throw Errow , Exception is call Js Function

{ "name": "XXXXX", "version": "0.0.1", "private": true, "scripts": { "android": "react-native run-android", "ios": "react-native run-ios", "lint": "eslint .", "start": "react-native start", "test": "jest" }, "dependencies": { "@react-native-async-storage/async-storage": "^1.19.0", "@react-navigation/bottom-tabs": "^6.5.8", "@react-navigation/native": "^6.1.7", "@react-navigation/native-stack": "^6.9.13", "@rematch/core": "^2.2.0", "axios": "^1.4.0", "dayjs": "^1.11.9", "lodash.debounce": "^4.0.8", "lodash.throttle": "^4.1.1", "react": "18.2.0", "react-native": "0.72.3", "react-native-animatable": "^1.3.3", "react-native-audio-recorder-player": "^3.6.6", "react-native-blob-util": "^0.19.1", "react-native-calendars": "^1.1300.0", "react-native-device-info": "^10.11.0", "react-native-exit-app": "^2.0.0", "react-native-gesture-handler": "^2.12.0", "react-native-image-picker": "^5.6.0", "react-native-image-zoom-viewer": "^3.0.1", "react-native-loading-spinner-overlay": "^3.0.1", "react-native-modal": "^13.0.1", "react-native-pdf": "^6.7.1", "react-native-permissions": "^4.1.4", "react-native-safe-area-context": "^4.7.1", "react-native-screens": "^3.22.1", "react-native-tim-js": "^0.1.27", "react-native-toast-message": "^2.1.6", "react-native-websocket": "^1.0.2", "react-native-webview": "^12.4.0", "react-native-wechat-lib": "^1.1.27", "react-redux": "^8.1.1", "redux": "^4.2.1", "rn-fetch-blob": "^0.12.0", "sm-crypto": "^0.3.12", "trtc-react-native": "^2.4.1" }, "devDependencies": { "@babel/core": "^7.20.0", "@babel/preset-env": "^7.20.0", "@babel/runtime": "^7.20.0", "@react-native/eslint-config": "^0.72.2", "@react-native/metro-config": "^0.72.9", "@tsconfig/react-native": "^3.0.0", "@types/react": "^18.0.24", "@types/react-test-renderer": "^18.0.0", "babel-jest": "^29.2.1", "eslint": "^8.19.0", "jest": "^29.2.1", "metro-react-native-babel-preset": "0.76.7", "prettier": "^2.4.1", "react-test-renderer": "18.2.0", "typescript": "4.8.4" }, "engines": { "node": ">=16" } }

IMG_9182 2

IMG_9185

puniker commented 4 days ago

For Android, Step 1 can be removed and Step 3 should use implementation and not compile. Compile has been removed from gradle.

Insert the following lines inside the dependencies block in android/app/build.gradle:

  implementation project(':react-native-audio-recorder-player')