build.gradle

Duplicate entry: com/google/android/gms/iid/zzc.class

走远了吗. 提交于 2019-12-06 17:14:41
问题 While Trying to implement Admobs in project I m facing the below issue during build apk process. Error:Execution failed for task ':app:transformClassesWithJarMergingForRelease'. com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/google/android/gms/iid/zzc.class build.gradle apply plugin: 'com.android.application' apply plugin: 'me.tatarka.retrolambda' android { configurations.all { resolutionStrategy.force 'com.google.code.findbugs:jsr305:1.3

Android Gradle library build: Include & exclude files from the jar inside the generated aar

穿精又带淫゛_ 提交于 2019-12-06 16:47:59
I exporting Android library via building aar with Gradle, and I have requirements for the jar inside the aar : Basically I need the jar to reflect following files structure that already exist in the project (jpeg files should be inside java package alongside .class files): project_name | module_name | src | main | java | package_to_include | java_files jpeg_files package_to_exclude This is the relevant part from build.gradle script: apply plugin: 'com.android.library' android { ... sourceSets { main { java { srcDir 'src/main/java' exclude 'package_to_exclude/**' resources.includes = [ 'package

Adding Dependencies in Gradle Project which generates .aar file

自闭症网瘾萝莉.ら 提交于 2019-12-06 15:06:23
问题 I have a gradle project which generates .aar file which i used to import in another project to run app. Both projects have build.gradle file and i have to add dependencies in both projects gradle file to make application work. Is there any way we can remove dependency from one build.gradle so that the other project is not affected? 回答1: The aar file doesn't contain the nested (or transitive) dependencies and doesn't have a pom file which describes the dependencies used by the library. It

Not able to make release APK React Native Android app

我们两清 提交于 2019-12-06 14:56:13
问题 i want to make release for android application in react native so when i generate build i got below error message like Error:Execution failed for task ':app:bundleReleaseJsAndAssets'. A problem occurred starting process 'command 'node'' see attachment also any idea how can i solve this ? your all suggestions are appreciable 回答1: After spending 2 days I resolved it, Please follow the below steps:- 1) Stop Running Gradle $ cd RectNatoveProjectName & cd android (Open your project and go to

can't build android project it shows error

安稳与你 提交于 2019-12-06 14:17:41
问题 project gradle // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle:3.0.0-alpha3' classpath 'com.google.gms:google-services:3.0.0' // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } } allprojects { repositories { jcenter() } } task clean(type: Delete) { delete rootProject.buildDir }

How to ignore hidden directories in Android build.gradle

徘徊边缘 提交于 2019-12-06 12:49:37
问题 I've recently updated an existing Android project to use Android Studio, and haven't been able to get it to build: Execution failed for task ':mergeDebugResources'. > Index: 0 After some experimenting I've found that it's choking on our source control's hidden directories, .arch-ids, which exist in every folder. I've tried manipulating build.gradle with the exclude keyword, to no avail: sourceSets { main { manifest.srcFile 'AndroidManifest.xml' java { srcDirs = ['src'] exclude '**/.arch-ids/*

manifestPlaceholders value is not string

亡梦爱人 提交于 2019-12-06 11:47:37
问题 In my AndroidManifest.xml file I have the following meta-data tag which should be populated dynamically: <meta-data android:name="com.facebook.sdk.ApplicationId" android:value="${FACEBOOK_APP_ID}"/> My gradle file looks like this: manifestPlaceholders = [ GOOGLE_PROJECT_ID: "A888844613784", FACEBOOK_APP_ID: "888570042741264" ] After "Build & Assemble" the FACEBOOK_APP_ID in the manifest file looks like this: <meta-data android:name="com.facebook.sdk.ApplicationId" android:value="1481023616

Android studio(2.1.1 April 28-2016) Strange Error converting bytecode to dex. Dex cannot parse version 52 byte code

旧城冷巷雨未停 提交于 2019-12-06 11:29:43
I'm trying to build my project and get this strange error (cause all worked perfectly in previous AS versions) Error:Error converting bytecode to dex: Cause: Dex cannot parse version 52 byte code. This is caused by library dependencies that have been compiled using Java 8 or above. If you are using the 'java' gradle plugin in a library submodule add targetCompatibility = '1.7' sourceCompatibility = '1.7' to that submodule's build.gradle file. I understand that the problem is that (as the error tells me) some of my dependencies was compiled with java ver.8 but how I know which one of them? Here

Gradle: How to create multiple jar?

江枫思渺然 提交于 2019-12-06 11:29:12
I'm new to Gradle and Groovy, and I'd hope there would be something to solve my problem. I have several packages, each of which needs to be compiled into one jar. One solution I've found is to create multiple tasks that are of Jar type, but I'd like to avoid copy/paste and end up with a giant gradle file whenever I add a new package to my project. My current implementation is to have multiple jar tasks, like this one : task jarFoo(type: Jar) { baseName = "foo" version = "1.0.0" String className = baseName.capitalize() from(sourceSets.main.output) { include "$baseName/**" } from {

Gradle embedded jetty plugin is not stopping automatically

狂风中的少年 提交于 2019-12-06 10:42:40
问题 I am able to run embedded jetty with gradle jettyRunWar command. However, it is not automatically stopped on program termination. I tried below two code after searching the solution on stackoverflow and other forums. But none works. 1) build.gradle apply plugin: 'jetty' task runJetty() { jettyStop.stopPort = 8090 dependsOn jettyRunWar finalizedBy jettyStop } 2) build.gradle apply plugin: 'jetty' task runJetty() { doFirst { jettyRunWar.stopPort = 8090 jettyRunWar.stopKey = 'stopKey'