build.gradle

Entry name 'AndroidManifest.xml' collided (Build failed after updating the android gradle plugin to 3.6.0)

孤者浪人 提交于 2020-05-25 06:27:08
问题 I have recently update the Android studio from 3.5(stable) to 3.6(stable). Then I saw the plugin update is also available, so I have update the version of "com.android.tools.build:gradle" from 3.5.0 to 3.6.0 and also update the gradle version to 5.6.4 Now problem starts when I try to build the project it fails with message Entry name 'AndroidManifest.xml' collided 回答1: This is caused by Android Gradle plugin 3.6, revert to using the old packaging tool by including the following in your gradle

Entry name 'AndroidManifest.xml' collided (Build failed after updating the android gradle plugin to 3.6.0)

怎甘沉沦 提交于 2020-05-25 06:26:38
问题 I have recently update the Android studio from 3.5(stable) to 3.6(stable). Then I saw the plugin update is also available, so I have update the version of "com.android.tools.build:gradle" from 3.5.0 to 3.6.0 and also update the gradle version to 5.6.4 Now problem starts when I try to build the project it fails with message Entry name 'AndroidManifest.xml' collided 回答1: This is caused by Android Gradle plugin 3.6, revert to using the old packaging tool by including the following in your gradle

org.gradle.internal.exceptions.LocationAwareException:, org.gradle.api.ProjectConfigurationException:, AndroidStudio3.5.3

一曲冷凌霜 提交于 2020-05-17 05:45:07
问题 After Updating Android Studio, not building Android Project, before it was building, Below is the exception, org.gradle.internal.exceptions.LocationAwareException: A problem occurred configuring root project 'MyApplication'. at org.gradle.initialization.exception.DefaultExceptionAnalyser.transform(DefaultExceptionAnalyser.java:99) at org.gradle.initialization.exception.DefaultExceptionAnalyser.collectFailures(DefaultExceptionAnalyser.java:62) at org.gradle.initialization.exception

How do I change unixStartScriptGenerator.template in the createStartScripts task so that distTar uses my custom template file in build.gradle?

我们两清 提交于 2020-05-14 20:44:27
问题 I need to modify the start script that gradle generates for the distTar task. I seem to be able to set unixStartScriptGenerator.template as shown below, but when I unpack the script from the tar my changes are not there. This is my full build.gradle : apply plugin: 'java' apply plugin: 'war' // to use the main method in Main, which uses Jetty apply plugin: 'application' mainClassName = 'com.example.Main' project.version = '2017.0.0.0' repositories { mavenLocal() mavenCentral() } task

Setting environment variables in build.gradle.kts

China☆狼群 提交于 2020-05-13 14:54:11
问题 In groovy you can set environment variables with environment key value . For example for run you can do: run { environment DB_HOST "https://nowhere" } How can I accomplish this in Kotlin in build.gradle.kts? 回答1: Like this: tasks { "run"(JavaExec::class) { environment("DB_HOST","https://nowhere") } } Or if you like the delegation property style: val run by tasks.getting(JavaExec::class) { environment("DB_HOST","https://nowhere") } 来源: https://stackoverflow.com/questions/53222927/setting

Gradle Sync Failed Android Studio 3.6 [duplicate]

会有一股神秘感。 提交于 2020-05-11 03:57:40
问题 This question already has answers here : Cannot enable Gradle's offline mode on Android Studio 3.6 (9 answers) Closed 2 months ago . I have just updated the Android Studio from 3.5.3 to 3.6. After this update, I have updated the Gradle and Android SDK Build Tools as well. Now the Gradle sync is failing with these errors: 1. org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration$ArtifactResolveException: Could not resolve all artifacts for configuration ':classpath'. 2. org

Gradle Sync Failed Android Studio 3.6 [duplicate]

不羁岁月 提交于 2020-05-11 03:57:06
问题 This question already has answers here : Cannot enable Gradle's offline mode on Android Studio 3.6 (9 answers) Closed 2 months ago . I have just updated the Android Studio from 3.5.3 to 3.6. After this update, I have updated the Gradle and Android SDK Build Tools as well. Now the Gradle sync is failing with these errors: 1. org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration$ArtifactResolveException: Could not resolve all artifacts for configuration ':classpath'. 2. org

Excluding the same group from multiple dependencies in gradle?

走远了吗. 提交于 2020-05-10 04:26:45
问题 I have the following code in the build.gradle in the app module of my Android project implementation('com.google.firebase:firebase-core:16.0.1', { exclude group: 'com.android.support' }) implementation('com.google.firebase:firebase-database:16.0.1', { exclude group: 'com.android.support' }) implementation('com.google.firebase:firebase-auth:16.0.1', { exclude group: 'com.android.support' }) implementation('com.google.firebase:firebase-crash:16.0.1', { exclude group: 'com.android.support' })

Excluding the same group from multiple dependencies in gradle?

非 Y 不嫁゛ 提交于 2020-05-10 04:26:13
问题 I have the following code in the build.gradle in the app module of my Android project implementation('com.google.firebase:firebase-core:16.0.1', { exclude group: 'com.android.support' }) implementation('com.google.firebase:firebase-database:16.0.1', { exclude group: 'com.android.support' }) implementation('com.google.firebase:firebase-auth:16.0.1', { exclude group: 'com.android.support' }) implementation('com.google.firebase:firebase-crash:16.0.1', { exclude group: 'com.android.support' })

build.gradle - Could not find method copyDeps() for arguments

落爺英雄遲暮 提交于 2020-04-17 21:30:49
问题 Below is the build.gradle file: plugins({ id('application') id 'java' id('com.github.johnrengelman.shadow').version('4.0.1') }) allprojects( { apply(plugin: 'application') apply(plugin: 'java') apply(plugin: 'com.github.johnrengelman.shadow') repositories({ mavenCentral() }) ext({ vertxVersion = '3.7.0' commitTimestamp = { return "git log -1 --pretty=format:%cd --date=format:%Y%m%d%H%M%S".execute().text.trim() } commitId = { return "git rev-parse --short HEAD".execute().text.trim() } buildId