build.gradle

java.util.zip.ZipException: duplicate entry:com/google/android/gms/auth/UserRecoverableAuthException.class

半城伤御伤魂 提交于 2019-12-11 12:15:02
问题 I'm getting this issue after building app, Execution failed for task ':appname:transformClassesWithJarMergingForDebug. com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/google/android/gms/auth/UserRecoverableAuthException.class My dependencies in build.gradle is dependencies { compile fileTree(include: '*.jar', dir: 'libs') compile project(':_library') compile project(':android-support-v7-appcompat') compile project(':library_pull') compile

Unable to resolve multiple build failures error

一笑奈何 提交于 2019-12-11 12:03:43
问题 I tried to add the support fragments and the issue started from there. Support libraries are not supported the build version. Previously the build version was 28 and the support libraries version was 27.1.1. This was working well. I tried to update the version to 28 and then support libraries to 28.0.0. But its giving me error. After getting the multiple errors now I am at manifest merger error. I tried to use androidx as suggested on stackoverflow for the support libraries. But it is very

Execution failed Process command /usr/lib/jvm/java-8-oracle/bin/java finished with non-zero exit value 2

女生的网名这么多〃 提交于 2019-12-11 11:47:17
问题 I run an application on Android Studio but I have an error like : Execution failed for task org.gradle.process.internal ExecException Process command /usr/lib/jvm/java-8-oracle/bin/java finished with non-zero exit value 2 My software and hardware informations Operating System = Ubuntu 15.04 kde Development Tool = Android Studio 1.3.2 CPU = intel i7 3610QM build.gradle apply plugin: 'com.android.application' dependencies { compile fileTree(dir: 'libs', include: '*.jar') compile project('

variant.getOutputFile() is deprecated. Call it on one of variant.getOutputs() instead

纵饮孤独 提交于 2019-12-11 11:19:15
问题 This has been coming up since the bump to gradle 2.1 in Android Gradle plugin 0.13.0, but for the life of me I can't understand why logs this warning sometimes. Consider this block for renaming APKs based on variant type: applicationVariants.all { variant -> variant.outputs.each { output -> def oldFile = output.outputFile if (oldFile != null && oldFile.name.endsWith('.apk')) { def newFile = "Fancy conditionally-formatted file name here" print "\nBefore" output.outputFile = new File(oldFile

how to resolve Multiple dex files error in Android studio

我与影子孤独终老i 提交于 2019-12-11 11:16:03
问题 I started using Android studio 1.2.0. My project dependent on 2 library projects. So, I imported eclipse project to Android studio and added 2 library projects. Gradle build is successful. When I try to run it, I am getting below error * What went wrong: Execution failed for task ':dexDebug'. > com.android.ide.common.internal.LoggedErrorException: Failed to run command: F:\AndroidStudioSetup\build-tools\22.0.1\dx.bat --dex --no-optimize --output F:\3.0 Studio Migrartion\SdkSample\platforms

For below android version-5 i am getting ZipException with duplicate entry: com/google/api/client/http/AbstractHttpContent.class

若如初见. 提交于 2019-12-11 11:12:37
问题 Not able to install app in android version 4.4 I am getting error like: Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'. > com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/google/api/client/http/AbstractHttpContent.class I have tried this solution but it didn't worked for me. Here is my app dependencies dependencies { compile fileTree(include: ['*.jar'], dir: 'libs') compile 'com.android.support:appcompat-v7:23

How to regenerate build.gradle file after deleting

巧了我就是萌 提交于 2019-12-11 10:54:15
问题 I got an error with my Android project: Gradle project sync failed error , and then I searched the solution here. However, I deleted wrong file(build.gradle instead of .gradle in the user home directory). So how do I generate build.gradle file in Android Studio again? 回答1: Open your IDE and just create a file called build.gradle in the root folder if you deleted the top-level file, or inside a module if you deleted it. It is a text file where you have to write your script. You can copy the

installing repository for com.android.support.recyclerview-v7 for Android Studio error

谁都会走 提交于 2019-12-11 10:53:59
问题 I'm a beginner in android studio and I try to use a recyclerView. When I try to add compile 'com.android.support.recyclerview-v7:21.0.+' to my gradle file, I get the error: failed to resolve com.android.support.receyclerview-v7v7:21.0.+. It proposes me to install repository and sync project. when I click it, i get this error: SDK Path C:\User\userName\AppData\Local\Android\sdk1 loading SDK information ignoring unknown package filter 'extra-android-m2repository' warning: The package filter

Creating zip of android project along with its dependencies through gradle

谁说胖子不能爱 提交于 2019-12-11 10:49:47
问题 I have an android project which have three different dependencies (library projects) and I want to create a zip of each project src folder after we are finished with the builds. I did the following, task srcZip(type: Zip) { from projectDir println "SOURCE THE ZIP" exclude 'build' exclude 'gen' exclude 'bin' } In order to make a zip however I have to call this task manually. This works only if I have to create a zip file of one project which does not include the sources of other dependencies

Gradle never resolves Artifactory before JCenter repository for dependencies

不羁岁月 提交于 2019-12-11 10:27:26
问题 I have a Gradle build script for a Java project. I have set up an internal Artifactory repository as a remote for the project's dependencies. When the project is compiling, I want Gradle to first go to Artifactory and request; if it fails there, it should next try JCenter as a backup. I am using the Gradle Artifactory plugin, v3.1.1, in Gradle 2.8. The plugin defines its contextUrl , publish repo, and resolve repo in a closure: artifactory { contextUrl = "${artifactoryContextUrl}" publish {