build.gradle

All com.android.support libraries must use the exact same version specification : 27.0.2

落花浮王杯 提交于 2020-01-03 14:01:31
问题 After updating targetSdkVersion to 27 I got this error message. All com.android.support libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 27.0.2, 25.2.0. Examples include com.android.support:animated-vector-drawable:27.0.2 and com.android.support:support-media-compat:25.2.0 I understand that I should update com.android.support:support-media-compat but I dont know how because I am not using it in build.gradle , I tried to

Gradle: ear deploymentDescriptor - Exclude module from application.xml

白昼怎懂夜的黑 提交于 2020-01-03 13:25:09
问题 I have the following in my gradle build file. My problem is that log4j.properties is being added as an ejb module in application.xml, despite my attempt to remove it from the xml per the thread here: http://forums.gradle.org/gradle/topics/ear_plugin_inserts_unneeded_ejb_modules_in_the_application_xml_ear_descriptor apply plugin: 'ear' ear { deploymentDescriptor { applicationName = 'ourapp' displayName = 'ourapp' initializeInOrder = true //This doesn't work: withXml { xml -> xml.asNode()

Gradle: ear deploymentDescriptor - Exclude module from application.xml

 ̄綄美尐妖づ 提交于 2020-01-03 13:24:21
问题 I have the following in my gradle build file. My problem is that log4j.properties is being added as an ejb module in application.xml, despite my attempt to remove it from the xml per the thread here: http://forums.gradle.org/gradle/topics/ear_plugin_inserts_unneeded_ejb_modules_in_the_application_xml_ear_descriptor apply plugin: 'ear' ear { deploymentDescriptor { applicationName = 'ourapp' displayName = 'ourapp' initializeInOrder = true //This doesn't work: withXml { xml -> xml.asNode()

java.util.zip.ZipException: duplicate entry with firebase

ⅰ亾dé卋堺 提交于 2020-01-03 11:52:43
问题 I am building an application with firebase but getting the Duplicate class error. I have checked all dependencies, but I'm not able to figure out where did I have two version of firebase libs. Error: Execution failed for task ':app:transformClassesWithJarMergingForDebug'. com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/google/firebase/iid/zzb$1.class buildscript { repositories { maven { url 'https://maven.fabric.io/public' } } dependencies

java.util.zip.ZipException: duplicate entry with firebase

不羁岁月 提交于 2020-01-03 11:51:11
问题 I am building an application with firebase but getting the Duplicate class error. I have checked all dependencies, but I'm not able to figure out where did I have two version of firebase libs. Error: Execution failed for task ':app:transformClassesWithJarMergingForDebug'. com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/google/firebase/iid/zzb$1.class buildscript { repositories { maven { url 'https://maven.fabric.io/public' } } dependencies

gradlew build freezing at mergeDebugResources

冷暖自知 提交于 2020-01-03 08:33:18
问题 I build debug app use gradlew as in google tutorial https://developer.android.com/training/basics/firstapp/running-app.html I was created project use android create project --target 2 -g -v 2.9--name myAppName --path ./MyAppDirectory --activity MyActivity --package com.mypackage and this is my build.gradle file buildscript { repositories { mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:1.5.0' } } apply plugin: 'android' android { compileSdkVersion 'Google Inc.

gradlew build freezing at mergeDebugResources

痞子三分冷 提交于 2020-01-03 08:32:12
问题 I build debug app use gradlew as in google tutorial https://developer.android.com/training/basics/firstapp/running-app.html I was created project use android create project --target 2 -g -v 2.9--name myAppName --path ./MyAppDirectory --activity MyActivity --package com.mypackage and this is my build.gradle file buildscript { repositories { mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:1.5.0' } } apply plugin: 'android' android { compileSdkVersion 'Google Inc.

Copy APK file from build location to some other location in gradle 4.4

﹥>﹥吖頭↗ 提交于 2020-01-03 06:32:13
问题 As in gradle 4.4 it is not possible to change path of APK output file and we can't use absolute path for the apk's output now from the docs - Modifying variant outputs at build time may not work so I searched on SO and found a solution that we can copy apk to our desired location after it gets build but I don't have much idea on gradle scripting and i am not able to call copy task. Can anyone help me. code from my gradle : android { ................ android.applicationVariants.all { variant -

Gradle task for local tomcat deployment

和自甴很熟 提交于 2020-01-03 05:36:04
问题 I have written a task for deploying war file in my local tomcat instance. I have few issues in it and need help in it. Following is gradle task- task deploy (dependsOn: build){ delete 'D:/softwares/apache-tomcat-9.0.0.M18/apache-tomcat-9.0.0.M18/webapps/ROOT', 'D:/softwares/apache-tomcat-9.0.0.M18/apache-tomcat-9.0.0.M18/webapps/ROOT.war' copy { from "build/libs" into "D:/softwares/apache-tomcat-9.0.0.M18/apache-tomcat-9.0.0.M18/webapps" include "ROOT.war" } } Issue I am facing every time I

How to configure gradle with testng, package already imported but getting error?

心已入冬 提交于 2020-01-03 05:15:09
问题 I am newbie towards Gradle. I am able to run my test cases through testng but unable to run with Gradle from eclipse. Following is the build.gradle apply plugin: 'java' apply plugin: 'eclipse' group = 'selenium.webdriver.qa' repositories { // Use 'jcenter' for resolving your dependencies. // You can declare any Maven/Ivy/file repository here. jcenter() } dependencies { // The production code uses the SLF4J logging API at compile time compile 'org.slf4j:slf4j-api:1.7.21' testCompile 'junit