I have the following error while performing the gradle build command.
What went wrong:
Execution failed for task ':asciidoctor'.
> Cannot locate a Guava JAR in the Gradle distribution
I'm using macOS Big Sur.
I had the same issue on my system.
It appears the problem was the use of the "3.2.0" version of "asciidoctor" plugins. The gradle version I'm currently using is "7.2".
This is the plugins section that was causing the problem:
plugins {
id("org.asciidoctor.jvm.pdf") version "3.2.0"
id("org.asciidoctor.jvm.gems") version "3.2.0"
id("org.asciidoctor.jvm.convert") version "3.2.0"
}
The fix was just to update the versions of these plugins to the latest version, which is "3.3.2".
Related
I have a problem with Gradle. I'm trying to make a mod for Minecraft 1.12.2 and I'm using Intellij IDEA. Everything works fine for the version 1.16.4, but if I want to build a mod for the 1.12 I get this error:
Failed to apply plugin 'net.minecraftforge.gradle'.
Found Gradle version Gradle 7.4. Versions Gradle 6.0.0 and newer are not supported in FG3, FG4 however supports Versions 6.8.1 and newer. Consider upgrading.
It's supposed to do something with apply plugin: 'net.minecraftforge.gradle' in the build.gradle file.
I don't have much experience with this sort of stuff so please help me. Thanks in advance
to write a mod for 1.12.2, Forge provides a build.gradle file. In this, the 3.+ (FG3) is specified as the ForgeGradle version.
The current version of Gradle (7.4.2) only supports ForgeGradle versions from FG4 and newer.
FG3 - older than Gradle version 6.0.0
FG4 - Gradle version 6.8.1 and newer
You now have two options:
You take the Gradle version 7.4.2 and make a mod for a Minecraft version with a ForgeGradle version from FG4 or newer.
You take an older Gradle version.
I have dependencies on several plugins in project. These dependencies are put in plugins directory during project build. Here is the example:
plugin 'com.company:some-plugin:1.0#msi'
plugin 'com.company:some-plugin:1.0#pkg'
Now it is time to upgrade plugin version but for some reason I want to keep version of plugin for Mac (pkg) unchanged:
plugin 'com.company:some-plugin:2.0#msi'
plugin 'com.company:some-plugin:1.0#pkg'
How can I do it? Regular force does not help. What I see now is that Gradle upgrades version of all dependencies without considering of extension.
P.S. I use Gradle 5.2
What is the highest version of
com.android.tools.build:gradle
that Android Studio 3.0 can support?
I'm currently using
classpath 'com.android.tools.build:gradle:3.1.0'
with gradle version 4.4.
I tried using
classpath 'com.android.tools.build:gradle:3.2.1'
but AndroidStudio warns about compatibility with gradle version 4.4, even when it's already set to 4.4. I tried using gradle 4.6, 4.10, but the warning keeps popping up. Is this a bug in AndroidStudio 3.0?
I'm asking this question because I'm trying to use androidx.databinding on AndroidStudio 3.0, and there hasn't been many results when googling this topic. Would appreciate any comments about this issue.
Thanks.
I have an Android project which is successfully building. I'm using the latest version of Android Studio (3.2.1), Gradle 4.7 and Gradle build tools 3.2.1. All working well.
build.gradle (buildscript subsection):
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
gradle/wrapper/gradle-wrapper.properties:
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.7-all.zip
So maybe your issue is that you need to upgrade your Gradle wrapper to download Gradle 4.7 instead?
I was previously using Gradle 2.3 and the Gradle Android plugin 1.3.1.
After upgrading to 4.0.1 and 2.3.0 respectively, my build fails with the following message:
Task with name 'packageReleaseJar' not found in project
Is there a compatibility problem between these versions of Gradle? I believe this is not a custom defined task.
I keep on getting "Gradle Sync error" so i checked had version 1.8. updated to 1.10, then it said i need 1.9, so i downgraded to 1.9 it said i need 1.8, when i downgrade to 1.8 it says i need 1.9.
15:28:09 Failed to refresh Gradle project 'Calendar'
You are using Gradle version 1.8, which is not supported. Please use version 1.9.
Please point to a supported Gradle version in the project's Gradle settings or in the project's Gradle wrapper (if applicable.)
Fix Gradle wrapper and re-import project Gradle settings
15:28:26 Failed to refresh Gradle project 'Calendar'
You are using Gradle version 1.10, which is not supported. Please use version 1.9.
Please point to a supported Gradle version in the project's Gradle settings or in the project's Gradle wrapper (if applicable.)
Fix Gradle wrapper and re-import project Gradle settings
15:28:39 Failed to refresh Gradle project 'Calendar'
Gradle version 1.8 is required. Current version is 1.9. If using the gradle wrapper, try editing the distributionUrl in
C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Android
Studio\gradle\wrapper\gradle-wrapper.properties to gradle-1.8-all.zip.
Please fix the project's Gradle settings.
Gradle 1.10 is not yet supported in AS, Android Tools Developer team is working on it and probably will be available in next release.
As of now make sure all your build.gradle files in the project using gradle 1.9 as dependency
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.7.+'
}
}
Update :
Gradle 1.10 is now supported in Android studio after release 0.4.3, so going forward you can start using 1.10 plugin by using 0.8.+ in your classpath like this
classpath 'com.android.tools.build:gradle:0.8.+'