build.gradle

play-services-ads:18.0.0 and appcompat-v7:28.0.0 - merger failed and dependencies using groupid com.android.support and androidx.* can not be combined

筅森魡賤 提交于 2019-12-02 03:18:05
I have an early version of play service and it was ok. Now I update it to 18.0.0 and have many errors: Manifest merger failed : Attribute application@appComponentFactory value=(android.support.v4.app.CoreComponentFactory) from [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91 is also present at [androidx.core:core:1.0.0] AndroidManifest.xml:22:18-86 value=(androidx.core.app.CoreComponentFactory). Suggestion: add 'tools:replace="android:appComponentFactory"' to element at AndroidManifest.xml:8:5-35:15 to override. my dependencies: dependencies { implementation fileTree

How to run a Gradle task with different parameters

无人久伴 提交于 2019-12-02 02:45:37
I'd like to define a task in gradle (called gen ) that runs the gradle task jar but with a fix value for baseName . I also want the original task jar to be available afterwards. My Problem is, that I can't transfer the setting for manifest. I tired e.g. def mainFile = 'com.so.proj.App' def filename = 'something' jar { baseName filename manifest { attributes 'Main-Class': mainFile } } task gen (type: Jar) { description "Generates JAR without version number." doFirst { //archiveName = jar.baseName + "." + extension archiveName = filename + ".jar" manifest { attributes 'Main-Class': mainFile } }

Execution failed for task mockableAndroidJar

北战南征 提交于 2019-12-02 02:20:45
问题 When I try to build application I am getting this exception: Execution failed for task ':app:mockableAndroidJar'. > java.io.EOFException: Unexpected end of ZLIB input stream This is fragment of stactrace: Caused by: org.gradle.api.UncheckedIOException: java.io.EOFException: Unexpected end of ZLIB input stream at org.gradle.internal.UncheckedException.throwAsUncheckedException(UncheckedException.java:43) at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:78) at org.gradle.api

Cannot include/exclude Junit tests classes by Category using gradle

有些话、适合烂在心里 提交于 2019-12-02 02:17:34
问题 Given these interfaces testclient.priority.High testclient.priority.Low and a junit classes annotated like this @Category(testclient.priority.High.class) public class MyTest { ... } @Category(testclient.priority.Low.class) public class MyOtherTest { ... } I tried to configure an include/exclude pattern in build.gradle like this useJUnit { includeCategories 'testclient.priority.High' excludeCategories 'testclient.priority.Low' } The problem is that no tests are run, at all. How is the exact

Gradle Error : duplicate entry: com/android/volley/AuthFailureError.class [duplicate]

ⅰ亾dé卋堺 提交于 2019-12-02 01:43:05
This question already has an answer here: duplicate entry: com/android/volley/AuthFailureError.class while compiling project in android studio 9 answers I imported EBS Sdk in my project.Now gradle building is success but while running Error:Execution failed for task':app:transformClassesWithJarMergingForDebug'. > com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/android/volley/AuthFailureError.class** this exception occurs. The following is the build.gradle of both app and the module i have searched and tried all the possiblities but i am not

Guava Dependency Breaking Jar Built With Kotlin

时间秒杀一切 提交于 2019-12-02 01:19:58
Issue The Java/Kotlin application runs as expected in from the Main Class in IntelliJ's IDE. However, when the app is built into a .Jar file the following error occurs: java.lang.NoSuchMethodError: com.google.common.util.concurrent.MoreExecutors . This is an issue with refactoring the directory, module, root project, and/or group names. Reproducing Error I've moved the project to a new directory path and everything runs as expected. However, after I attempt to modify the directory, and/or module names and refactor the rootProject.name in settings.gradle and the group in the build.gradle is

Cannot include/exclude Junit tests classes by Category using gradle

拜拜、爱过 提交于 2019-12-02 01:11:40
Given these interfaces testclient.priority.High testclient.priority.Low and a junit classes annotated like this @Category(testclient.priority.High.class) public class MyTest { ... } @Category(testclient.priority.Low.class) public class MyOtherTest { ... } I tried to configure an include/exclude pattern in build.gradle like this useJUnit { includeCategories 'testclient.priority.High' excludeCategories 'testclient.priority.Low' } The problem is that no tests are run, at all. How is the exact syntax to achieve that? I am using gradle 2.14.1 and invoke the tests by "clean build". This works for me

Why do packages from library module does not exist upon compilation, even when Android Studio shows no errors in code?

穿精又带淫゛_ 提交于 2019-12-02 00:56:47
问题 I have a library module (AndEngine) inside my libs/AndEngine folder. The code from that compiles fine. In my root settings.gradle file I have this : include ':app:libs:AndEngine' include ':app' And then in my app's build.gradle file I have this in dependencies: compile project('libs:AndEngine') INside my app's code, all of the imports and even autocompletion works without any errors at all. Inside Android Studio, all of the packages are found. But when I go to compile, I get about a hundred

I get an error : class file for com.google.android.gms.internal.zzbgl not found

纵然是瞬间 提交于 2019-12-02 00:39:01
问题 I get an error when checking the bounds for null: boundsBuilder.include(new LatLng(loc.getLocation().getLat(), loc.getLocation().getLng())); bounds = boundsBuilder.build(); if (bounds != null) { LatLng northEast = bounds.northeast; LatLng southWest = bounds.southwest; double movingDistance = SphericalUtil.computeDistanceBetween(northEast, southWest); Log.i("TRIP", "checkoutTime movingDIstance is:" + movingDistance); if (movingDistance >= kPSGeofencingShortDistance) { break; } if (activeTrip

Is there a way to change gradle variable value based on selected productFlavor?

喜你入骨 提交于 2019-12-02 00:37:30
问题 Below is my gradle example: I want to change STORE_FILE_PATH value dynamically based on selected productFlavors. Currently STORE_FILE_PATH is always overwriting it's value with last defined productFlavor. (In my case it always becomes "/pro.jks") Help me find solution. Thanks def STORE_FILE_PATH = ""; android { productFlavors { free { versionCode 1 versionName "1.0.0" applicationId "com.example.free" buildConfigField "boolean", "IS_AD_ENABLED", "true" STORE_FILE_PATH = "/free.jks" } pro {