Below I'm listing possible solutions,
try this steps one by one:
1 Delete app on device and Clean Project
2 Disable minifyEnabled in debug mode
go to build.gradle(Module: app) in debug block and disable minifyEnabled:
buildTypes {
debug {
minifyEnabled false
}
}
3 Setting dataBinding to true in application's gradle file
In my case, I was including another layout
<include layout="@layout/attached_layout" />
to my activity's layout and this solved it.
android {
...
...
...
dataBinding {
enabled = true
}
}
4 Check the relative path of your activities in manifest
eg:
<activity android:name="com.pathToClass.MyActivity"
7 Disable Instant Run
Go to File -> Settings -> Build,Execution, Deployment -> Instant Run -> Uncheck the checkbox for instant run
8 Try MultiDexApplication
Add this to build.gradle(Module:app)
android {
defaultConfig {
...
multiDexEnabled true
}
dependencies {
...
implementation 'androidx.multidex:multidex:2.0.1'
}
}
if you are using application class you have to extend it with MultiDexApplication
instead of Application
and add it to AndroidManifest.xml
<application
android:name="com.myPackageName.MyApplication"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name">
else add MultiDexApplication
class path from library as name
<application
android:name="androidx.multidex.MultiDexApplication"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name">
Looks like the class is loaded by reflection, but your proguard file doesn't prevent that class from being obfuscated
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…