siboEnglish音频修改问题总结文档

1.替换原read.js文件和proguard-rules.pro文件

2.将audio文件夹放到reactasome目录下

android/src/main/java/com/reactasome/audio

3.在MainApplication.java中加入

import com.siboEnglish.audio.RecognizerPackage;

packages.add(new RecognizerPackage());

4.修改 app/build.gradle

def enableProguardInReleaseBuilds = false

5.在android/build.gradle中两个repositories首行加入:

mavenCentral()

6.在viewpager.js加入权限申请

UNSAFE_componentWillMount() {
	PermissionsAndroid.request(PermissionsAndroid.PERMISSIONS.READ_EXTERNAL_STORAGE).then(res => {  })
	PermissionsAndroid.request(PermissionsAndroid.PERMISSIONS.RECORD_AUDIO).then(res => { })
}

7.安装第三方库react-native-ffmpeg

yarn add react-native-ffmpeg

如果项目启动时该库报错,修改该库中build.gradle,在repositories中加入:
maven { url ‘https://maven.aliyun.com/repository/google’ }
maven { url ‘https://maven.aliyun.com/repository/jcenter’ }

你可能感兴趣的:(项目二次修改文档)