Android studio Android Studio 2.3.3在Gradle构建运行时遇到了问题
使用android studio 2.3.3,我一直坚持运行Android studio Android Studio 2.3.3在Gradle构建运行时遇到了问题,android-studio,gradle,android-gradle-plugin,build.gradle,Android Studio,Gradle,Android Gradle Plugin,Build.gradle,使用android studio 2.3.3,我一直坚持运行Gradle Build。 我不知道我的项目到底发生了什么,我失去了理智。最近,我们想编译Zoom登录应用程序示例,并在此基础上仔细编写 以下是Android Studio版本: Android Studio 2.3.3 Build #AI-162.4069837, built on June 6, 2017 JRE: 1.8.0_31-b13 x86 JVM: Java HotSpot(TM) Server VM by Oracle
Gradle Build
。
我不知道我的项目到底发生了什么,我失去了理智。最近,我们想编译Zoom登录应用程序示例
,并在此基础上仔细编写
以下是Android Studio版本:
Android Studio 2.3.3
Build #AI-162.4069837, built on June 6, 2017
JRE: 1.8.0_31-b13 x86
JVM: Java HotSpot(TM) Server VM by Oracle Corporation
在事件日志中,Grade似乎在努力完成此任务
Executing tasks: [:app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:mockableAndroidJar, :app:prepareDebugUnitTestDependencies]
我已经试过了
Global Gradle Setting
设置为Offline Work
,然后执行以下操作gradle.properties
项目中添加org.gradle.jvmargs=-Xmx4096m-XX:MaxPermSize=1024m-XX:+heapdumponautofmemoryerror-Dfile.encoding=UTF-8
和org.gradle.parallel=true
C:\Users\\\.gradle\gradle.properties
上添加此行org.gradle.daemon=true
和org.gradle.parallel=true
项目构建。gradle
:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
maven {
url 'https://maven.facialnetwork.com/maven2'
credentials {
username '***'
password '***'
}
authentication {
basic(BasicAuthentication)
}
}
// Reference local .aar file if it doesn't exist in maven
flatDir{ dirs '../../../' }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
在这里模块构建.gradle
buildscript {
}
apply plugin: 'com.android.application'
android {
if (project.hasProperty("zoom_keystore")) {
signingConfigs {
release {
storeFile file(zoom_keystore)
storePassword zoom_keystore_password
keyAlias zoom_key_alias
keyPassword zoom_key_password
}
}
}
compileSdkVersion 25
buildToolsVersion '25.0.3'
defaultConfig {
applicationId "com.facetec.zoom.sampleapp"
minSdkVersion 18
targetSdkVersion 25
versionCode 1
versionName "1.0"
buildConfigField("String", "ZOOM_APP_TOKEN", System.getProperty("zoom_app_token", "\"\""))
resConfigs "en"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
if (signingConfigs.hasProperty('release')) {
signingConfig signingConfigs.release
}
}
debug {
debuggable true
jniDebuggable true
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
}
dependencies {
compile 'com.android.support:appcompat-v7:25.+'
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.facetec:zoom-authentication:5.1.1@aar'
compile project(':zoom-authentication-5.1.1')
}
尝试从gradlew命令行gradlew-d assembleDebug
生成后,
我得到了这个日志,也许可以帮助识别我的问题:
09:08:19.942 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Lock
acquired.
09:08:19.942 [DEBUG] [org.gradle.cache.internal.DefaultFileLockManager] Relea
sing lock on daemon addresses registry.
> Building 62% > :app:compileDebugJavaWithJavac
它的任务被卡住了:app:compileDebugJavaWithJavac
我试图删除C:\Users\\\.gradle\caches
上的缓存,但仍然挂起:app:compileDebugJavaWithJavac
进程
我想不出来。有什么想法吗?我错过了什么?
谢谢。这对我很有用:
CTRL+SHIFT+ESC->Process->Killjava.exe->Rebuild我也面临这个问题 我真的很累,因为我连续3天找到了这个解决方案 然后我在gradle控制台中显示。其中显示错误:C:\Users\khimsuriya\AppData\Local\Android\sdk\build tools\29.0.3->“aapt”未启动。 因此,我将“构建工具版本”更改为26.0.3,错误已经完成。 因此,您尝试在build.gradle(应用程序级别)中更改“构建工具版本”。它仍在继续,但您仍能找到完美的“strong文本构建工具版本” 这是100%的工作
我的号码.9725414329尝试从命令行构建项目。如果它也挂起,请添加
-d
,以查看可能挂起的位置到底发生了什么。如果您自己无法解释,您可能会发布结果供帮助人员查看。@Vampile尝试从命令行构建。我已经更新了我的问题。似乎它卡在了进程:app:compileDebugJavaWithJavac
。有什么想法吗?试着删除/.gradle
。但我怀疑这会有帮助。没有其他想法,对不起。