build.gradle

Android Studio: Could not find matches as no versions of com.android.tools.build:gradle are available

你说的曾经没有我的故事 提交于 2019-12-12 17:01:35
问题 I'm trying to build an Android app created with React Native that I've recently cloned, but I always get this error: Could not find any matches for com.android.tools.build:gradle:2.2.+ as no versions of com.android.tools.build:gradle are available. Searched in the following locations: https://jcenter.bintray.com/com/android/tools/build/gradle/maven-metadata.xml https://jcenter.bintray.com/com/android/tools/build/gradle/ Required by: project :react-native-image-picker I've opened those urls

How to properly set multiple applicationIds or package names in my manifests

丶灬走出姿态 提交于 2019-12-12 15:01:13
问题 I have an issue that is directly related to this question: How to have two build flavors inherit from a root flavor in Android Studio? but it makes sense to pull it out into another question. I have this in my build.gradle: flavorGroups 'fruit', 'paid' productFlavors { apple { flavorGroup 'fruit' } orange { flavorGroup 'fruit' } free { flavorGroup 'paid' } premium { flavorGroup 'paid' } } I have four unique applications at this point. Apple Free Apple Paid Orange Free Orange Paid But they do

Execution failed for task':app:dexDebug'

孤街浪徒 提交于 2019-12-12 11:22:43
问题 This is my build.gradle file. apply plugin: 'com.android.application' android { compileSdkVersion 20 buildToolsVersion "20.0.0" defaultConfig { applicationId "com.squad.run" minSdkVersion 10 targetSdkVersion 19 compileOptions { sourceCompatibility JavaVersion.VERSION_1_7 targetCompatibility JavaVersion.VERSION_1_7 } } buildTypes { release { runProguard false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' } } } dependencies { compile project(':facebookSDK')

Android sdk version on gradle and manifest

旧时模样 提交于 2019-12-12 11:16:12
问题 I started using Android Studio a few weeks ago and there's a question I have, in the build.gradle file we can set the minSdkVersion as we can in the manifest, but does one override the other? if we put different values on gradle and on the manifest what is the consequence? 回答1: The manifest files in your projects are overridden by the gradle when you build your projects. 来源: https://stackoverflow.com/questions/18448677/android-sdk-version-on-gradle-and-manifest

Butterknife gradle error on Android Studio 3.0 due to android-apt plugin

孤街醉人 提交于 2019-12-12 10:54:04
问题 After upgrading to Android Studio 3.0 I had some issues with gradle that I was able to fix checking on the developers website However, I was not able to find how to fix the issue with the apply plugin: 'android-apt' I have tried several things such as removing it from the project gradle and add it to the app gradle as annotationProcessor 'com.neenbedankt.gradle.plugins:android-apt:1.8' . also removed the apt, etc, etc. Anyway, Studio is complaining about it. Any help is greatly appreciated.

Gradle is unable to find zip artifact in composite build if java plugin is applied

泄露秘密 提交于 2019-12-12 10:45:54
问题 I have a Gradle project which creates a zip artifact. I define the artifact via artifacts.add('default', zipTask) . I add this project to another project via includeBuild and use the zip as dependency ( dependencies { myConfiguration 'org.example:testA:+@zip' } ). So far so good. It works. The problem starts when I add the plugin java to the first project. For some reason it prevents Gradle from finding the zip artifact. The error is: Execution failed for task ':doubleZipTask'. > Could not

What is the difference between an app dependency and a module dependency/plugin?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-12 10:32:58
问题 When using some 3rd party libraries, I add a dependency to my module's build.gradle file. compile 'com.android.support:appcompat-v7:24.1.1' Or I add a plugin apply plugin: 'com.neenbedankt.android-apt' Some other times, the library requires adding a dependency to my app's build.gradle file. classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8' What is the difference between these dependencies and plugins? Why can't they all be set in a single build.gradle file? All suggestions are

Gradle build dependancy throwing ClassNotFoundException

那年仲夏 提交于 2019-12-12 09:45:45
问题 I am currently writing my first Gradle build script to help structure a simple Java app to be used from the command line. Below is the full build.gradle code apply plugin: 'java' apply plugin: 'eclipse' defaultTasks 'clean', 'build' repositories { mavenCentral() } jar { baseName = 'napier-deploy' version = '1' manifest {attributes 'Main-Class': 'com.Main'} } dependencies { compile 'org.apache.httpcomponents:fluent-hc:4.3.3' compile 'org.apache.httpcomponents:httpclient-cache:4.3.3' compile

Custom Gradle Task to save parsed Json to file. Android

百般思念 提交于 2019-12-12 09:43:36
问题 I want to automate the parsing and saving of a json object to asset or raw directory during gradle build. I have a java Json parsing class and I know how to run it from gradle. What i do not know is how to save the results or that class to either of the above folders. Below is an example of how i will be running the script. Is what i am trying to do possible in its current state?? package com.mrhaki.java; public class SimpleParser { public static void main(String[] args) { //parse content } }

Warning:The Jack toolchain is deprecated Android studio

前提是你 提交于 2019-12-12 08:57:59
问题 I updated my android studio to version 3.0, I was using jackOption in previous version of studio. After update this warning comes. I got this warning. But i don't know where to add these two lines suggested? Warning:The Jack toolchain is deprecated and will not run. To enable support for Java 8 language features built into the plugin, remove 'jackOptions { ... }' from your build.gradle file, and add android.compileOptions.sourceCompatibility 1.8 android.compileOptions.targetCompatibility 1.8