我跑步时
gradlew构建--refresh-dependencies
我收到类似错误
任务':react-native-fcm:lint'的执行失败。
当我看到lint-results.html时,我得到了类似的错误
../../ build.gradle:所有com.android.support库必须使用完全相同的版本规范(混合版本可能导致运行时崩溃)。找到版本26.1.0,23.4.0。示例包括com.android.support:support-compat:26.1.0和com.android.support:animated-vector-drawable:23.4.0 ../../build.gradle:所有gms / firebase库必须使用完全相同的版本规范(混合版本可能导致运行时崩溃)。找到版本17.3.4、17.0.4、17.0.1、16.2.4、16.0.6、16.0.5、16.0.4、16.0.3、16.0.1、16.0.0。示例包括com.google.firebase:firebase-messaging:17.3.4和com.google.firebase:firebase-iid:17.0.4
我的build.gradle看起来像这样
应用插件:“ com.android.application”
import com.android.build.OutputFile
project.ext.react = [
entryFile: "index.js",
entryFileforesatte: "index.foresatte.js",
bundleInRelease: true,
bundleInelevRelease: true,
bundleInforesatteRelease: true
]
apply from: "../flavored-react.gradle"
apply from: "../../node_modules/react-native-code-push/android/codepush.gradle"
def enableProguardInReleaseBuilds = false
android {
lintOptions {
abortOnError false
}
compileSdkVersion 27
flavorDimensions "default"
buildToolsVersion '27.0.3'
defaultConfig {
applicationId "com.osloskolen"
minSdkVersion 16
targetSdkVersion 26
versionCode 28
versionName "1.28.0"
multiDexEnabled true
ndk {
abiFilters "armeabi-v7a", "x86"
}
}
splits {
abi {
reset()
enable enableSeparateBuildPerCPUArchitecture
universalApk false // If true, also generate a universal APK
include "armeabi-v7a", "x86"
}
}
productFlavors {
elev {
minSdkVersion 16
applicationId ''
targetSdkVersion 22
}
foresatte {
minSdkVersion 16
applicationId ''
targetSdkVersion 22
}
}
signingConfigs {
release {
if (project.hasProperty('OSLOSKOLEN_RELEASE_STORE_FILE')) {
storeFile rootProject.file(OSLOSKOLEN_RELEASE_STORE_FILE)
storePassword OSLOSKOLEN_RELEASE_STORE_PASSWORD
keyAlias OSLOSKOLEN_RELEASE_KEY_ALIAS
keyPassword OSLOSKOLEN_RELEASE_KEY_PASSWORD
}
}
}
buildTypes {
debug {
buildConfigField "String", "CODEPUSH_KEY", ''
manifestPlaceholders = [excludeSystemAlertWindowPermission: "false"]
}
/*releaseStaging {
minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
signingConfig signingConfigs.release
buildConfigField "String", "CODEPUSH_KEY", ''
}*/
release {
minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
signingConfig signingConfigs.release
manifestPlaceholders = [excludeSystemAlertWindowPermission: "true"]
//buildConfigField "String", "CODEPUSH_KEY", ''
}
}
// 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-code-push')
compile project(':react-native-vector-icons')
compile project(':react-native-sound')
compile project(':react-native-fs')
compile project(':react-native-fcm')
compile 'com.google.firebase:firebase-core:16.0.0'
compile project(':react-native-document-picker')
compile project(':react-native-doc-viewer')
compile project(':react-native-splash-screen')
compile project(':appcenter-crashes')
compile project(':appcenter-analytics')
compile project(':appcenter')
compile project(':react-native-code-push')
compile fileTree(dir: "libs", include: ["*.jar"])
compile "com.android.support:appcompat-v7:23.0.1"
compile "com.facebook.react:react-native:+" // From node_modules
}
// Run this once to be able to run the application with BUCK
// puts all compile dependencies into folder libs for BUCK to use
task copyDownloadableDepsToLibs(type: Copy) {
from configurations.compile
into 'libs'
}
apply plugin: 'com.google.gms.google-services'
我不确定问题出在哪里。我已添加
lintOptions {
abortOnError false
}
但仍然出现此错误。我想解决这个错误。有见识吗?