gradle

Unable to get Gradle wrapper properties

我们两清 提交于 2020-07-14 06:34:06
问题 I get the following error when I am trying to import the project. Unable to get Gradle wrapper properties from: F:\projects\Polyfills\cordova\platforms\android\gradle\wrapper\gradle-wrapper.properties Would you like to recreate the wrapper using the latest supported Gradle version? Click 'OK' to recreate files, or 'Cancel' to manually set the path of a local Gradle distribution. 回答1: It seems like the distributionUrl is missing in gradle-wrapper.properties of your project. gradle-wrapper

A gradle task take long time to execute and doesn't produce any response. I want to execute that task and move on to next task

时光毁灭记忆、已成空白 提交于 2020-07-10 08:43:44
问题 Inside build.gradle file: task updateJson(){ //updates a json file } task Conn(type: NodeTask, dependsOn: updateJson){ script = file("connect.js") } yarn_test.dependsOn Conn Console Output: :updateJson :Conn Before config :: Connect.js has been executed. Your app is now listening to port 6062. <===========--> 85% EXECUTING > :Conn After that, the yarn_test doesn't start. The task Conn is used to establish a connection and it doesn't return any execution response/result. It only enables

How to get gradle property from command line?

我与影子孤独终老i 提交于 2020-07-10 08:43:07
问题 I am trying read a project property from command line interface. There is a task gradle properties , which prints all of them. Therefore, I can write: gradle properties | grep "rootProject: root project" | awk '{print $NF}' | tr -d "'" and get what I want. The returned result is correct. I would like to use a proper gradle command to achieve the same result. What is a gradle command to get the project name? this is my build.gradle : plugins { id 'java' } tasks.register("rootProjectName") {

Android Studio offline add `Android plugin for Gradle`

南笙酒味 提交于 2020-07-10 07:44:42
问题 I use Android Studio 3.1.2 with Gradle 4.4 and have to force Gradle to do off-line work , because when I use it normally (on-line), it takes to long to sync and fails. At first I got this error: No cached version of com.android.tools.build:gradle:3.1.2 available for offline mode. Disable Gradle 'offline mode' and sync project So I downloaded gradle-3.1.2.jar , put it in <project root>/libs/ and change build.gradle of my project to this state: buildscript { repositories { google() jcenter()

Android studio 3.6.1: A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade

我怕爱的太早我们不能终老 提交于 2020-07-10 03:14:43
问题 I recently updated gradle and android studio to 3.6.1 version. but, it always fails to build apk file and show the following error: * What went wrong: Execution failed for task ':app:mergeReleaseResources'. > Multiple task action failures occurred: > A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade > AAPT2 aapt2-3.6.1-6040484-windows Daemon #4: Daemon startup failed Please check if you installed the Windows Universal C Runtime. This should not

Gradle build error on Windows “Failed to create MD5 hash for file”

a 夏天 提交于 2020-07-08 11:20:36
问题 I am running a gradle build on a existing project and I run into this error below. What went wrong: Failed to capture snapshot of output files for task 'someTask' property 'destinationDir' during up-to-date check. Failed to create MD5 hash for file 'my_project_dir\.gradle\3.5\fileContent\fileContent.lock'. Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. I ran with --stacktrace option, it complains about a file being locked in

New sourceSet by gradle cannot be seen in Eclipse

梦想与她 提交于 2020-07-06 19:18:38
问题 I have created additional source set called "integration-test" in my gradle project. Ewerything works fine, but eclipse cannot see dependency classes defined exactly for this source set. subprojects { apply plugin: 'java' apply plugin: 'eclipse' repositories { mavenCentral() } sourceSets { integrationTest { java { compileClasspath += main.output + test.output runtimeClasspath += main.output + test.output srcDir file('src/integration-test/java') } resources.srcDir file('src/integration-test

No enum constant org.gradle.api.JavaVersion.VERSION_14

陌路散爱 提交于 2020-07-06 10:52:08
问题 Using Intellij IDEA, I created a new Gradle project using Gradle 6.4 and Java 14, but when I try to build the project, I'm getting this error : No enum constant org.gradle.api.JavaVersion.VERSION_14 What do I do ? Edit 1 : I'm using the latest EAP version of IDEA. 回答1: It is known issue with 2020.2 EAP version: IDEA-243097. Will be fixed in the next EAP update (expected next week). Sorry for the inconvenience. As a workaround please downgrade IDE version. 来源: https://stackoverflow.com

No enum constant org.gradle.api.JavaVersion.VERSION_14

二次信任 提交于 2020-07-06 10:50:05
问题 Using Intellij IDEA, I created a new Gradle project using Gradle 6.4 and Java 14, but when I try to build the project, I'm getting this error : No enum constant org.gradle.api.JavaVersion.VERSION_14 What do I do ? Edit 1 : I'm using the latest EAP version of IDEA. 回答1: It is known issue with 2020.2 EAP version: IDEA-243097. Will be fixed in the next EAP update (expected next week). Sorry for the inconvenience. As a workaround please downgrade IDE version. 来源: https://stackoverflow.com

Expected BEGIN_ARRAY but was BEGIN_OBJECT at line 1 column 2 path $ on generate APK

ぐ巨炮叔叔 提交于 2020-07-06 09:32:28
问题 My project is run on AVD properly. but when i try to generate signed APK, gradle get this error: FAILURE: Build failed with an exception. * What went wrong: java.lang.IllegalStateException: Expected BEGIN_ARRAY but was BEGIN_OBJECT at line 1 column 2 path $ > Expected BEGIN_ARRAY but was BEGIN_OBJECT at line 1 column 2 path $ * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. * Get more