I am trying to compile sugar ORM to my application.But it is showing this build error.
Unable to resolve dependency for
':app#releaseUnitTest/compileClasspath': Could not resolve
com.github.satyan:sugar:1.4.
How can I resolve it?Did I miss any other thing to add in gradle?
You need to change your app module's build.gradle file from:
implementation 'com.github.satyan:sugar:1.4'
to
implementation 'com.github.satyan:sugar:1.5'
Note: You may be using compile instead. This is now deprecated.
The current version can always be seen on the repo's page.
Related
I am writing a small plugin for PhpStorm. During development, I run it in IDEA and everything works fine there. However, after I try to enable it in PhpStorm I get the following error:
Plugin 'name' is compatible with IntelliJ IDEA only because it doesn't define any explicit module dependencies
How can this problem be solved?
The documentation plugin compatibility says that if your plugin does not have module dependencies (built-in plugins that are non-removable parts of the IDE), then it is considered legacy and will load only in IDEA, as reported by the error message.
In order to fix this error, you need to explicitly add a dependency to one of the modules. For example, com.intellij.modules.platform:
Add the following line to plugin.xml:
<depends>com.intellij.modules.platform</depends>
And the plugin should load successfully in PhpStorm.
I have two modules - core and auth. In auth module I am trying to integrate Google Sign In to Firebase. All dependencies resolving correctly, but not a GoogleSignInClient. I don't want use dagger for this entity to provide this client somewhere. I want to use it only in this class. But dagger shows me an error :
class file for com.google.android.gms.auth.api.signin.GoogleSignInClient not found
Consult the following stack trace for details.
com.sun.tools.javac.code.Symbol$CompletionFailure: class file for com.google.android.gms.auth.api.signin.GoogleSignInClient not found
e: D:\Projects\<project path>\build\tmp\kapt3\stubs\internalProductionDebug\<class path>\di\components\AppComponent.java: error:
[ComponentProcessor:MiscError] dagger.internal.codegen.ComponentProcessor was unable to process this interface because not all of its dependencies could be resolved. Check for compilation errors or a circular dependency with generated code.
Unfortunately it wasn't dagger problem. It happens with using several Android modules when you use api and implementation in gradle incorrectly.
I don't know why, but when I fixed my dependencies in Gradle - all become working.
I am working on a project using kotlinjs for nodejs and I start to learn coroutines and integrate them into my code to say goodbye to the callback hell.
I managed to get coroutines working, my code can be compiled and executed, everything seems fine.
...except: The IDE still shows me errors. It seems to be confused by the additional libraries I added in order to get coroutines running.
I am currently fiddling around with the library dependencies, sometimes some errors go away, but then some code gets red which was okay before...
This is what I see:
Case 1:
Cannot access class 'kotlinx.coroutines.experimental.CoroutineContext'. Check your module classpath for missing or conflicting dependencies
Case 2:
Unresolved reference: JsModule
Modifier 'external' is not applicable to 'class'
You see, launch is recognized when I add the stdlib, but then the IDE complains with the other two errors.
Again, please note: In both cases, actual compilation is successful!
I am using IntelliJ 2018.1 with Kotlin Plugin 1.2.41.
Thanks to Alexander Chernikov at youtrack.jetbrains I could resolve my problem.
I cite his explanation:
The issue is that JavaScript libraries should be marked with special attribute to be recognized.
When they are imported from pom.xml or build.gradle, this mark is set, so the feature works.
In your project they are not marked.
At the moment, to correct the libs manually, please open .idea/libraries/org_jetbrains_kotlin_kotlin_stdlib_js_1_2_41.xml and .idea/libraries/org_jetbrains_kotlinx_kotlinx_coroutines_core_js_0_22_5.xml.
In both files find type="repository" and replace it with type="kotlin.js".
Make sure IDEA sees the change. (You can exit IDEA, make the change and restart.)
Then you can keep only these two libs in dependencies. The editor should work.
Here is the issue link:
https://youtrack.jetbrains.com/issue/KT-24575
There I have also attached a sample project with the problem.
I am using example of conversion from pptx to svg. I took the code from
PPTX2SVG
And added dependencies to my gradle application
compile "org.apache.poi:poi:$apachePoiVersion"
compile "org.apache.poi:poi-ooxml:$apachePoiVersion"
compile "org.apache.poi:poi-ooxml-schemas:$apachePoiVersion"
compile "org.apache.xmlgraphics:batik-svggen:$apacheBatikVersion"
compile "org.apache.xmlgraphics:batik-transcoder:$apacheBatikVersion"
compile "org.apache.xmlgraphics:batik-svg-dom:$apacheBatikVersion"
However it is unable to resolve classes XSLFImageRendener and XSLFRenderingHint.
What dependencies are missing? As there is no imports in the example code I assume that it should be in org.apache.poi.xslf.usermodel package
I am using poi=3.16 and batik=1.9
The official note:
Please note that XSLF is still in early development and is a subject
to incompatible changes in a future release.
So POI 3.16 is not compatible with 3.15.
I fix the compatibility and rewrite the PPTX2SVG.java at Github:
https://gist.github.com/ji-zhou/37f8a40fc1c889563736c82cb270921f
Currently I have my dagger dependencies declared like this:
compile 'com.squareup.dagger:dagger:1.2.1'
compile 'com.squareup.dagger:dagger-compiler:1.2.1'
I don't want dagger-compiler to be included to my Android apk since it also adds Guava dependency, which is big and break Android 65K limit for our app.
I saw that in maven projects dagger-compiler is added as "provided", but I failed to find anything similar for gradle android build.
There exists a provided keyword:
compile 'com.squareup.dagger:dagger:1.2.1'
provided 'com.squareup.dagger:dagger-compiler:1.2.1'
Heres a sample build.gradle: volley-examples
The provided scope is supported in Android-Gradle/Android Studio. You can get at it through the UI in Project Structure > Dependencies, or you can use the provided keyword instead of compile in your build files if you want to edit them by hand.