我在我的应用程序中使用 webrtc 模块。在 iOS 中它工作正常,但在进入 android 时它显示以下错误
这是我的 build.gradle 文件:
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
dexOptions {
javaMaxHeapSize "4g"
}
defaultConfig {
multiDexEnabled true
applicationId "com.roger"
minSdkVersion 16
targetSdkVersion 22
versionCode 1
versionName "1.0"
ndk {
abiFilters "armeabi-v7a", "x86"
}
packagingOptions {
exclude "lib/arm64-v8a/libjingle_peerconnection_so.so"
}
}
signingConfigs {
release {
storeFile file(MYAPP_RELEASE_STORE_FILE)
storePassword MYAPP_RELEASE_STORE_PASSWORD
keyAlias MYAPP_RELEASE_KEY_ALIAS
keyPassword MYAPP_RELEASE_KEY_PASSWORD
}
}
splits {
abi {
reset()
enable enableSeparateBuildPerCPUArchitecture
universalApk false // If true, also generate a universal APK
include "armeabi-v7a", "x86"
}
}
buildTypes {
release {
signingConfig signingConfigs.release
minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
}
}
// applicationVariants are e.g. debug, release
applicationVariants.all { variant ->
variant.outputs.each { output ->
// For each separate APK per architecture, set a unique version code as described here:
// http://tools.android.com/tech-docs/new-build-system/user-guide/apk-splits
def versionCodes = ["armeabi-v7a":1, "x86":2]
def abi = output.getFilter(OutputFile.ABI)
if (abi != null) { // null for the universal-debug, universal-release variants
output.versionCodeOverride =
versionCodes.get(abi) * 1048576 + defaultConfig.versionCode
}
}
}
}
dependencies {
compile project(':react-native-voximplant')
compile project(':react-native-android-permissions')
compile project(':react-native-simpledialog-android')
compile project(':WebRTCModule')
compile project(':react-native-extra-dimensions-android')
compile project(':react-native-network-info')
compile project(':react-native-error-reporter')
compile project(':react-native-device-info')
compile project(':@remobile/react-native-splashscreen')
compile project(':react-native-video')
compile project(':react-native-barcodescanner')
compile project(':react-native-camera')
compile fileTree(dir: "libs", include: ["*.jar"])
compile project(':react-native-image-picker')
compile project(':react-native-push-notification')
compile ('com.google.android.gms:play-services-gcm:8.3.0') {
force = true;
}
compile project(':react-native-webview-bridge')
compile "com.android.support:multidex:1.0.0"
compile "com.android.support:appcompat-v7:23.0.1"
compile "com.facebook.react:react-native:+" // From node_modules
}