首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >Jenkins: Gradle Build: AAPT2问题:windows AAPT2 -3.4.0-5326820-AAPT2守护程序#0:守护程序启动失败

Jenkins: Gradle Build: AAPT2问题:windows AAPT2 -3.4.0-5326820-AAPT2守护程序#0:守护程序启动失败
EN

Stack Overflow用户
提问于 2019-05-16 03:27:46
回答 1查看 944关注 0票数 2

我正在尝试从Jenkins进行持续集成。我在build部分提到过命令'Clean‘和'assemble’。但由于AAPT2问题,构建失败。Gradle版本:'com.android.tools.build:gradle:3.4.1‘注意:对于同一个项目,同样的'assemble’命令在Android studio和command Line中都运行得很好。

代码语言:javascript
运行
复制
I have tried: 
1. Downgraded gradle version.
2. Downgrading compiledSDKversion to 26
3. Making AAPT2 indicator in gralde.properties file = False
4. Tried searching on google and stackoverflow, but still issue exists.

JENKINS日志:

代码语言:javascript
运行
复制
14:52:16 > Task :app:mergeCobraDebugResources FAILED
14:52:16 
14:52:16 FAILURE: Build failed with an exception.
14:52:16 
14:52:16 * What went wrong:
14:52:16 Execution failed for task ':app:mergeCobraDebugResources'.
14:52:16 > 8 exceptions were raised by workers:
14:52:16   com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.4.0-5326820-windows Daemon #0: Daemon startup failed
14:52:16   This should not happen under normal circumstances, please file an issue if it does.
14:52:16   com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.4.0-5326820-windows Daemon #1: Daemon startup failed
14:52:16   This should not happen under normal circumstances, please file an issue if it does.
14:52:16   com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.4.0-5326820-windows Daemon #2: Daemon startup failed
14:52:16   This should not happen under normal circumstances, please file an issue if it does.
14:52:16   com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.4.0-5326820-windows Daemon #3: Daemon startup failed
14:52:16   This should not happen under normal circumstances, please file an issue if it does.
14:52:16   com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.4.0-5326820-windows Daemon #4: Daemon startup failed
14:52:16   This should not happen under normal circumstances, please file an issue if it does.
14:52:16   com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.4.0-5326820-windows Daemon #5: Daemon startup failed
14:52:16   This should not happen under normal circumstances, please file an issue if it does.
14:52:16   com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.4.0-5326820-windows Daemon #6: Daemon startup failed
14:52:16   This should not happen under normal circumstances, please file an issue if it does.
14:52:16   com.android.builder.internal.aapt.v2.Aapt2InternalException: AAPT2 aapt2-3.4.0-5326820-windows Daemon #7: Daemon startup failed
14:52:16   This should not happen under normal circumstances, please file an issue if it does.
14:52:16 
14:52:16 
14:52:16 * Try:
14:52:16 Run with --info or --debug option to get more log output. Run with --scan to get full insights.
14:52:16 

GRADLE文件(项目级)

代码语言:javascript
运行
复制
import org.apache.tools.ant.taskdefs.condition.Os

apply plugin: 'com.android.application'

android {
    signingConfigs {
        lookitRelease {
            keyAlias LOOKIT_RELEASE_KEY_ALIAS
            keyPassword LOOKIT_RELEASE_KEY_PASSWORD
            if (Os.isFamily(Os.FAMILY_WINDOWS)) {
                storeFile file(LOOKIT_RELEASE_STORE_FILE)
            } else if (Os.isFamily(Os.FAMILY_MAC)) {
                storeFile file(LOOKIT_RELEASE_STORE_FILE_MAC)
            }
            storePassword LOOKIT_RELEASE_KEY_PASSWORD
        }
    }
    Properties versionProps = new Properties()
    def versionPropsFile = file('version.properties')
    if (versionPropsFile.exists())
        versionProps.load(new FileInputStream(versionPropsFile))
    def code = (versionProps['VERSION_CODE'] ?: "0").toInteger() + 1
    versionProps['VERSION_CODE'] = code.toString()
    versionProps.store(versionPropsFile.newWriter(), null)
    compileSdkVersion 28
    defaultConfig {
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

        applicationId "com.lightwave.lwRvCam"
        minSdkVersion 21
        targetSdkVersion 27
        versionCode code
        versionName "2.25.7." + code
    }
    flavorDimensions "default"
    productFlavors {

    }
    sourceSets {

    }
    buildTypes {
        release {
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
        debug {
            debuggable true
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

}

dependencies {
    implementation 'com.android.support.constraint:constraint-layout:1.1.0'
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation project(':LwRvcLib-release')
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
    //noinspection GradleCompatible
    implementation 'com.android.support:appcompat-v7:27.1.1'
    implementation 'com.android.support:support-media-compat:28.0.0'
    implementation 'com.android.support:support-v4:28.0.0'



    implementation 'com.android.support:design:28.0.0'
    implementation 'com.android.support:percent:28.0.0'
    implementation 'com.github.johnpersano:supertoasts:1.3.4@aar'
    implementation 'com.google.code.gson:gson:2.8.5'
    implementation 'com.google.android.gms:play-services-analytics:15.0.0'
    implementation 'com.google.android.gms:play-services-measurement-base:15.0.0'
    implementation 'com.github.castorflex.verticalviewpager:library:19.0.1'
    implementation 'com.google.firebase:firebase-core:15.0.0'
    implementation 'com.google.android.gms:play-services-maps:15.0.0'
    implementation 'com.cleveroad:slidingtutorial:1.0.9'
    implementation 'com.daimajia.swipelayout:library:1.2.0@aar'
    //androidTestImplementation 'com.android.support:support-annotations:27.1.1'
    //    androidTestImplementation 'com.android.support.test:runner:1.0.1'
    //    androidTestImplementation 'com.android.support.test:rules:1.0.1'
    androidTestImplementation 'org.hamcrest:hamcrest-library:2.1'
    // androidTestImplementation 'com.android.support.test.uiautomator:uiautomator-v18:2.1.3'
    //    androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2') {
    //        exclude group: 'javax.inject'
    //    }
    ///////////////////////////////////////Androidx Dependencies/////////////////////////
    // Core library
    androidTestImplementation 'androidx.test:core:1.0.0'
    // AndroidJUnitRunner and JUnit Rules
    androidTestImplementation 'androidx.test:runner:1.1.0'
    androidTestImplementation 'androidx.test:rules:1.1.0'
    // Assertions
    androidTestImplementation 'androidx.test.ext:junit:1.0.0'
    androidTestImplementation 'androidx.test.ext:truth:1.0.0'
    androidTestImplementation 'com.google.truth:truth:0.44'
    // Espresso dependencies
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
    androidTestImplementation 'androidx.test.espresso:espresso-contrib:3.1.0'
    androidTestImplementation 'androidx.test.espresso:espresso-intents:3.1.0'
    androidTestImplementation 'androidx.test.espresso:espresso-accessibility:3.1.0'
    androidTestImplementation 'androidx.test.espresso:espresso-web:3.1.0'
    androidTestImplementation 'androidx.test.espresso.idling:idling-concurrent:3.1.0'
    androidTestImplementation 'androidx.test.espresso:espresso-web:3.1.0'
    androidTestImplementation 'androidx.test.uiautomator:uiautomator:2.2.0'
    // The following Espresso dependency can be either "implementation"
    // or "androidTestImplementation", depending on whether you want the
    // dependency to appear on your APK's compile classpath or the test APK
    // classpath.
    androidTestImplementation 'androidx.test.espresso:espresso-idling-resource:3.1.0'
    /////////////////////////////////////////////////////////////////////////////////////////////////////
    androidTestImplementation 'junit:junit:4.13-beta-2'
    testImplementation 'junit:junit:4.13-beta-2'
    allprojects {
        repositories {
            jcenter()
            google()
        }
    }
}

if (hasProperty('buildScan')) {
    buildScan {
        termsOfServiceUrl = 'https://gradle.com/terms-of-service'
        termsOfServiceAgree = 'yes'
    }
}

apply plugin: 'com.google.gms.google-services'

GRADLE文件(应用程序级别):

代码语言:javascript
运行
复制
ext {
    var = '28.0.3'
    var1 = '28.0.3'
    var2 = '26.1.1-alpha1'
}
buildscript{
    repositories {
        maven { url 'https://maven.google.com' }
        jcenter()
        google()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.4.1'
        classpath 'com.google.gms:google-services:3.2.0'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}



allprojects {
    repositories {
        maven { url 'https://maven.google.com' }
        jcenter()
    }

}


if (hasProperty('buildScan')) {
    buildScan {
        termsOfServiceUrl = 'https://gradle.com/terms-of-service'
        termsOfServiceAgree = 'yes'
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

GRADLE问题日志:

代码语言:javascript
运行
复制
Have raised issue in gradle with text: AAPT2 issues: Daemon startup failed

谷歌问题跟踪器:

代码语言:javascript
运行
复制
https://issuetracker.google.com/132686257 AAPT2 issues. Gradle version : 3.4.0 Android studio version : 3.4. Android SDK tools: 26.1.1
EN

回答 1

Stack Overflow用户

发布于 2019-09-06 00:20:08

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/56156392

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档