我正在使用Android Studio 3.1.4,Gradle 4.4。
很好,但是突然卡在“渐变构建运行”中。
没有错误消息。
我将项目文件夹复制到另一台计算机上,它可以快速而良好地构建。
我需要在我的机器上构建它。
我已经卸载了e安装了gradle和studio了一段时间,它继续卡在构建上。
有任何想法吗?
在我的机器上打印构建消息的屏幕
成功的打印屏幕建立在另一台机器上
Gradle Project
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
android {
compileSdkVersion 22
buildToolsVersion '27.0.3'
compileOptions.encoding = 'windows-1252'
dexOptions {
javaMaxHeapSize "2048M"
}
defaultConfig {
applicationId "br.com.savetyre"
minSdkVersion 16
targetSdkVersion 22
}
buildTypes {
release {
debuggable true
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-project.txt'
}
}
}
repositories {
mavenCentral()
maven { url 'https://maven.fabric.io/public' }
google()
}
dependencies {
implementation 'com.android.support:support-v4:22.1.1'
implementation 'com.android.support:appcompat-v7:22.1.1'
implementation('com.crashlytics.sdk.android:crashlytics:2.9.3@aar') {
transitive = true;
}
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
}
Gradle app
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
mavenCentral()
jcenter()
maven { url 'https://maven.fabric.io/public' }
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.4'
classpath 'io.fabric.tools:gradle:1.+'
}
}
allprojects {
repositories {
jcenter()
}
}
最佳答案
只要您将项目移至新设备,我认为只要继续进行就不会有问题
下载gradle dist,通常需要5到15分钟的时间,具体取决于互联网的连接速度。
您可以使用一些技巧来加快速度:-
关于android - Android Studio 3.1.4卡在gradle构建中运行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52207282/