I migrated my app to androidx, and now in the released version, I'm getting that error. It works fine in all my tests, even the test lab doesn't find that error.
I've checked through every reference for it and they're all fine.
The line with the error:
private MaterialButton mShiftStartDate;
private void getVars() {
.
mShiftStartDate = v.findViewById(R.id.shift_start_date_tv);
.
}
and the xml:
<com.google.android.material.button.MaterialButton
style="@style/Widget.MaterialComponents.Button.OutlinedButton"
android:id="@id/shift_start_date_tv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:textSize="18sp"
android:visibility="visible"
app:layout_constraintEnd_toEndOf="@id/shift_start_date_label"
app:layout_constraintHorizontal_chainStyle="spread_inside"
app:layout_constraintStart_toStartOf="@id/shift_start_date_label"
app:layout_constraintTop_toBottomOf="@id/shift_start_date_label"
tools:text="10/10/18" />
and parts of build.gradle
defaultConfig {
applicationId appId
targetSdkVersion 28
minSdkVersion 19
versionCode buildCode
versionName versionMajor+"."+versionMinor+"."+versionRevision+"."+versionBuild
resValue "string", "CURRENT_VERSION", versionName
}
compileOptions {
sourceCompatibility 1.8
targetCompatibility 1.8
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.appcompat:appcompat:1.1.0-alpha03'
implementation 'com.google.android.material:material:1.1.0-alpha04'
implementation 'androidx.recyclerview:recyclerview:1.1.0-alpha03'
implementation 'androidx.browser:browser:1.0.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-alpha3'
implementation 'androidx.preference:preference:1.1.0-alpha04'
implementation 'androidx.annotation:annotation:1.1.0-alpha02'
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'android.arch.navigation:navigation-fragment:1.0.0'
implementation 'android.arch.navigation:navigation-ui:1.0.0'
implementation 'com.google.android.gms:play-services-ads-lite:17.2.0'
implementation 'com.google.android.gms:play-services-oss-licenses:16.0.2'
implementation 'org.jetbrains:annotations:17.0.0'
}
Searching for it doesn't turn up any other examples of the problem. The only thing I can think of is proguard is renaming something it shouldn't. Since I can't manage to reproduce it (It's only happened to 5 users, but 26 times for them in all) in any emulator or using test devices, I can't test something like
-keep class androidx.appcompat.widget.** {*;}
which is all I can think to do.