I added this library from GitHub into my android app:
implementation 'com.github.quiin:unifiedContactPicker:1.0'
Now, this library uses other libraries from GitHub.
When I run my app, it tells me that these internal libraries are not found, so I dig them up and find their dependencies and add them to my app's Gradle file. But the problem is that they are not being detected and this is the error I am getting both times.
Execution failed for task ':app:dataBindingMergeDependencyArtifactsDebug'.
Could not resolve all files for configuration ':app:debugCompileClasspath'.
Could not find com.hootsuite.android:nachos:1.0.0.
Required by:
project :app > com.github.quiin:unifiedContactPicker:1.0
Possible solution:
Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html
Please help, I have been stuck at this for a long time and I need to use this dependency. I have also tried using similar dependencies that fulfil my purpose but they all seem to have the same problem. So I don't know if there's a problem with my project or the libraries.
I had the same problem but with geok library. I checked syntax of dependencies declaration lines on JitPack website and there were different than I had on my build.gradle file. Finally I changed
from:
implementation "com.github.piruin:geok:$geokVersion"
implementation "com.github.piruin.geok-gson:$geokVersion"
to:
implementation "com.github.piruin.geok:geok:$geokVersion"
implementation "com.github.piruin.geok:geok:$geokVersion"
and it works.
Related
I am developing a basic custom camera app
These are my dependency
// CameraX core library dependency
implementation "androidx.camera:camera-camera2:$camera_version"
// CameraX Lifecycle dependency
implementation "androidx.camera:camera-lifecycle:$camera_version"
// CameraX View dependency
implementation "androidx.camera:camera-view:$camera_version"
camera_version = '1.0.0'
Getting below error, it work fine if I remove camera-view dependency, but I cannot as I need that for my custom camera app.
Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
Could not find androidx.camera:camera-view.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/androidx/camera/camera-view/1.0.0/camera-view-1.0.0.pom
- https://repo.maven.apache.org/maven2/androidx/camera/camera-view/1.0.0/camera-view-1.0.0.pom
Required by:
project :app
As Morrison Chang already helped you with current issue.
I just wanted to add a few pointers to that whenever you get any such error in future for any of the android's library.
Search google's maven repo https://maven.google.com/ to see if the version you are looking for is even the correct one or what is the latest version of the library exists. like in your case https://maven.google.com/web/index.html?q=camera#androidx.camera:camera-view
Few of the library is still available at https://mvnrepository.com/ where you can check the version of your library
I am trying to incorporate ObjectBox in my hybrid Cordova/Android project. By dint of some trial and error I have managed to figure out two of the steps involved.
The app level build.gradle file has to be modified to include the ObjectBox Gradle plugin classpath "io.objectbox:objectbox-gradle-plugin:2.5.0"
Define a build-extras.gradle file to "apply" the ObjectBox plugin ext.postBuildExtras = {apply plugin: 'io.objectbox'}
The next step according to the ObjectBox docs is to define at least one Entity class
However, the issue here is that I need to import the javax.persistence.* classes into the project. It is not clear to me how I do this. I have run into suggestions along the lines of including
compile group: 'javax.persistence', name: 'javax.persistence-api', version: '2.2'
in the dependencies section of the app level build.gradle file. However, this causes gradle to complain that it does not know the compile() function. I'd be much obliged to anyone who might be able to tell me how this should be done.
For the benefit of anyone running into this thread - you can download the JAR file for javax.persistence here. Place this line in the folder src/android/libsof your custom plugin and then modify plugin.xmlwith the line
<lib-file src='src/android/libs/name-of-javax-persistence.jar'/>
I am getting this error message when I try to compile my new modularized Java 11 application:
Error occurred during initialization of boot layer
java.lang.module.FindException: Unable to derive module descriptor for C:\Users\inter\.m2\repository\xalan\xalan\2.7.2\xalan-2.7.2.jar
Caused by: java.lang.module.InvalidModuleDescriptorException: Provider class org.apache.bsf.BSFManager not in module
This appears to be an issue from a dependency of a dependency. I can't even find which module is pulling it in so I can update it.
I am using openjdk 11.0.2, IntelliJ 2018.3.4, Maven
Any advice how I can troubleshoot or fix this? I have found very little documentation on this issue.
Xalan
I had a look at their bug tracker following their index page and wasn't able to find this reported and not sure how actively is the library being maintained either.
General Explanation
Just to explain what has caused the issue in your code, I would share a screenshot and then try to add details around it.
So within the JAR that for version 2.7.2, there are service declarations (META-INF/services) which include org.apache.xalan.extensions.bsf.BSFManager as one of them. The service file here has to indicate the Provider thereby for itself and the class is supposed to be present on the modulepath to be resolved for reliable configuration of modules.
In this case for the module xalan(automatic module), the service listed doesn't have the provider class packaged within the dependency itself. (See the package org.apache, it doesn't further have package bsf and the class BSFManager thereby. Hence the exception as you get.
Short term hack
One of the tweaks to get that resolved would be to get update the library jar (patch it) and get rid of the service file if you're not using it. Or to add the provider copied from the corresponding artifact.
If you don't directly depend on this artifact or its parent dependencies, you can let those remain on the --classpath and get resolved as an unnamed module for your application.
Long term solve
An ideal way would be to report this to the maintainers and getting it resolved. It depends though on how actively are they maintaining it e.g. the last release for xalan was almost 5 years back, might just want to look for an actively participated alternative in my opinion.
I tried to install update for TestNG in eclipse:
"Help -> Check for updates -> deselect all and select TestNG check box. Then
install latest version i installed the version which starts with 7.2.0.
It fixed the issue for me.
I am currently facing the error when i try to connect to the Cloud Messaging using firebase assistants.
Failed to resolve: firebase-messaging-15.0.0
I search online, and the solution was to remove the last few digits in the dependency. However, when i tried that, it solved the error, but on the firebase assistants, it did not show "dependency being set up correctly" anymore. Hence, does this mean that i am not connected to the firebase cloud messaging?
Method tried:
change from implementation 'com.google.firebase:firebase-messaging:17.0.0:15.0.0' to implementation 'com.google.firebase:firebase-messaging:17.0.0'
The dependency being set up correctly is in green before i use the online method of removing the last few digits of the dependency
remove all firebase-messaging dependency and add This Dependency
implementation 'com.google.firebase:firebase-messaging:17.0.0'
You are getting the following error:
Failed to resolve: firebase-messaging-15.0.0
Because you are using a wrong dependency in your code. To solve this, please change the following line of code:
implementation 'com.google.firebase:firebase-messaging:17.0.0:15.0.0'
to
implementation 'com.google.firebase:firebase-messaging:17.3.4'
Because such a version 17.0.0:15.0.0 does not exist. Here you can find more informations.
In your top level build.gradle file please be sure to have the latest version of Google Service plugin and Gradle:
classpath 'com.android.tools.build:gradle:3.2.1'
classpath 'com.google.gms:google-services:4.2.0'
I'm trying to set up the PubNub jar as a library in my Android Studio project. The project is something I am porting over from another computer, so I'm mostly copying things in.
It appears between then and now that I now have to configure the AnnotationProcessor of this jar, but I'm really not sure what that requires, nor have I been able to find an example that fits my issue.
When I try to compile my project, I am left with this message:
Error:FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:javaPreCompileDebug'.
Annotation processors must be explicitly declared now.
The following dependencies on the compile classpath are found to contain annotation processor.
Please add them to the annotationProcessor configuration- pubnub-gson-4.19.0-all.jar (pubnub-gson-4.19.0-all.jar).
Alternatively, set android.defaultConfig.javaCompileOptions.annotationProcessorOptions.includeCompileClasspath = true to continue with previous behavior.
Note that this option is deprecated and will be removed in the future.
See https://developer.android.com/r/tools/annotation-processor-error- message.html for more details.
I'm really not sure at all what this is telling me to do, and the examples I can find of annotationprocessor on the internet (none for PubNub) all are pointing to packages and classes, which I don't see what I am suppose to do with.
Can someone lead me down the correct path?
I apologize for the formatting of the error, but the site wouldn't let me submit it in blockquotes because it was "improperly formatted code."
Try to add this line in your dependencies{} block:
annotationProcessor files('libs/pubnub-gson-4.19.0-all.jar')
(along with the implementation files('libs/pubnub-gson-4.19.0-all.jar'))
It works in my case.