Closed ragnar2014 closed 1 year ago
If you're using AGP 4.2+, this is likely a duplicate of #117. Please try the android.enableResourceOptimizations=false
workaround mentioned there. I'm going to close this as a dup, but please feel free to re-open if that workaround doesn't work.
I am trying to implement Intune SDK to an existing LOB-app and Azure seems to accept my debug-apk as MAM-handled but not my release-apk. I am not super familiar with Android studio but from what I can tell my build.gradle looks correct. I also consider that perhaps the code I added perhaps needs to be written differently in order for the release apk to work but I wanted to rule out the simplest errors if possible first. I am happy if anyone could point in me in any direction as what to troubleshoot.
I downloaded and built this project https://github.com/msintuneappsdk/Taskr-Sample-Intune-Android-App and pointed Azure to the release-apk and it says MAM-handled and I haven't registrered that app in Azure. Anyone know how this checks is done without actually uploading the file just pointing it out in Azure?
This is my build.gradle apply plugin: 'com.android.application' apply plugin: 'com.microsoft.intune.mam'
def versionMajor = 22 def versionMinor = 1 def versionPatch = 999 def versionBuild = 7
android { signingConfigs { debug { storeFile file('.jks') storePassword '**' keyAlias '*' keyPassword '**' } config { keyAlias '' keyPassword '' storeFile file('.jks') storePassword '' } } compileSdkVersion 31 defaultConfig { applicationId "a.client" minSdkVersion 18 targetSdkVersion 31 multiDexEnabled true compileOptions { sourceCompatibility JavaVersion.VERSION_1_7 targetCompatibility JavaVersion.VERSION_1_7 } versionCode versionMajor 10000 + versionMinor 1000 + versionPatch * 100 + versionBuild versionName "${versionMajor}.${versionMinor}.${versionPatch}.${versionBuild}" manifestPlaceholders = [ 'appAuthRedirectScheme': 'com.onmicrosoft.demo.exampleapp' ] } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' signingConfig signingConfigs.config } } lintOptions { checkReleaseBuilds false } productFlavors { } compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } }
dependencies { implementation 'androidx.constraintlayout:constraintlayout:2.1.0' implementation files('libs/IntermecDataCollection.jar') implementation project(':HoneywellDataCollection') implementation 'androidx.legacy:legacy-support-v4:1.0.0' implementation 'org.apache.commons:commons-text:1.6' implementation 'de.proglove:connect-sdk:1.5.0' implementation 'net.openid:appauth:0.8.1' implementation 'com.squareup.okio:okio:2.10.0'
}