microsoftconnect / intune-app-wrapping-tool-android

Use the Intune App Wrapping Tool for Android to enable Android apps to be managed by Microsoft Intune
28 stars 11 forks source link

Failure to cast causes app crash on launch #28

Closed jonphillips closed 5 years ago

jonphillips commented 5 years ago

After wrapping our Android app with Intune, we get the following error on launch: com.microsoft.intune.mam.client.widget.MAMAppCompatEditText cannot be cast to android.support.v7.widget.AppCompatEditText

We believe that Intune is replacing the android.support.v7.widget.AppCompatEditText class reference in the layout files without changing the references in the Java code. It also appears that the Intune class does not subclass the Android support class leading to the java.lang.ClassCastException

This app functions perfectly before wrapping, can be downloaded and run from the Play store, etc. Is there a way to address this that does not involve changing the code?

rygo-msft commented 5 years ago

@jonphillips can you please collect diagnostic logs and share the incident ID so that we can investigate further? Information for sending logs can be found here https://docs.microsoft.com/en-us/intune-user-help/send-logs-to-microsoft-android

jonphillips commented 5 years ago

Thanks so much @rygo-msft. We have uploaded the logs and received the incident ID WYDRZ8U2. Please let me know if you have any other questions.

rygo-msft commented 5 years ago

We have a fix for this that is planned to rollout in the next regular Company Portal release which is expected to be fully rolled out around mid-June. As this is a fix in the Company Portal, you do not need to re-wrap.

There is also a work around, but it would require changing app code to cast to one of the standard Android classes (ie EditText or TextView) rather than AppCompatEditText.

jonphillips commented 5 years ago

Thanks so much @rygo-msft! Yes, we're hoping to avoid changing the app code as that feels like a bit of a whack-a-mole problem. Many thanks for the attention on this.

rygo-msft commented 5 years ago

Hi @jonphillips, the Company Portal has fully rolled out with the fix. If you update to version 5.0.4443.0 of the Company Portal, the issue should be resolved.