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
Gradle error when building #24
Comments
I tried to use the following snippet (I can't remember where it was from, I used it in a past project) configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
def requested = details.requested
if (requested.group == "com.android.support") {
if (!requested.name.startsWith("multidex")) {
details.useVersion "27.+"
}
}
}
} But that din't seem to solve the issue. |
I've got the similar error in the
|
looks like sonar has all dependencies packaged inside of it. try to implement like this debugImplementation ('com.facebook.sonar:sonar:0.0.1'){ |
@TurKorsaN I couldn't get it to work, the same error is thrown (even after cleaning and trying to re-build) |
There is definitely a packaging problem with version The The only way I could get it to work is to manually extract the aar file (and the contained classes.jar file), repackage them, then directly reference them in my build.gradle file. It went something like this:
|
I have the same issue: |
Hope that the official can provide AAR file |
I have the same issue:
|
@jiangkang This just means you have other conflicting dependencies. The steps above only removed the support library, annotations and a few other things. Your project might have dependencies on |
@friederbluemle Thanks for the tip! I followed your steps and was able to strip out the duplicated javax classes that gradle/D8 was complaining about, but I'm still seeing a similar error - Any ideas? |
@erawhctim Hmm, is it possible that your existing dependencies have some conflict? Try
I assume you already completely cleaned the project after modifying the aar file, to remove any chance for cached file problems? You may also try |
@friederbluemle Hmm, I think you might be right. Looks like
I tried excluding that from the realm gradle plugin declaration like this, but that didn't work like I expected it to:
|
I have a hard time understanding how the Sonar library in its current form would work with any external real application out there. I am facing similar issue but with OkHttp3
And since OkHttp3 is pretty common [sarcasm], how on earth can Sonar in its current form work in real production apps? So this library has to be slimmed down and not ship with all these baked in dependencies. |
This comment has been minimized.
This comment has been minimized.
@priteshrnandgaonkar and I are still working on a full solution, but we've got a stop-gap that should already help a great deal. If you include this repository (while we're waiting for JCenter to approve a new package) ... repositories {
maven { url 'https://dl.bintray.com/facebook/maven/' }
} ... and depend on ... debugImplementation 'com.facebook.sonar:sonar:0.0.4 ... then you should be able to use Sonar in your Android project. For now we DO NOT support |
Another update on this: The extra repository is no longer necessary as the new dependency got promoted into JCenter proper. |
com.facebook.sonar:sonar:0.0.4 depends on But they are not on jcenter nor on the https://dl.bintray.com/facebook/maven/ |
@sgrekov You can get them from by adding I'll bump the Litho dependencies back to stable and push out another release with them included. |
Pushed |
@passy Don't forget to push |
@Swordsman-Inaction Thanks! The task silently failed to publish the release because the javadoc generation failed with an odd error. Uploading now. |
@passy Hi, got an error, found both libs have
|
@Swordsman-Inaction You can add the following packagingOptions {
pickFirst 'lib/armeabi-v7a/libsonarfb.so'
pickFirst 'lib/x86/libsonarfb.so'
pickFirst 'lib/x86_64/libsonarfb.so'
pickFirst 'lib/arm64-v8a/libsonarfb.so'
} |
@Swordsman-Inaction The workaround from @priteshrnandgaonkar should work, but it's still something we shouldn't force you to do. I'll try to exclude the library from getting bundled into the |
One more try. :) Published |
Is this issue resolved? I still face it. |
|
Yes, the newer versions address this. Closing this here now. :) |
I have solved my issue by using this configurations in gradle file. You save my day. Thanks ! |
I'm trying to test Sonar with android, I created a new application with android studio, and added the dependency to the
build.gradle
When I try to build the app, I get the following error:
In the
Android Issues
section this error appears as well:The text was updated successfully, but these errors were encountered: