Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AirWatch seems to be incompatible with Android Plugin for Gradle 3.0.0-beta1

After changing my top level build.gradle to use the Android Plugin for Gradle 3.0.0-beta3 along with Gradle 4.1, AirWatch can't read the info (like versionCode and versionName) from the APK.

// 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'
}

Is this a known issue? Any workaround?

like image 439
Juliano Nunes Silva Oliveira Avatar asked Aug 30 '17 18:08

Juliano Nunes Silva Oliveira


2 Answers

Airwatch has an issue with the new AAPT2 tool which seems to compile the Manifest.xml file in a compressed form in contrast to AAPT. AAPT2 became the standard with Android Studio 3 but you can get back easily to AAPT by putting the line

android.enableAapt2=false

in the gradle.properties file of your project. Solved at least in our project the problem.

like image 71
Nantoka Avatar answered Sep 25 '22 02:09

Nantoka


I don't have enough reputation to comment, but I just wanted to ask, if you have found out anything new about this topic, since our clients use AirWatch and we have run into a similar problem after updating gradle.

Specifically after updating from Android Studio 2 to Android Studio 3 and thus changing all gradle stuff coming with it.

like image 43
Antonio Dell Avatar answered Sep 23 '22 02:09

Antonio Dell