Snippets tagged “gradle”
19 snippets use this tag.
- Execution Failed for task :app:compileDebugJavaWithJavac in Android StudioJava
Execution failed for task :app:compileDebugJavaWithJavac is an error message that can occur when you are trying to build an Android project in Android Studio.
- Failed to install android-sdk: "java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema"Java
The java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema error can occur if the required Java XML Binding (JAXB) classes are not present on the classpath.
- Getting java.lang.ClassNotFoundException: org.apache.commons.logging.LogFactory exceptionJava
The java.lang.ClassNotFoundException: org.apache.commons.logging.LogFactory exception is thrown when a Java application is unable to find the LogFactory class from the Apache Commons Logging library.
- Gradle build without testsJava
To build a Gradle project without running the tests, you can use the assemble task instead of the build task.
- How can I solve "java.lang.NoClassDefFoundError"?Java
java.lang.NoClassDefFoundError is an error that occurs when the Java Virtual Machine (JVM) can't find a required class definition at runtime. This can happen for a variety of reasons, including:
- How do I connect to a SQL Server 2008 database using JDBC?Java
To connect to a SQL Server database using JDBC, you will need to use the JDBC driver for SQL Server.
- How do I import the javax.servlet / jakarta.servlet API in my Eclipse project?Java
To import the javax.servlet or jakarta.servlet API in an Eclipse project, follow these steps:
- How do I resolve ClassNotFoundException?Java
A ClassNotFoundException occurs when the Java virtual machine (JVM) is unable to find a class that has been referenced in your code. This can happen for a number of reasons, including:
- How do I tell Gradle to use specific JDK version?Java
To specify the JDK version that Gradle should use, you can include the org.gradle.java.home property in the gradle.properties file in the root project directory.
- How to add local .jar file dependency to build.gradle file?Java
To add a local JAR file dependency to a build.gradle file, you can use the compile fileTree() method and specify the directory where the JAR file is located.
- How to convert jsonString to JSONObject in JavaJava
To convert a JSON string to a JSONObject in Java, you can use the JSONObject constructor that takes a String as an argument, like this:
- How to parse JSON in JavaJava
To parse a JSON string in Java, you can use the org.json library. This library provides a simple and easy-to-use interface for parsing and manipulating JSON data in Java.
- How to read json file into java with simple JSON libraryJava
To read a JSON file into Java using the Simple JSON library, you can use the JSONObject class and the JSONArray class.
- How to resolve java.lang.NoClassDefFoundError: javax/xml/bind/JAXBExceptionJava
The java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException error occurs when the Java class javax.xml.bind.JAXBException is not found on the classpath. This class is part of the Java Architecture for XML Binding (JAXB) API, which is used for parsing
- IntelliJ inspection gives "Cannot resolve symbol" but still compiles codeJava
There are a few possible reasons why IntelliJ might show a "Cannot resolve symbol" error while still being able to compile your code.
- Java 11 package javax.xml.bind does not existJava
If you are seeing the error "package javax.xml.bind does not exist" in your Java 11 project, it means that the Java XML Bind (JAXB) API is not included in the classpath.
- No Persistence provider for EntityManager namedJava
If you are seeing the error "No Persistence provider for EntityManager named [persistence-unit-name]" in your Java application, it means that the persistence provider (e.g.
- Spring Boot - Cannot determine embedded database driver class for database type NONEJava
If you are seeing the error "Cannot determine embedded database driver class for database type NONE" in a Spring Boot application, it means that the application is trying to auto-configure an embedded database, but it is unable to determine which database
- The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build PathJava
This error typically occurs when you are trying to use the HttpServlet class in a Java project, but the necessary libraries are not included in the project's classpath. To fix this error, you need to add the servlet-api.jar library to your project's class