最初,一切正常,我试图更新 build:gradle 和 SDK 版本
我在构建项目时得到以下信息
Gradle sync failed: More than one variant of project :react-native-fetch-blob matches the consumer attributes:
- Configuration ':react-native-fetch-blob:debugApiElements' variant android-aidl:
- Found artifactType 'android-aidl' but wasn't required.
- Required com.android.build.api.attributes.BuildTypeAttr 'debug' and found compatible value 'debug'.
- Found com.android.build.api.attributes.VariantAttr 'debug' but wasn't required.
- Required com.android.build.gradle.internal.dependency.AndroidTypeAttr 'Aar' and found compatible value 'Aar'.
- Required org.gradle.usage 'java-api' and found compatible value 'java-api'.
- Configuration ':react-native-fetch-blob:debugApiElements' variant android-classes:
- Found artifactType 'android-classes' but wasn't required.
- Required com.android.build.api.attributes.BuildTypeAttr 'debug' and found compatible value 'debug'.
- Found com.android.build.api.attributes.VariantAttr 'debug' but wa... (show balloon)
下面是 react-native-fetch-blob 的 build.gradlew 文件
apply plugin: 'com.android.library'
repositories {
mavenCentral()
}
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
}
}
android {
compileSdkVersion 26
buildToolsVersion "26.0.2"
defaultConfig {
minSdkVersion 16
targetSdkVersion 26
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
productFlavors {
}
}
dependencies {
compile 'com.facebook.react:react-native:+'
//{RNFetchBlob_PRE_0.28_DEPDENDENCY}
}
我不知道是怎么回事
期待非常需要帮助
谢谢你