windows powershell中的建筑。已经尝试过java version 8和gradle更新
./gradlew build.gradle对使用Java7运行Gradle的支持已被废弃,并计划在Gradle 5.0中删除。有关更多细节,请参见compilation。
失败:生成失败,异常。
下面是控制台中显示错误的build.gradle文件,即
组装/build.gradle
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.+'
}
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
repositories {
maven { url 'https://maven.fabric.io/public' }
maven {
url "http://dl.bintray.com/glomadrian/maven"
}
maven {
url "https://repo.eclipse.org/content/repositories/paho-releases/"
}
google()
}
android {
compileSdkVersion project.ext.compileSdkVersion
lintOptions {
disable 'MissingTranslation'
}
/*splits {
abi {
enable true
reset()
include 'x86', 'armeabi-v7a'
universalApk true
}
}*/
dataBinding {
enabled = true
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES.txt'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/notice.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/dependencies.txt'
exclude 'META-INF/LGPL2.1'
}
defaultConfig {
applicationId "kettle.android_phase3"
minSdkVersion project.ext.minSdkVersion
targetSdkVersion project.ext.targetSdkVersion
versionCode 4
versionName "1.0"
multiDexEnabled true
vectorDrawables.useSupportLibrary = true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
resValue "string", "app_name", "Assembly screen v2 app"
}
debug {
debuggable true
applicationIdSuffix '.debug'
versionNameSuffix '-DEBUG'
resValue "string", "app_name", "Assembly screen app v2 debug"
}
}
lintOptions {
abortOnError false
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
buildToolsVersion project.ext.buildToolsVersion
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile project(':common')
compile project(':printer')
compile('com.crashlytics.sdk.android:crashlytics:2.6.2@aar') {
transitive = true;
}
compile 'testfairy:testfairy-android-sdk:1.+@aar'
compile 'com.android.support:cardview-v7:25.3.1'
compile 'com.android.support:recyclerview-v7:25.3.1'
compile('io.socket:socket.io-client:0.8.3') {
// excluding org.json which is provided by Android
exclude group: 'org.json', module: 'json'
}
compile 'com.github.castorflex.smoothprogressbar:library:1.1.0'
compile 'pub.devrel:easypermissions:1.1.3'
}如您所见,在第10行抛出错误。
:apply plugin'com.android.application'等级-包装。属性:-
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip发布于 2018-05-02 15:23:22
看起来你并没有在build.gradle文件中引用gradle
我希望看到下面列出的依赖项
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
}
}使用适当的gradle版本
https://stackoverflow.com/questions/50113340
复制相似问题