qiuxiang / react-native-recording

React Native audio recording module used for DSP with Android + iOS
MIT License
110 stars 62 forks source link

Error Compiling #8

Closed navrajkambo closed 6 years ago

navrajkambo commented 6 years ago

To compile this properly, you may have to manually link the module. To do this: go to android\settings.gradle and add the lines

include ':react-native-recording'
project(':react-native-recording').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-recording/lib/android')

then go to android\app\src\main\java\com\...\MainApplication.java and add the following lines

import cn.qiuxiang.react.recording.RecordingPackage;

as an import statement, and

new RecordingPackage()

under the new MainReactPackage() line in the protected List<ReactPackage> getPackages() { method. Finally, open android\app\build.gradle and add

compile project(':react-native-recording')

inside of dependencies {, then navigate to your project directory and enter cd android && gradlew in cmd (windows).

Hope this helps someone!

navrajkambo commented 6 years ago

*edit: enter cd android && gradlew clean in cmd (windows).