gradle-dependencies

Dependencies are up-to-date but Gradle thinks not

余生颓废 提交于 2020-01-03 13:40:10
问题 Why does Gradle give this error about dependencies when I have used the latest and same version? This has only just started today and I'm lost as to how to fix this: All com.android.support libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 28.0.0, 26.1.0. Examples include com.android.support:animated-vector-drawable:28.0.0 and com.android.support:support-media-compat:26.1.0 dependencies { implementation fileTree(include: ['*

Android gradle: Sharing dependencies between product flavors

陌路散爱 提交于 2019-12-31 04:01:10
问题 I have 3 product flavors (flavor1, flavor2, flavor3) in my app. flavor1 and flavor2 share some of the dependencies related to ads. Is there a way to bundle the ad related dependencies to a gradle dimension or configuration and add that to flavor1 and flavor2 without duplicating the compileFlavor1 and compileFlavor2 lines in my build.gradle? This is part of my current gradle. This works. But, I'm wondering if there is a better way to do this? So, I don't have to repeat the ad dependencies for

Cannot import gradle project into another gradle project

女生的网名这么多〃 提交于 2019-12-23 03:46:29
问题 I have the following Windows directory structure for my 2 gradle projects: bitbucket/ users-dashboard/ backend/ users-data/ build.gradle settings.gradle common-util/ common-util/ build.gradle settings.gradle And I would like to you use the common-util project (as a dependency) into the users-data project. I am trying the following without succeed! users-data/settings.gradle include ':common-util' project(':common-util').projectDir = new File('../../../common-util/common-util') users-data

Gradle sync failed: Could not find method Dependencies() for arguments

若如初见. 提交于 2019-12-11 16:47:56
问题 Full error: Gradle sync failed: Could not find method Dependencies() for arguments [build_aewao5k4tyewg69imdynjiuxi$_run_closure1$_closure3@7c332105] on object of type org.gradle.api.internal.initialization.DefaultScriptHandler. Top level build.gradle: // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { repositories { mavenCentral() google() jcenter() } Dependencies { classpath 'com.android.tools.build:gradle:3.0.1' } } 回答1: Use

How to ignore bad pom 'inconsistent module descriptor' (version)

坚强是说给别人听的谎言 提交于 2019-12-10 17:23:12
问题 I need a dependency which has an inconsistent version number in it's pom. Apache XmlSchema-Pom has as version SNAPSHOT which is obviously not correct as it should be 1.1 . According to this gradle discussion it should be possible if the maven repository specified as an ivy repo, adding @jar or transitive = false to the dependency, all that didn't work for me Here my build.gradle with my attempts: group 'de.company' version '1.0-SNAPSHOT' apply plugin: 'maven' apply plugin: 'java' repositories

Define an artifact to be used as a dependency in another project

独自空忆成欢 提交于 2019-12-10 15:29:42
问题 TL;DR I'm trying to configure two Gradle projects in a way that one project uses files built by the other one. The first project is added to the second one by includeBuild and the file is defined in the second project as a dependency. Project testA settings.gradle : rootProject.name = 'testA' build.gradle : group = 'org.test' version = '0.0.0.1_test' task someZip (type: Zip) { from './settings.gradle' archiveName = 'xxx.zip' destinationDir = file("${buildDir}/test") } artifacts { //TODO add

Gradle: download Dependencies of included aar-library

▼魔方 西西 提交于 2019-12-04 19:27:04
问题 I wrote a library-project cameraBarcodeScanner that is built into an aar file. This library has the following dependencies defined in its build.gradle: dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) testCompile 'junit:junit:4.12' compile 'com.android.support:appcompat-v7:23.1.0' compile 'com.google.zxing:core:3.2.1' compile 'com.journeyapps:zxing-android-embedded:3.2.0@aar' } I'm using the library in a test-application like so: dependencies { compile(name:

Android gradle: Sharing dependencies between product flavors

馋奶兔 提交于 2019-12-02 04:52:22
I have 3 product flavors (flavor1, flavor2, flavor3) in my app. flavor1 and flavor2 share some of the dependencies related to ads. Is there a way to bundle the ad related dependencies to a gradle dimension or configuration and add that to flavor1 and flavor2 without duplicating the compileFlavor1 and compileFlavor2 lines in my build.gradle? This is part of my current gradle. This works. But, I'm wondering if there is a better way to do this? So, I don't have to repeat the ad dependencies for each flavor. android { productFlavors { flavor1 {} flavor2 {} flavor3 {} } sourceSets { main {} flavor1

Using RxJava 2 and Retrofit 2, adapter version issue

萝らか妹 提交于 2019-12-01 19:06:32
问题 I've added a new library module to existing application module in Android Studio. The main difference was adding RxJava 2 and Retrofit 2. After updating build.gradle of new module I started to get next error: Error:Execution failed for task ':app:transformResourcesWithMergeJavaResForBetaNewApiDebug'. com.android.build.api.transform.TransformException: com.android.builder.packaging.DuplicateFileException: Duplicate files copied in APK META-INF/rxjava.properties File1: C:\Users\Gaket.gradle

Android: force gradle to include only one version of a library

走远了吗. 提交于 2019-11-28 09:45:27
I use 'com.android.support:support-v4:23.3.0' in my build.gradle but when explore external libraries I see two version of support-v4 library (23.3.0 & 24.0.0). How can I find which dependency use support-v4:24.0.0 library? How can I force gradle to only add version 23.3.0? this is my dependency list in build.gradle: dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) compile 'com.android.support:appcompat-v7:23.3.0' compile 'com.android.support:support-v4:23.3.0' compile 'com.android.support:design:23.3.0' compile 'com.android.support:recyclerview-v7:23.3.0' compile 'com.android