build.gradle

Not able to copy configurations dependencies after upgrading Gradle plugin for Android Studio to 3.0.1 and Gradle to 4.1

倖福魔咒の 提交于 2019-11-27 20:56:12
问题 I used to copy 'compile' dependencies to a specific folder using this simple gradle task : task copyLibs(type: Copy) { from configurations.compile into "$project.rootDir/reports/libs/" } But it stopped working just after upgrading my Android project using gradle plugin 3.0.1 for Android Studio and Gradle tool to 4.1. As the dependency configuration 'compile' is now deprecated by https://developer.android.com/studio/build/gradle-plugin-3-0-0-migration.html#new_configurations I changed it to

How to add .aar dependency in library module?

别说谁变了你拦得住时间么 提交于 2019-11-27 20:31:41
问题 I am having one .aar file of one library module. I want to use it as a library or dependency in my other project's library module. How do I do it? I tried options provided at below links: http://kevinpelgrims.com/blog/2014/05/18/reference-a-local-aar-in-your-android-project/ It works only if I add .aar reference in my project's application module. But not working in library module. Thanks. 回答1: Follow this setting and you will able to add .aar dependency to library module build.gradle

Could not install Gradle distribution from 'https://services.gradle.org/distributions/gradle-2.1-all.zip'

▼魔方 西西 提交于 2019-11-27 19:19:46
问题 I am a greenhorn in gradle and i just tried to create a new Android Gradle Project in IntelliJ. After filling up the necessities it started to download something which took hours so i decided to force quit my IDE and open the project again. And now I am getting this: And when I open the IDE logs, I see this: 2014-12-13 22:27:37,940 [103759372] INFO - .BaseProjectImportErrorHandler - Failed to import Gradle project at '/Users/ramswaroop/Documents/My Workspace/PopoPics' org.gradle.tooling

How to fix this gradle app:dexDebug error?

谁都会走 提交于 2019-11-27 19:13:00
问题 im using android studio,now in my app i have this error when i run my app Error:Execution failed for task ':app:dexDebug'. > com.android.ide.common.internal.LoggedErrorException: Failed to run command: /home/noob/android-sdk-linux/build-tools/21.1.2/dx --dex --no-optimize --output /home/noob/Desktop/NavigationDrawer/app/build/intermediates/dex/debug --input- list=/home/noob/Desktop/NavigationDrawer/app/build/intermediates/tmp/dex/debu g/inputList.txt Error Code: 2 Output: UNEXPECTED TOP-LEVEL

Gradle Error:Execution failed for task ':app:processDebugGoogleServices'

南楼画角 提交于 2019-11-27 18:05:22
I am following this link to integrate Google sign-in in my android app. https://developers.google.com/identity/sign-in/android/start-integrating As given in last step on the above given page we have to include dependency compile 'com.google.android.gms:play-services-auth:8.3.0' in app-level build.gradle file but doing so and building project an error comes saying Error:Execution failed for task ':app:processDebugGoogleServices'. > Please fix the version conflict. build.gradle(Module:app) apply plugin: 'com.android.application' apply plugin: 'com.google.gms.google-services' android {

Setting up Gradle for api 26 (Android)

家住魔仙堡 提交于 2019-11-27 17:41:03
Since I have upgraded my Nexus 5x to Android O DP3 I am not able to test my applications. I get the error for not having configured my Gradle-file to work with the new API-level (26). So I changed this and the dependencies, but I keep getting errors on ALL my support libraries like Failed to resolve: com.android.support:design:26.0.0-beta2 Clicking on Install repository and sync project Pops up a progressdialog for downloading the right dependency but does not remove the error. Cleaning up project, installing repositories and then rebuilding the project won't work either. appcompat-v7 On

Android Studio Gradle: Error:Execution failed for task ':app:processDebugGoogleServices'. > No matching client found for package

感情迁移 提交于 2019-11-27 17:28:36
I am trying to upgrade my google play services dependencies to 8.4.0 by following the example Google gives here , but I am getting the following error ('com.example.exampleapp' is a replacement for my app package name): Error:Execution failed for task ':app:processDebugGoogleServices'. > No matching client found for package name 'com.example.exampleapp' Project build.gradle: buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle:2.0.0-alpha3' classpath 'com.google.gms:google-services:2.0.0-alpha3' // NOTE: Do not place your application dependencies

Android Studio: Could not find com.android.tools.build:gradle:2.0.0-alpha2

时光总嘲笑我的痴心妄想 提交于 2019-11-27 17:06:11
问题 Recently I have updated my Android Studio to latest version from Latest Android Studio Canary Build: 2.0 Preview After updating to the new version, my current working directory stop working at all. Every single time when I am trying to clean and build a project they will give me an error like this Blockquote 'Error:Could not find com.android.tools.build:gradle:2.0.0-alpha2. Searched in the following locations: file:/Applications/Android Studio.app/Contents/gradle/m2repository/com/android

ActionBarDrawerToggle No Suitable Constructor Drawable

老子叫甜甜 提交于 2019-11-27 16:59:55
问题 I have simple code to create simple navigation drawer, but when i declare parameter for ActionBarDrawerToggle it's say that drawable icon cannot be applied... Gradle Massages Build Error:(36, 26) error: no suitable constructor found for ActionBarDrawerToggle(MainActivity,DrawerLayout,int,int,int) constructor ActionBarDrawerToggle.ActionBarDrawerToggle(Activity,DrawerLayout,Toolbar,int,int) is not applicable (argument mismatch; int cannot be converted to Toolbar) constructor

relation between gradle version and gradle build tool version

冷暖自知 提交于 2019-11-27 16:35:35
问题 I'm new to gradle and got 2 questions: gradle itself is a build tool, so why is the need for Android gradle tool com.android.tools.build:gradle:0.7.+ in the script? What is the relation between the version of gradle installed (say 1.9) and the version of that Android gradle tool, like 0.7.+ in classpath 'com.android.tools.build:gradle:0.7.+' . If I changed the latter's version to 0.8.+ then the build fails on 'could not find plugin AppPlugin'. 回答1: I will try to answer your questions. As you