Android app wrapping troubleshooting guide

This topic covers the common issues that you might encounter during app wrapping and how to fix those issues.

Error or exception Summary Workaround
ERROR_APP_COMPLIANCE_D8 = -24 MaaS360® currently does not support wrapping apps that are compiled with the D8 dexer. Choose one of the following options to disable the D8 check:
  • Navigate to the gradle.properties file in Android Studio, set android.enableD8 to false, and then compile the app again.
  • Set the disableD8Check parameter to false in MaaS360. Note: When you disable the D8 check, you might encounter changes in the behavior of the wrapped app.
USES_64_BIT_LIBRARY_ERROR_CODE = -1 Encryption is not supported on applications that use 64-bit native (so) libraries. Remove all 64-bit libraries in the .apk file and then wrap the app again.
USES_64_BIT_LIBRARY_WITH_ANALYTICS_ERROR_CODE = -5 App analytics is not supported on applications that use 64-bit native (so) libraries. Disable app analytics and then wrap the app again. To disable app analytics:
  1. Log into the MaaS360 Portal and then navigate to Apps > Catalog > Add > Android > Enterprise App for Android > Wrapping and Signing workflow.
  2. Clear the Enable App Analytics option.
USES_SQLCIPHER_ANALYTICS_ERROR_CODE = -8 App analytics is not supported on the applications that use SQLCipher version 2.x and 3.x for encryption. Use SQLCipher versions later than 3.x, and then wrap the app again.
ERROR_OCCURRED_WHILE_GENERATING_SPLIT_DEX_CLASSES = -21 MaaS360 throws an exception if the app contains numerous libraries. MaaS360 supports features such as split dex and multidex to overcome such scenarios, but an exception is triggered when the number of referenced class files in the DEX files exceeds the allowed limit despite partitioning the DEX files. Use the packagesToRemove parameter in the MaaS360 Portal to remove certain packages from the final APK file such as support libraries and unnecessary play services. Example: packagesToRemove=com.sun,com.apple
ClassNotFoundException, NoClassDefFoundError When the Retrofit library is used, the responseBodyConverter method in the library throws these exceptions. Set the protectRetrofitMethod=true to avoid the exception.

Troubleshooting

If the gateway does not work, then ensure that ProGuard is not applied to the OkHttp3 library.