Gradle suddenly broke - scala

I haven't modified any build files (and even tried reverting code), but Gradle started crashing on this:
FAILURE: Build failed with an exception.
* What went wrong:
A problem was found with the configuration of task ':macros:compileScala'.
> No value has been specified for property 'zincClasspath'.
* Try:
Run with --info or --debug option to get more log output.
* Exception is:
org.gradle.api.tasks.TaskValidationException: A problem was found with the configuration of task ':macros:compileScala'.
at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:55)
at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:52)
at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53)
at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:203)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:185)
at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:66)
at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:50)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:25)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:110)
I was writing tests and after one run it just stopped working. Any ideas why it happened and how to fix it?
PS: Search only returned https://stackoverflow.com/a/43085471/1017211 which didn't help and I don't see any reason to update Gradle since it was working nicely with current version.

Have you tried on Android Studio:
File > Invalidate Caches / Restart...
and/or
Tools > Android > Sync Projects with Gradle Files
You can also delete the .gradle folder, then rebuild the project...

Related

Your project should have a settings.gradle

Hi I'm try to build a flutter app on git lab and every time its fails and show me the Error below:
Executing Gradle tasks as part of a build without a settings file
is not supported. Make sure that you are executing Gradle from a
directory within your Gradle project. Your project should have a
'settings.gradle(.kts)' file in the root directory.
I changed the location of the file setting.gradle and not work
any help??
the root of gradle
After searching and going through various trial and error methods, I finally tried the gradle init command and it fixed the issue. Alththough the settings.gradle file was already present but somehow its not seen by gradle itself, and initializing gradle fixed the error for me.

* What went wrong: A problem occurred evaluating project ':app'. > org/bouncycastle/operator/OperatorCreationException

In Every flutter build, even in a fresh one, I'm getting the same error1
lib/main.dart:1
FAILURE: Build failed with an exception.
* Where:
Build file '/home/aabirsark/Desktop/projects/rx_converter/android/app/build.gradle' line: 24
* What went wrong:
A problem occurred evaluating project ':app'.
> org/bouncycastle/operator/OperatorCreationException
* 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 help at https://help.gradle.org
BUILD FAILED in 28s
Exception: Gradle task assembleDebug failed with exit code 1
Exited (sigterm)
Pls help me with this... I'm really stuck with it and can't make more progress pls help!!!
6 Steps:
click on Project Structure (folder with 3 dot icon next to Stop icon).
Project Structure --> Project Settings --> Project
under Project SDK: Select Android API 30 Platform
click Apply --> OK
click on Project Structure (folder with 3 dot icon next to Stop icon).
Project Structure --> Project Settings --> Modules
click + icon --> Apply --> OK
Use latest Gradle
Set the JDK version to Embedded JDK
For MAC:
Android Studio > Preferences... > Build, Execution, Deployment > Build Tools > Gradle Under Gradle JDK
choose the Embedded JDK option. Click OK.
For windows:
select File > Settings... > Build, Execution, Deployment > Build Tools > Gradle Under Gradle JDK
choose the Embedded JDK option.
--add-opens If you have to allow code on the class path to do deep reflection to access nonpublic members, then use the --add-opens runtime option.
Some libraries do deep reflection, meaning setAccessible(true), so they can access all members, including private ones. You can grant this access using the --add-opens option on the java command line. No warning messages are generated as a result of using this option.
If --illegal-access=deny, and you see IllegalAccessException or InaccessibleObjectException messages at runtime, you could use the --add-opens runtime option, basing the arguments upon the information shown in the exception message.
config jvm option Since version 9, the Java compiler can be configured to produce bytecode for an older Java version while making sure the code does not use any APIs from a more recent version. Gradle now supports this release flag on CompileOptions directly for Java compilation. This option takes precedence over the properties described below.
Due to a bug in Java 9 that was fixed in Java 10, Gradle cannot leverage the release flag when compiling with Java 9.
This should solve..

Is a Gradle file affected when you add new files

On Github while working with my friend on some code (actually experimental malware for pentesting), we set up a Gradle check, and it failed. When it ran, it said this:
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'wurstplus-two'.
> Could not resolve all artifacts for configuration ':classpath'.
> Could not resolve net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT.
Required by:
project :
> Could not resolve net.minecraftforge.gradle:ForgeGradle:2.3-SNAPSHOT.
> Unable to load Maven meta-data from http://repo.spongepowered.org/maven/net/minecraftforge/gradle/ForgeGradle/2.3-SNAPSHOT/maven-metadata.xml.
> Could not get resource 'http://repo.spongepowered.org/maven/net/minecraftforge/gradle/ForgeGradle/2.3-SNAPSHOT/maven-metadata.xml'.
> Could not GET 'http://repo.spongepowered.org/maven/net/minecraftforge/gradle/ForgeGradle/2.3-SNAPSHOT/maven-metadata.xml'. Received status code 520 from server: Origin Error
> Could not resolve org.spongepowered:mixingradle:0.4-SNAPSHOT.
Required by:
project :
> Skipped due to earlier error
* 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 help at https://help.gradle.org
BUILD FAILED in 11s
Error: Process completed with exit code 1.
I know we added some files, so I was thinking that might be what happened. I don't know any Gradle, so that's really why I'm asking.
There's actually 2 questions: What does "exit code 1" mean, and was it triggered by those new files being added? The Github repository is here: https://github.com/Scottw1e/wurstplus-two.
try replacing http://repo.spongepowered.org/maven/ with https://repo.spongepowered.org/maven/ in your build.gradle file

when i run my flutter app ,there emerge a unexpected problem , error :

What went wrong:
Could not determine the dependencies of task ':app:preDebugBuild'.
Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'.
Could not resolve project :path_provider_macos.
Required by:
project :app > project :path_provider
Unable to find a matching configuration of project :path_provider_macos: None of the consumable configurations have attributes.
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 help at https://help.gradle.org
BUILD FAILED in 2s
Finished with error: Gradle task assembleDebug failed with exit code 1
Some imports are missing. Try flutter pub get to update packages, or flutter pub cache repair, which will re-import all dependencies.
thank everyone , i get the solution about my problem : go to your Flutter sdk folder ,then go to .pub-cache\hosted\pub.dartlang.org\ ,if there have a path_provider_macos-0.0.4 folder ,delete it ,if no ,you try go .pub-cache\hosted\pub.flutter-io.cn\ , and remove path_provider_macos-0.0.4 folder
Deleted the folder you said,but show this wrong : Project :flutter declares a dependency from configuration 'embed' to configuration 'default' which is not declared in the descriptor for project :path_provider_macos.
The following is detailed:
> A problem occurred configuring project ':flutter'.
> Could not resolve all dependencies for configuration ':flutter:embed'.
> Could not resolve project :path_provider_macos.
Required by:
project :flutter
> Project :flutter declares a dependency from configuration 'embed' to configuration 'default' which is not declared in the descriptor for project :path_provider_macos.
> Could not resolve project :path_provider_linux.
Required by:
project :flutter
> Project :flutter declares a dependency from configuration 'embed' to configuration 'default' which is not declared in the descriptor for project :path_provider_linux.

How can I build the OpenIAB unity package using gradle?

I've got problems at building the OpenIAB unity package.
The sdk.dir is already set in the local.properties file.
This is the log:
Denniss-MBP:unity_plugin dennisxxx$ ../gradlew clean buildPlugin --info
Starting Build
Settings evaluated using settings file '/Volumes/Daten HDD/Downloads/OpenIAB-Unity-Plugin-446cc2f310a2b13bcfdb93cf92ac5f9128d51f62/settings.gradle'.
Projects loaded. Root project using build file '/Volumes/Daten HDD/Downloads/OpenIAB-Unity-Plugin-446cc2f310a2b13bcfdb93cf92ac5f9128d51f62/build.gradle'.
Included projects: [root project 'OpenIAB-Unity-Plugin-446cc2f310a2b13bcfdb93cf92ac5f9128d51f62', project ':Unity Plugin', project ':library']
Evaluating root project 'OpenIAB-Unity-Plugin-446cc2f310a2b13bcfdb93cf92ac5f9128d51f62' using build file '/Volumes/Daten HDD/Downloads/OpenIAB-Unity-Plugin-446cc2f310a2b13bcfdb93cf92ac5f9128d51f62/build.gradle'.
Evaluating project ':Unity Plugin' using build file '/Volumes/Daten HDD/Downloads/OpenIAB-Unity-Plugin-446cc2f310a2b13bcfdb93cf92ac5f9128d51f62/unity_plugin/build.gradle'.
Evaluating project ':library' using empty build file.
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':Unity Plugin'.
> Configuration with name 'default' not found.
* Try:
Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output.
BUILD FAILED
Total time: 4.414 secs
Denniss-MBP:unity_plugin dennisxxx$
What can I do to fix this issue?