I am getting unresolved reference error in Kotlin Android Library project.
1.) standard_kotlin_lib.jar --> contains: Kotlin classes, META-INF/standard_kotlin_lib.kotlin_module
2.) A.aar --> compiles only standard_kotlin_lib.jar file. After compilation, inside generated A.aar file’s classes.jar: META-INF/standard_kotlib_lib.kotlin_module is missing, infect whole META-INF is missing
3.) B.aar --> compiles A.aar. Here, kotlin source code importing classes define in “standard_kotlin_lib.jar”. Getting unresolved reference error at import
B.aar <-- A.aar <-- standard_kotlin_lib.jar
Tools Version:
1.) I am using android gradle plugin 3.0.0 and gradle version 4.3.0. With previous plugin version i.e. 2.2.3 and gradle version 3.2.1, this error was not coming. Kotlin version is 1.1.4
Issue I think:
1.) META-INF is missing inside A.aar file. When I manually copy the META-INF inside A.aar’s classes.jar, B.aar compiled successfully.
Related
On our Nexus server we have a library with version 1.0 and 2.0. I build my main Project with Gradle.
Actually I have a dependency entry in my gradle file to the library from nexus that use lib version 1.0. Everything is fine.
But now I need a Version 2.0 of our library. The Problem is that the POM File of Lib 2.0 on nexus, does not have a standard version Tag anymore with 2.0 in it. like
<groupId>...</groupId>
<articaftId>...</articaftId>
<version>2.0</version>
Instead their is this line
...
<version>${revision}</version>
...
When update the dependency in my Gradle file to 2.0 and try to build my Gradle project with
gradle clean assemble
The build fails with this Message
> Could not resolve com.company.print.lib:print-lib:2.0
Required by:
project :com.company.printservice
> Could not com.company.print.lib:print-lib:2.0
> inconsistent module metadata found. Descriptor: com.company.print.lib:print-lib:0.0.0-SNAPSHOT Errors: bad version: expected='2.0' found='0.0.0-SNAPSHOT'
How I can solve this? Do I need to pass the Revision ob gradle build?
I need to use external dependencies for tomcat. I add them to project structures and project build fine. Compiler doesn't show any errors
project structure
The project works fine when i run it on IDE.
The problem starts when I try to build WAR file using Maven package :
package org.apache.catalina does not exist
package org.apache.catalina.connector does not exist
package org.apache.coyote does not exist
I've try with all different scope settings but jars aren't found
This question follows this post: Gradle: Where are external dependencies stored?.
I want to use MongoDB driver for Java, so I added the following line:
compile 'org.mongodb:mongodb-driver:3.4.0'
to build.gradle file. After finishing the build successfully, I found the jar file of the dependency in ~/.gradle/caches/modules-2/files-2.1/org.mongodb.
I also added the path ~/.gradle to external libraries.
However, when I write the statement
import com.mongodb.MongoClient;
inside my project, I get an error:
"Can't resolve symbol 'mongodb'".
Do you know how to resolve this issue?
Now IJ searches in .gradle for classfiles. Of course mongodb is not found in there. As I said in the comment of the other issue, if you change the dependencies in your Gradle file and did not enable auto-import when you imported the Gradle project into IJ, its library configuration will not automatically update. Either tell IJ manually to refresh the library configuration from the Gradle file or activate auto-import so that it automatically sees when you change the Gradle file and automatically updates the library configuration.
Make sure you opened the project as Gradle project
When you add dependency, press on the sync dependencies button
I'm using IntelliJ IDEA 14.0.2 Ultimate and created a Maven project.
Here's my pom file: http://pastebin.com/KQ6ARxj3
So I have this Geb Spec class: http://pastebin.com/AerXgCDh
And in my classpath there are all maven dependencies and those are getting downloaded, everything's at his place. Including: Maven: org.gebish:geb-spock:0.10.0
But when I right-click on my module and select "Make Module [Module]" it starts compiling my source files but stops with this error:
C:\Users\...\MyModule\src\test\groovy\MySpockSpec.groovy
Error:(1, 1) Groovyc: unable to resolve class geb.spock.GebReportingSpec
Why can't the groovy compiler resolve this? Maven builds the project successfull and IntelliJ can resolve everything, so what's wrong with the groovy compiler?
When i build the project i am getting this error
The type org.springframework.core.NestedRuntimeException cannot be resolved. It is indirectly referenced from required .class files
Vaelyr answers above is correct
but To be very specific, you need to add spring-core-4.0.5.RELEASE.jar into your eclipse build path.
Use the spring version that corresponds to your other spring jars.
The class you are trying to use is not apparently on your classpath. Add your Spring jar files to your sources classpath and it should work. If that's not the case do Project -> Clean as well.