-
Notifications
You must be signed in to change notification settings - Fork 953
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ClassNotFoundException : OnUnhandledKeyEventListener #146
Comments
fixed by:
|
The answer from @tianzhijiexian didn't work for me. I got a similar error using androidx: I/art: Rejecting re-init on previously-failed class java.lang.Class<androidx.core.view.ViewCompat$OnUnhandledKeyEventListenerWrapper>: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/view/View$OnUnhandledKeyEventListener; |
Any idea? |
https://gist.github.com/tianzhijiexian/2853c097762a203cd1d024c1f846dcc3 @leoemili try this gist? |
Here I see the same that you've posted before. I'm talking of configurations.all { ... }. |
I have same problem. Is anybody resolve problem? |
it worked for me, thanks!.
|
It works for me! Thanks! |
In case you're using configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
def requested = details.requested
if (requested.group == "androidx") {
if (!requested.name.startsWith("multidex")) {
details.useVersion "${targetSdk}.+"
}
}
}
} |
Solution found here: facebook/flipper#146
after this warning appears the google material design style won't apply on MaterialCardView!! any suggestions how to fix it and why this happening? |
Where to put the code? |
@stonyz put in your (Module) build.gradle file (drop it in the end after |
@stonyz/@FireZenk if (requested.group == "androidx") { Also, your code specifies details.useVersion "${targetSdk}.+" when it should be details.useVersion "${targetSdkVersion}.+" But that won't work either since none of the androidx artifacts use the targetSdkVersion.
Even if this code worked, it's a really bad idea to override every version. gradle code to dump androidx dependencies in format: path group : artifact : version List<String> lst = new ArrayList<String>()
configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
def requested = details.requested
if (requested.group.startsWith("androidx.")) {
lst.add(getPath() + "\t" +requested.group + ":" + requested.name + ":" + requested.version)
}
}
if (lst.size) { Collections.sort(lst); System.out.println(lst.join("\n")) }
} Example output:
|
Still won't do |
Still won't do |
That's my point. There is no fix for androidx, |
there is no fix its just an informational message. Should not be crashing the app. |
This is stupid beyond reason, updated studio, updated gradle, I have the latest everything still happens? Wtf?! I have video layout in main launch activity that's reporting this error, it's bull**** |
Thanks a lot man |
My solution build.gradle.kts configurations.all {
resolutionStrategy.eachDependency {
val requested = this.requested
if (requested.group == "androidx.appcompat") {
if (!requested.name.startsWith("multidex")) {
this.useVersion("1.+")
}
}
}
} |
I using androidx in kotlin |
Why is this closed if there are still problems about it? It still doesn't work just like @systemsplanet-zz stated |
gradle:
The text was updated successfully, but these errors were encountered: