Having trouble installing bndTools with Gradle? - eclipse

I have Gradlev2.9 installed. I also have bndTools downloaded from https://github.com/bndtools/bndtools. I am running on a closed network so no Interwebs. I deleted the Ivy repository since we dont have Ivy, its in the settings.gradle file under repository{}. I also commented out the attempted connection in gradle.properties file.
Also, I attempted to put the missing jar files directly into the root bndTools folder and gradle still didnt pick them up.
Am I missing something...?
C:\Program Files\bndTools\bndtools-master>gradle -v
Gradle 2.9
Build time: 2015-11-17 07:02:17 UTC
Build number: none
Revision: b463d7980c40d44c4657dc80025275b84a29e31f
Groovy: 2.4.4
Ant: Apache Ant(TM) version 1.9.3 compiled on December 23 2013
JVM: 1.8.0_31 (Oracle Corporation 25.31-b07)
OS: Windows 8.1 6.3 amd64
C:\Program Files\bndTools\bndtools-master>
My Error:
FAILURE: Build failed with an exception.
Where:
Settings file 'C:\Program Files\bndTools\bndtools-master\settings.gradle' line: 28
What went wrong:
A problem occurred evaluating settings 'bndtools-master'.
Could not resolve all dependencies for configuration 'classpath'.
Cannot resolve external dependency biz.aQute.bnd:biz.aQute.bnd.gradle:latest because no repositories are defined.
Required by:
unspecified:unspecified:unspecified
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 1.482 secs
Thanks!

Related

Gradle build fails through Terminal but is successful is eclipse

Task :compileJava FAILED
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':compileJava'.
error: invalid source release: 17
I have spent more than 5-6 hours fixing this issue. Due to this i am not able to run my application. Please help me out so that i can proceed
update: I am able to create build successfully in eclipse. but now it is failing with error
Error: Could not find or load main class com.abc.ABCServiceApp
Caused by: java.lang.ClassNotFoundException: com.abc.ABCServiceApp
and build is still failing through terminal with the same error
C:\Users\user\Documents\abc\def\xyzservice>gradle build
Task :compileJava FAILED
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':compileJava'.
error: invalid source release: 17
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
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
See https://docs.gradle.org/7.3.3/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 3s
3 actionable tasks: 1 executed, 2 up-to-date
Update: i want to run this project usinh openJDK-15
C:\Users\user1>java -version
openjdk version "15" 2020-09-15
OpenJDK Runtime Environment (build 15+36-1562)
OpenJDK 64-Bit Server VM (build 15+36-1562, mixed mode, sharing)
Update:
i think below is the problem. i want to run my application with java 15, but it is set to java 17, i tried changing it back to 15, but it again get set to 17
Update: lost my patience. Installed another eclipse and it workimg now
It was a IDE issue, somehow it was picking Java17 even though after setting it to 15. Thank you all for your reply. It helped at least to know the root cause. I uninstalled the eclipse and re-installed a fresh one. It works now

Error while launching flutter Application

I am new to flutter development so i followed the google getting started with flutter page as is.
When i used the andriod studio (or) visual studio to create a demo flutter application and try to run it on a emulator i get the below lines .
*Launching lib\main.dart on sdk gphone x86 arm in debug mode...
Running Gradle task 'assembleDebug'...
FAILURE: Build failed with an exception.
What went wrong:
Could not open settings generic class cache for settings file 'D:\personalnicknacks\softwares\flutter\hello_app_world\android\settings.gradle' (C:\Users\ing12703.gradle\caches\6.7\scripts\1fnwrr8g4rohfp291nvlxj5qe).
BUG! exception in phase 'semantic analysis' in source unit 'BuildScript' Unsupported class file major version 60
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 1s
Exception: Gradle task assembleDebug failed with exit code 1*
I have the tried following things.
1)Ensured my JAVA_HOME environment is correct pointing.
2)used the latest java version 16.0
3)used the andriod studio to install the flutter plugins.
4)have also tried to install the gradel manually using the page https://gradle.org/install/#manually
5)now even my gradel output is correct
C:\Users\ing12703>gradle -v
Welcome to Gradle 7.0.2!
Here are the highlights of this release:
File system watching enabled by default
Support for running with and building Java 16 projects
Native support for Apple Silicon processors
Dependency catalog feature preview
For more details see https://docs.gradle.org/7.0.2/release-notes.html
Gradle 7.0.2
Build time: 2021-05-14 12:02:31 UTC
Revision: 1ef1b260d39daacbf9357f9d8594a8a743e2152e
Kotlin: 1.4.31
Groovy: 3.0.7
Ant: Apache Ant(TM) version 1.10.9 compiled on September 27 2020
JVM: 16.0.1 (Oracle Corporation 16.0.1+9-24)
OS: Windows 10 10.0 amd64
The suggestion I got online was to downgrade the JDK to say a 12 or so but is that the only viable option or am i missing something?
OK another thing i did try now was to indeed delete JAVA SDK 16 and install the JAVA SDK 15 and it works like a charm.
However I still wonder how do we know when to upgrade to latest JAVA SDK? is some compatibility list of SDK and their respective versions available in flutter documentation?

ProcessException: Process "C:\Users\Ayushi Sharma\attempt\android\gradlew.bat" exited abnormally:

Error running Gradle:
ProcessException: Process "C:\Users\Ayushi Sharma\attempt\android\gradlew.bat" exited abnormally:
FAILURE: Build failed with an exception.
Where:
Build file 'C:\Users\Ayushi Sharma\attempt\android\app\build.gradle' line: 24
What went wrong:
A problem occurred evaluating project ':app'.
Failed to apply plugin [id 'com.android.application']
Minimum supported Gradle version is 5.4.1. Current version is 5.1.1. If using the gradle wrapper, try editing the
distributionUrl in C:\Users\Ayushi Sharma\attempt\android\gradle\wrapper\gradle-wrapper.properties to gradle-5.4.1-all.zip
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 0s
Command: C:\Users\Ayushi Sharma\attempt\android\gradlew.bat app:properties
Please review your Gradle project setup in the android/ folder.
Need help!!!!!!
To resolve, change com.android.tools.build:gradle:3.2.1 => com.android.tools.build:gradle:3.3.2, run flutter clean and try the build again.
According to the Gradle_release_note, the current (July 2019) version of the plugin and gradle are 3.4.2 and 5.1.1 respectively. I don't know if Flutter officially supports this version, although it seems to work on my project here and a clean build is markedly faster. The release notes cover some of the changes from 3.2.x => 3.3.x => 3.4.x.
To upgrade to the current version, edit android\gradle\wrapper\gradle-wrapper.properties to source Gradle 5.1.1, and then you're able to upgrade the Gradle plugin to 3.4.2.
Note that once gradle 5.1.1 is being used, you can still set the plugin version back to 3.2.1 to reproduce the issue.

Error when running new flutter installation

I'm using Flutter from stable channel, v1.9.1+hotfix.6, on Linux), Android SDK version 29.0.2 and Android Studio version 3.5. on ubuntu 18.4. All necessary PATHs are set.
The doctor summary shows no problems.
When I run "flutter build" I get the error:
Initializing gradle...
Resolving dependencies...
* Error running Gradle:
ProcessException: Process "/.../flutter/raw/android/gradlew" exited abnormally:
NDK is missing a "platforms" directory.
If you are using NDK, verify the ndk.dir is set to a valid NDK directory. It is currently set to
/.../android-sdk/ndk-bundle.
If you are not using NDK, unset the NDK variable from ANDROID_NDK_HOME or local.properties to remove this warning.
BUILD FAILED
Total time: 7.627 secs
Failed to notify ProjectEvaluationListener.afterEvaluate(), but primary configuration failure takes precedence.
java.lang.IllegalStateException: buildToolsVersion is not specified.
at com.google.common.base.Preconditions.checkState(Preconditions.java:173)
at com.android.build.gradle.BasePlugin.createAndroidTasks(BasePlugin.java:558)
...
...
at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:40)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
FAILURE: Build failed with an exception.
* Where:
Script '/.../flutter/packages/flutter_tools/gradle/flutter.gradle' line: 27
* What went wrong:
A problem occurred evaluating script.
> Could not find method google() for arguments [] on repository container.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Command: /... /flutter/raw/android/gradlew app:properties
Please review your Gradle project setup in the android/ folder.
How can the problem be fixed?
Per https://github.com/flutter/flutter/issues/53657#issuecomment-795808016, the recommended solution is now to simply upgrade your gradle version to 4.1.2 or higher.
classpath 'com.android.tools.build:gradle:4.1.2'
It appears that NDK is not on your PATH or the project is looking in the wrong place.
First verify you have NDK installed/.
Install NDK
Tick this box.
If NDK is indeed installed you will need to change project structure to point to the correct location.

Gradle Integration for Eclipse daemon startup failure

I am new to Eclipse Juno using the Gradle Integration for Eclipse plugin. I am at a loss why gradle works perfectly from the command line and as an external tool; but in Eclipse Juno Package Explorer menu: gradle task it fails constantly with the following stack trace:
Error while initializing classpath container
Unable to start the daemon process.
This problem might be caused by incorrect configuration of the daemon.
For example, an unrecognized jvm option is used.
Please refer to the user guide chapter on the daemon at http://gradle.org/docs/1.5/userguide/gradle_daemon.html
Please read below process output to find out more:
java.lang.IllegalArgumentException: URI has an authority component
at java.io.File.(File.java:423)
at org.gradle.api.internal.classpath.EffectiveClassPath.findAvailableClasspathFiles(EffectiveClassPath.java:41)
at org.gradle.api.internal.classpath.EffectiveClassPath.(EffectiveClassPath.java:32)
at org.gradle.api.internal.classpath.DefaultModuleRegistry.(DefaultModuleRegistry.java:61)
at org.gradle.api.internal.classpath.DefaultModuleRegistry.(DefaultModuleRegistry.java:55)
at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:41)
at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:32)
at org.gradle.launcher.daemon.bootstrap.GradleDaemon.main(GradleDaemon.java:22)
Could not fetch model of type 'EclipseProject' using Gradle distribution 'http://services.gradle.org/distributions/gradle-1.5-bin.zip'.
The env variables for GRADLE_HOME, GRADLE_USER_HOME, PATH are all setup correctly. From the command line gradle -v returns:
Gradle 1.6
Gradle build time: Tuesday, May 7, 2013 9:12:14 AM UTC
Groovy: 1.8.6
Ant: Apache Ant(TM) version 1.8.4 compiled on May 22 2012
Ivy: 2.2.0
JVM: 1.7.0_45 (Oracle Corporation 24.45-b08)
OS: Windows 7 6.1 amd64
Eclipse version:
Eclipse Java EE IDE for Web Developers.
Version: Juno Service Release 2
Build id: 20130225-0426
OS is Win7 64 on amd64 platform with 4GB of system memory so it show not be a memory issue and there are no gradle daemons running when I get the above stack trace in Eclipse Juno.
I have exhausted all means on the web, this site, and my team to resolve the issue. I need some help please.
Windows 7 sets the user.home as a UNC path.
Add -Duser.home=x:\ to your Eclipse INI file where "x" is a local drive name.
That should solve your problem
If you are using the Gradle plugin, ensure it is pointing to the correct Gradle installation. I get the error you show when I use the embedded Gradle that comes with Spring Tools Suite.