gpt4 book ai didi

android-studio - Android Studio 2.3.3卡在Gradle Build上运行

转载 作者:行者123 更新时间:2023-12-03 05:56:02 24 4
gpt4 key购买 nike

使用android studio 2.3.3我坚持Gradle Build Running
我没有任何想法,并且不知道要弄清楚我的项目发生了什么。最近,我们要编译Zoom Login Application Sample,并仔细地从此link进行编译。

这是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]

我试图
  • 跟随此solution
  • Global Gradle Setting设置为 Offline Work
  • 没有使用solution建议的Google Play服务。
  • 不使用代理
  • org.gradle.jvmargs=-Xmx4096m -XX:MaxPermSize=1024m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8项目
  • 上添加 org.gradle.parallel=truegradle.properties
  • C:\Users\<username>\.gradle\gradle.properties上添加此行org.gradle.daemon=trueorg.gradle.parallel=true

  • 我尝试过的所有解决方案,但没有一个能很好地解决问题。这是愚蠢和荒谬的,即使我将其放置一晚也无法完成构建阶段。

    这是 project build.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
    }

    这里 module build.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\<username>\.gradle\caches上的缓存,但仍然卡在 :app:compileDebugJavaWithJavac进程上

    我想不明白。任何的想法?我错过了什么?
    谢谢。

    最佳答案

    这对我有用:

    CTRL + SHIFT + ESC->处理-> Kill java.exe ->重建

    关于android-studio - Android Studio 2.3.3卡在Gradle Build上运行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44883170/

    24 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com