build.gradle

Whats the meaning of “with” in gradle

折月煮酒 提交于 2019-12-02 00:04:10
In the answer https://stackoverflow.com/a/35879150 there is a with in the last line: task gen (type: Jar) { description "Generates JAR without version number." archiveName = filename + ".jar" manifest {attributes 'Main-Class': mainFile} with jar } What is the exact meaning, and where is it documented? I couldn't find it in the gradle documentation and the with in groovy ( http://groovy-lang.org/style-guide.html#_using_with_for_repeated_operations_on_the_same_bean ) seems to be different. In your case you are calling the with() -method of the Jar class. (see the very bottom of the Jar DSL

How to fix “build.gradle” problem in a Cordova project?

不打扰是莪最后的温柔 提交于 2019-12-01 23:35:26
$ cordova build android --debug Checking Java JDK and Android SDK versions ANDROID_SDK_ROOT=undefined (recommended setting) ANDROID_HOME=E:\andoidSDK (DEPRECATED) Subproject Path: CordovaLib Subproject Path: app > Configure project :app WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'. It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html Project evaluation failed including an error in afterEvaluate {}. Run with --stacktrace for details of the afterEvaluate {} error.

How to prevent Cordova build command from auto-generating settings.gradle

女生的网名这么多〃 提交于 2019-12-01 22:38:59
问题 I have created a Cordova App with a custom settings.gradle as folows: // GENERATED FILE - DO NOT EDIT include ":" include ":CordovaLib" include 'manager' project(':manager').projectDir = new File('libs/ConnectManager') and in build.gradle, I can refer to it as: dependencies { compile fileTree(dir: 'libs', include: '*.jar') // SUB-PROJECT DEPENDENCIES START debugCompile project(path: "CordovaLib", configuration: "debug") releaseCompile project(path: "CordovaLib", configuration: "release") //

Which Java SE versions work with android studio 3.1?

霸气de小男生 提交于 2019-12-01 22:30:58
问题 Which Java SE version works with android studio 3.1? I recently installed Java SE 10 on Windows 10, but android studio always displays Gradle sync failed message with the following error: Could not determine Java version using executable C:\program Files\java\jdk-10\bin\java.exe 回答1: The maximum possible version for Android Studio 3.1 is Java 8. Also, some of the features of Java 8 are unavailable for lower API versions. For example, my minimum API version is 16 and if I try to use stream , I

I get an error : class file for com.google.android.gms.internal.zzbgl not found

天涯浪子 提交于 2019-12-01 20:54:33
I get an error when checking the bounds for null: boundsBuilder.include(new LatLng(loc.getLocation().getLat(), loc.getLocation().getLng())); bounds = boundsBuilder.build(); if (bounds != null) { LatLng northEast = bounds.northeast; LatLng southWest = bounds.southwest; double movingDistance = SphericalUtil.computeDistanceBetween(northEast, southWest); Log.i("TRIP", "checkoutTime movingDIstance is:" + movingDistance); if (movingDistance >= kPSGeofencingShortDistance) { break; } if (activeTrip.getDeparture_time() < time + 1) time = loc.getTimestamp() / 1000 + 1; Log.i("TRIP", "checkoutTime time

Which Java SE versions work with android studio 3.1?

纵然是瞬间 提交于 2019-12-01 20:49:22
Which Java SE version works with android studio 3.1? I recently installed Java SE 10 on Windows 10, but android studio always displays Gradle sync failed message with the following error: Could not determine Java version using executable C:\program Files\java\jdk-10\bin\java.exe Sushobh Nadiger The maximum possible version for Android Studio 3.1 is Java 8. Also, some of the features of Java 8 are unavailable for lower API versions. For example, my minimum API version is 16 and if I try to use stream , I get errors because these features are available only for API 24 and higher. You can use

Why do packages from library module does not exist upon compilation, even when Android Studio shows no errors in code?

余生颓废 提交于 2019-12-01 20:29:40
I have a library module (AndEngine) inside my libs/AndEngine folder. The code from that compiles fine. In my root settings.gradle file I have this : include ':app:libs:AndEngine' include ':app' And then in my app's build.gradle file I have this in dependencies: compile project('libs:AndEngine') INside my app's code, all of the imports and even autocompletion works without any errors at all. Inside Android Studio, all of the packages are found. But when I go to compile, I get about a hundred of these errors: error: package org.andengine.entity.primitive does not exist import org.andengine

android-kotlin error : unresolved reference databinding & ActivityMainBinding

若如初见. 提交于 2019-12-01 20:13:21
问题 I am using Android Studio 3.0 Canary 6 version. I've enabled dataBinding in my class and the code doesn't show any error. But, when I build an APK, the build fails and shows the following error: Error:(8, 37) Unresolved reference: databinding Error:(22, 26) Unresolved reference: ActivityMainBinding Error:(38, 50) Unresolved reference: ActivityMainBinding Error:(43, 52) Unresolved reference: ActivityMainBinding Error:(46, 52) Unresolved reference: ActivityMainBinding Error:(49, 52) Unresolved

Android studio with experimental gradle 0.2.0

≯℡__Kan透↙ 提交于 2019-12-01 19:49:25
I am trying to setup a basic ndk build with the latest version of android studio at this moment. Trying to follow this tutorial This is my gradle-wrapper.properties #Thu Sep 17 14:22:34 CST 2015 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists distributionUrl=https\://services.gradle.org/distributions/gradle-2.5-all.zip This is the project build.gradle // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { repositories { jcenter() } dependencies { classpath 'com

Unable to build feature modules in a multi-flavor app

廉价感情. 提交于 2019-12-01 18:12:03
I am using Gradle 4.4 with Gradle-Android plugin 3.1.1 on Android Studio 3.1.1. I have 2 flavors 'a' and 'b' and I am unable to build my project due to the following error: Cannot choose between the following configurations of project :app: - aDebugMetadataElements - bDebugMetadataElements All of them match the consumer attributes: - Configuration 'aDebugMetadataElements': - Required com.android.build.api.attributes.BuildTypeAttr 'debug' and found compatible value 'debug'. - Found com.android.build.api.attributes.VariantAttr 'aDebug' but wasn't required. - Required com.android.build.gradle