logo
down
shadow

How to Remove Duplicate Libraries added via gradle?


How to Remove Duplicate Libraries added via gradle?

By : jeff
Date : November 22 2020, 03:03 PM
it helps some times Instead of adding it in the Configurations. I added the exclude for only the library like this:
code :
compile ('com.rengwuxian.materialedittext:library:1.7.1') {
   exclude group: 'com.nineoldandroids', module: 'library'
}


Share : facebook icon twitter icon
Why does Gradle jar of jars result in duplicate libraries?

Why does Gradle jar of jars result in duplicate libraries?


By : Pepillo
Date : November 04 2020, 08:17 AM
Any of those help The gradle documentation says this about the runtime configuration:
How to remove a jar file from the external libraries directory, which is added by the gradle dependency, in android?

How to remove a jar file from the external libraries directory, which is added by the gradle dependency, in android?


By : Vural Üşenç
Date : March 29 2020, 07:55 AM
like below fixes the issue First, I have added a dependency in gradle, and then sync the project. We have no error, but when we run the application, we got an error which is also showing in the image. , please try below in your gradle dependency.
code :
compile('org.igniterealtime:rest-api-client:1.1.3')
{exclude module: "javax.inject"}
Failed to resolve libraries added inside Build.Gradle dependency

Failed to resolve libraries added inside Build.Gradle dependency


By : Colombia vs Chile Vi
Date : March 29 2020, 07:55 AM
This might help you You didn't declare any repository (for the actual project). You just declared repositories for build-script dependencies. Those are dependencies the build-script itself needs to run like custom tasks, plugins etc.
Add a repositories block outside the buildscript block and define where to search for project dependencies in there.
Java jar file won't recognize external libraries added from gradle

Java jar file won't recognize external libraries added from gradle


By : Alexis
Date : March 29 2020, 07:55 AM
This might help you Finally solved it , the answer from Sterconium got me on the right track answer but the problem was when I try to create the fatJar it says cannot find the main class ,the reason was because my files are in src/test/java instead of src/main/java and somehow when I tried to run fatJar it compiled It but could not find still the dependencies, so I change the implementation to compile in build.gradle file and now it works .So here is my final build.gradle file how it looks like .
code :
    /*
 * This file was generated by the Gradle 'init' task.
 *
 * This generated file contains a sample Java Library project to get you started.
 * For more details take a look at the Java Libraries chapter in the Gradle
 * User Manual available at https://docs.gradle.org/5.4/userguide/java_library_plugin.html
 */
plugins {
    // Apply the java-library plugin to add support for Java Library
    id 'java-library'
}
repositories {
    // Use jcenter for resolving your dependencies.
    // You can declare any Maven/Ivy/file repository here.
    jcenter()
    mavenCentral()
}


apply plugin: "java"
apply plugin: "eclipse"

version = '1.0'

//create a single Jar with all dependencies
task fatJar(type: Jar) {
    manifest {
        attributes 'Implementation-Title': 'Gradle Jar File Example', 
            'Implementation-Version': version,
            'Main-Class': 'Server.Test'
    }
    baseName = project.name + '-all'
    from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
    with jar
}


dependencies {
    // This dependency is exported to consumers, that is to say found on their compile classpath.
    api 'org.apache.commons:commons-math3:3.6.1'


    // This dependency is used internally, and not exposed to consumers on their own compile classpath.
    implementation 'com.google.guava:guava:27.0.1-jre'

    // Use JUnit test framework
    testImplementation 'junit:junit:4.12'


    implementation "redis.clients:jedis:3.0.1"
    implementation 'com.google.firebase:firebase-admin:6.10.0'
    implementation 'org.slf4j:slf4j-simple:1.7.25'
    implementation 'com.google.maps:google-maps-services:0.10.0'
    compile 'io.vertx:vertx-core:3.8.1'
    implementation 'com.google.code.gson:gson:2.8.5'
}
Gradle dependencies not added as libraries in IntelliJ

Gradle dependencies not added as libraries in IntelliJ


By : Deep Patel
Date : March 29 2020, 07:55 AM
hop of those help? I'm not an expert on this, having only just discovered a solution to this problem myself, but I found that using the idea Gradle plugin resolved the same issue for me.
So, in build.gradle add:
Related Posts Related Posts :
  • Android Studio gradle build failed for hello world app
  • Slide a layout up from bottom of screen
  • Play HTML5 video in iOS/Android native media player
  • How to rescale a bitmap file in android?
  • No view found for id 0x for fragment after rotation?
  • Define different themable styles to the same widget types
  • ProGuard not working in my app
  • FragmentTransaction from BaseAdapter
  • Connecting multiple devices in a Wifi Direct group
  • Why TabActivity is deprecated in android
  • How to capture low resolution picture using android camera
  • android preferenceactivity padding in landscape orientation
  • How can I store cookie in webview?
  • Passing variables from one activity to another
  • Create Multicolored Pie Chart in Android Studio
  • how to kill progress dialog in android
  • Show Error on the tip of the Edit Text Android
  • How do I use getWindowManager() by another java file
  • fetching images from gallery on android phones with internal storage
  • How to discover devices like Google TV and Nexus-Q using MediaRoute API on Android?
  • "Unfortunately your app stopped working"- Facebook Integration for Android
  • How to animate button in android?
  • Resource Not Found Exception in class without context or activity
  • Launching Android Netflix App And Passing Video Id
  • Making a Phone Call with a Number Extension
  • NullPointerException at BoringLayout.isBoring is anything but boring
  • java.lang.RuntimeException: Unable to get provider
  • Testing custom Views with Robolectric
  • tools:listheader doesn't work although tools:listitem does
  • oppo, vivo app kill notification not coming in android fcm
  • OnClick Method could not function correctly with if else statement
  • Best method to download image from url in Android
  • How can I open Drawer Layout moving all the view and not just slide over?
  • how to show profile pictures of friends in a list view?
  • Creating TimePickerDialog with custom style in Android
  • Android 2.3.6 support library v7 option menu is missing
  • need of vblank in Display subssytem
  • Android MP4 stream - Video cannot be played
  • FastAdapter: Undo button does not show up after swipe
  • What are reasons to pass getActivity as the LifecycleOwner to the LiveData's observe method in a fragment?
  • Implement Face Recognition in Android
  • Titanium studio cannot run "titanium" command in terminal
  • How to execute command line ffmpeg commands programatically in android?
  • Make Android List Items clickable with each item pointing to a different link
  • listview runs successfully, but nothing is display in emulator
  • How to zoom in a bitmap with high resolution?
  • Passing listView data through intent
  • Google map route direction show by arrows in android v2
  • how to start "uiautomator test run" from android code?
  • Proguard in Android Library
  • Alarm Clock from GIT - Gives error - Android
  • Mock injection using Mockito - Android
  • Get Bitmap from universal image loader
  • Unable to include custom font in android
  • Basics on using logcat in Android development
  • Android: Clear cache programmatically
  • Android: pass object without serialization
  • Can not scroll and click item on gridview inside scrollview
  • Android device keeps disconnecting from adb / eclipse
  • Volley cannot create cache directory. Could not clean up file
  • shadow
    Privacy Policy - Terms - Contact Us © ourworld-yourmove.org