AirWatch似乎与Gradle 3.0.0-beta1的Android插件不兼容

Jul*_*ira 6 android-gradle-plugin airwatch

更改我的顶级build.gradle后使用Android Plugin for Gradle 3.0.0-beta3with Gradle 4.1,AirWatch无法从APK中读取信息(如versionCode和versionName).

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {

    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.0.0-beta3'


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

allprojects {
    repositories {
        google()
        jcenter()
    }
}

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

ext {
    roomVersion = '1.0.0-alpha9'
    supportLibVersion = '26.0.1'
}
Run Code Online (Sandbox Code Playgroud)

这是一个已知的问题?任何解决方法?

Nan*_*oka 8

Airwatch与新的AAPT2工具存在问题,与AAPT相比,它似乎以压缩形式编译Manifest.xml文件.AAPT2成为Android Studio 3的标准,但你可以通过放置线路轻松回到AAPT

android.enableAapt2=false
Run Code Online (Sandbox Code Playgroud)

在项目的gradle.properties文件中.至少解决了我们项目中的问题.


Ant*_*ell 1

我没有足够的声誉来发表评论,但我只是想问一下,您是否发现了有关此主题的任何新内容,因为我们的客户使用 AirWatch,并且我们在更新 gradle 后遇到了类似的问题。

特别是从 Android Studio 2 更新到 Android Studio 3 并因此更改了随之而来的所有 gradle 内容之后。