gradle

Could not find transform-api.jar

核能气质少年 提交于 2020-07-21 05:07:20
问题 I had a project which synced succesfully in last update of Android Studio . Its about 3 days that I update my android studio to version 3.3.2. After that, I can make a new project successfully but can't sync any of my last projects I don't know why. And the error is ( ERROR: Could not find transform-api.jar (com.android.tools.build:transform-api:2.0.0-deprecated-use-gradle-api). Searched in the following locations: https://dl.google.com/dl/android/maven2/com/android/tools/build/transform-api

Could not find transform-api.jar

孤人 提交于 2020-07-21 05:06:10
问题 I had a project which synced succesfully in last update of Android Studio . Its about 3 days that I update my android studio to version 3.3.2. After that, I can make a new project successfully but can't sync any of my last projects I don't know why. And the error is ( ERROR: Could not find transform-api.jar (com.android.tools.build:transform-api:2.0.0-deprecated-use-gradle-api). Searched in the following locations: https://dl.google.com/dl/android/maven2/com/android/tools/build/transform-api

No cached version of com.android.tools.build:aapt2:3.6.1-6040484 available for offline mode

余生颓废 提交于 2020-07-19 11:15:43
问题 Is there any offline option present in gradle setting of the latest version of android studio ? 回答1: Just disable gradle offline mode and try, will work fine. To disable offline mode in Android Studio 3.6.1 Click on gradle window (on right side of studio) Select the project Click Toggle Offline Mode button (disable here) 回答2: Check the SDK version installed in android studio in starting configure SDK manager and check that what version of android is installed.Install other version of android

Program type already present: com.google.common.util.concurrent.ListenableFuture

拟墨画扇 提交于 2020-07-18 10:38:31
问题 I have just converted my project to androidx and am now getting the "Program type already present" error for com.google.common.util.concurrent.ListenableFuture . I have looked through multiple stackoverflow solutions and some of the Gradle documentation and still can't get it to work. The problem is that there are two versions of ListenableFuture brought in by Gradle in these modules: Gradle: com.google.quava:quava:23.5jre@jar Gradle: com.google.guava:listenablefuture:1.0@jar I would guess

Android BuildConfig Field generating String incorrectly

馋奶兔 提交于 2020-07-18 10:22:31
问题 The last day starting a new project I was creating some variables in the build config as a good practice to handle them separately between release and debug builds like this: ... buildTypes { release { minifyEnabled false buildConfigField("String", "PARSE_APP_ID", "xxxxxxxxxxxxxxxxxxxxxxxxxxx") buildConfigField("String", "PARSE_CLIENT_ID", "xxxxxxxxxxxxxxxxxxxxxxxxxx") buildConfigField("String", "FACEBOOK_APP_ID", "999999999999999") proguardFiles getDefaultProguardFile('proguard-android.txt')

Gradle wrapper NoClassDefFoundError

故事扮演 提交于 2020-07-17 09:32:48
问题 When I run ./gradlew I get Exception in thread "main" java.lang.NoClassDefFoundError : org/gradle/wrapper/GradleWrapperMain Caused by: java.lang.ClassNotFoundException: org.gradle.wrapper.GradleWrapperMain at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass

Publish Java artifact to Maven Local with Gradle

断了今生、忘了曾经 提交于 2020-07-17 07:06:47
问题 I am facing a problem when trying to install a generated jar into my local Maven Repository. The message error just show me 'task 'publish' is not found' I am using this Gradle Script: buildscript { ext { springBootVersion = '1.3.2.RELEASE' } repositories { mavenCentral() } dependencies { classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}") } } apply plugin: 'java' apply plugin: 'eclipse' apply plugin: 'idea' apply plugin: 'spring-boot' apply plugin: 'maven

Publish Java artifact to Maven Local with Gradle

孤人 提交于 2020-07-17 07:06:06
问题 I am facing a problem when trying to install a generated jar into my local Maven Repository. The message error just show me 'task 'publish' is not found' I am using this Gradle Script: buildscript { ext { springBootVersion = '1.3.2.RELEASE' } repositories { mavenCentral() } dependencies { classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}") } } apply plugin: 'java' apply plugin: 'eclipse' apply plugin: 'idea' apply plugin: 'spring-boot' apply plugin: 'maven

Skip a task when running another task

北城以北 提交于 2020-07-15 11:17:04
问题 I added a task to my gradle project: task deploy() { dependsOn "build" // excludeTask "test" <-- something like this doFirst { // ... } } Now the build task always runs before the deploy task. This is fine because the build task has many steps included. Now I want to explicitly disable one of these included tasks. Usually I disable it from command line with gradle deploy -x test How can I exclude the test task programmatically? 回答1: You need to configure tasks graph rather than configure the

Unable to get Gradle wrapper properties

帅比萌擦擦* 提交于 2020-07-14 06:34:33
问题 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