2

Android Studio 3.1.3 Gradle plugin 3.1.3, no .gradle file changes in the last week. About 1 week ago I made a release APK that worked on all my devices. Today I tried to do another release. First test execution resulted in the infamous 'impossible' enum error identical to this question: Android release APK crash with java.lang.AssertionError: impossible in java.lang.Enum

I followed the first answer, rebuilt and deployed apk. At launch, it still crashed with a different exception. Message without stack trace is included below, as the trace is quite long:

android.view.InflateException: Binary XML file line #63: Binary XML file line #63: Error inflating class android.support.design.widget.TextInputEditText 
Caused by: java.lang.reflect.InvocationTargetException
at android.view.LayoutInflater.createView(LayoutInflater.java:619)

In my experience, this means class android.support.design.widget.TextInputEditText was entirely missing (at the very least, constructor). However, I found aapt_rules.txt in my build, and opened it. Contents are here on pastebin. Inside, there is keep rule for TextInputEditText constructor.

Anyone able to help why suddenly autogenerated rules were not applied? The bad APK is 0.2MB smaller than the last good APK. My build.gradle has proguard config as: proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'

androidguy
  • 3,005
  • 2
  • 27
  • 38
  • I suddenly started facing this problem. Do have resolution for this? – Swapnil Jan 09 '19 at 11:09
  • No good resolution, I stopped it from happening eventually Note I have Studio 3.2.1 and Gradle plugin 3.2.0 now... just do all the usual steps, like clean build, restart Studio, rebuild project, clean gradle cache... – androidguy Jan 11 '19 at 01:25

0 Answers0