This weird logcat messages started when I switched to supportLibrary 28, not happens on 27.1.1. I tried with an empty default project and the result exactly the same.
Th
This happens when using a class that is not compatible with your minimum sdk version. The code compiles because it leaves it up to you for deployment. Try using a higher min sdk version to verify this.
Came across a similar issue and was getting the same error when trying to run any other application as well. Invalidating cache or setting "Launch Activity" to nothing did not work for me. But Running the application in a new emulator worked.
If you replace AppCompatActivity with Activity in public class MainActivity extends AppCompatActivity
, the warning will be gone as the conflict is related to AppCompat in Android X.
However, not the best solution if you need to keep the backward compatibility for older devices. Otherwise you can just ignore this warning until any fix will appear.
Well, as it appears that Google isn't interested in fixing it; I've decided to (for now) force using support library 27; at least it fixes the crashes on the few devices that support lib 28 crash on.
The fix that I'm using is adding the following into build.gradle however note, this is for a fix for android; only works for users of com.android.support libraries.
configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
def requested = details.requested
if (requested.group == "com.android.support") {
if (!requested.name.startsWith("multidex")) {
details.useVersion "27.+"
}
}
}
}