404 could not find resource lint-gradle-26.1.3.pom - android

trying to build a signed apk from a opensource android application and got the error for the link https://jcenter.bintray.com/com/android/tools/lint/lint-gradle/26.1.3/lint-gradle-26.1.3.pom is not accessible
i try to put this link manually to my browser and after redirecting to https://repo.jfrog.org/artifactory/libs-release-bintray/com/android/tools/lint/lint-gradle/26.1.3/lint-gradle-26.1.3.pom?referrer link i got 404 could not find resource Error.
is something wrong with the repository? how can i fix this, i can reach the jar file from maven repository but gradle decides to get this from jCenter and hit this error and i can't remove jcenter from repository

I couldn't find out what is wrong but i find a workaround that sort of solve the problem.
I added this line to dependencies section of build.gradle file:
compile group: 'com.android.tools.lint', name: 'lint-gradle', version: '26.1.3'
somehow when gradle tries to fetch this jar in build process it fails and not going to fetch from google() repo (i have this in my repos) but it had no problem getting it when i specify it on dependencies. after it downloads i removed it from my dependencies and build used it's cached jar file and everything works now.

Related

Jar file in parse sdk android studio

I am trying to setup parse server in android studio.the problem which i face i am not able to found parse jar file and how i add in lib folder??
where I found jar file how we connect with parse server
I refer this tutorial http://brainwashinc.com/2017/02/17/setting-parse-sdk-android/
Downloaded SDK
Put jar file in ‘libs’ dir same level as project ‘java’ dir under src/main
Added Gradle line for jar file to build.gradle (for app module, not project):
I notice the guide you linked doesn't mention specifying the fileTree for jars.
In your module-level build.gradle, make sure you have this line:
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
...
}
This will tell gradle that it should look for .jar files in the libs directory. Without this line, gradle has no way of finding your jar file.
Please let me know if this solves your issue!
The tutorial you are referring to is very old (according to the url path), and contains outdated steps for importing Parse SDK into Android project.
So to answer your question and add little background:
where I found jar file how we connect with parse server
Parse stopped distributing SDK .jar artifacts in 2017, so there is no .jar file to download. (I'm not counting old artifacts still hanging around JFrog's Bintray) More background info here.
The current way of importing Parse SDK is to add it as a gradle dependency.
Since they're distributing artifacts via Jitpack, which is not included by default in new Android Studio project, you must add this to your root build.gradle.
allprojects {
repositories {
...
maven { url "https://jitpack.io" }
}
}
And then add the library to your module build.gradle (In most cases this would mean app/build.gradle). You can find latest version on Jitpack project page.
dependencies {
implementation "com.github.parse-community.Parse-SDK-Android:parse:latest_version"
}
For more information and to avoid similar problems with outdated instructions, I recommend reading the official docs.

Error:(44, 13) Failed to resolve: org.achartengine:achartengine:1.2.0 [duplicate]

I have to create an application that makes extensive use of charts.
Reading the web I chose achartengine that seems to have everything I need.
I downloaded the jar file, I plugged in the libs folder, I selected "add to library" and I lunch the gradlew clean.
Result in the sources where I do the import of org.achartengine.xxxx I always returned the error that fails to resolve symbols .
Do you have suggestions?
Thank you
Andrea
I am able to use this library in my Android Studio project, this topic explains how to add AChartEngine repo to your project.
What I did:
Added following to project-wide build.gradle (one from the project root):
allprojects {
repositories {
...
maven {
url "https://repository-achartengine.forge.cloudbees.com/snapshot/"
}
}
}
For every module that uses the library, add this to its build.gradle (you may put this to the top-level build.gradle if it should be included in all modules):
dependencies {
...
compile group: 'org.achartengine', name: 'achartengine', version: '1.2.0'
}
Now I can use the library in the project, I see the classes in code assist popups and build runs as succeeds.
It seems like the new version (1.2.0) is not available for download anymore in the http://www.achartengine.org/ site. and that's why the gradle/maven method doesn't work (or the snapshot file was removed).
I succeeded using and adding it to my project by downloading the jar file from here:
https://github.com/ddanny/achartengine/files/460139/achartengine-1.2.0.zip

Gradle doesn't find .aar file on Maven repo on Bintray

... even when the error reports the correct download URL.
(Bintray details below.)
Gradle Repo
repositories {
jcenter()
maven { url 'https://dl.bintray.com/myUsername/myRepo/' }
}
Dependencies
compile('com.domain.groupid:library-core:v1.2.3#aar') {
transitive=true
}
compile('com.domain.groupid:library-support:v1.2.3#aar') {
transitive=true
}
Error
Error:Could not find library-core.aar (com.domain.groupid:library-core:v1.2.3).
Searched in the following locations:
https://dl.bintray.com/myUsername/myRepo/com/domain/groupid/library-core/v1.2.3/library-core-v1.2.3.aar
If I copy that URL, I can download it in a signed out window. Why does Gradle have a problem with it?
There is another similar compile dependency (listed here as library-support), but I'm assuming it didn't get to it because this one failed first.
The setup...
I have a personal public repo on Bintray, with two android libraries.
https://bintray.com/myUsername/myRepo/library-core
https://bintray.com/myUsername/myRepo/library-support
Both have versions upload by the bintray rule in my library's gradle scripts. The versions upload, I can see them in the bintray UI, and I can download them and see that they are what I expected:
https://dl.bintray.com/myUsername/myRepo/com/domain/groupid/library-core/maven-metadata.xml
https://dl.bintray.com/myUsername/myRepo/com/domain/groupid/library-core/library-core-v1.2.3/library-core-v1.2.3-sources.jar
https://dl.bintray.com/myUsername/myRepo/com/domain/groupid/library-core/library-core-v1.2.3/library-core-v1.2.3.aar
https://dl.bintray.com/myUsername/myRepo/com/domain/groupid/library-core/library-core-v1.2.3/library-core-v1.2.3.pom
// Same for library-support. All of these download in a signed out window.
Is gradle expecting something else?
Maven usually doesn't expect the v prefix in the version attribute. It's implied by the order of coordinate syntax: <group>:<name>:<version>. Using semantic versioning for the version number should do the trick.
I had a similar issue, adding another answer to hopefully help others in the future.
In my case, I first only uploaded the .jar file to the maven repo, then when I uploaded the .aar file, it couldn't find it even though the error URL properly linked to the artifact.
Adding
--refresh-dependencies
to my gradle command fixed the issue for me

Adding external jar no main manifest

I saw two method of adding external jar.
First is copying to libs folder and then adding manually in build.gradle.
compile files('libs/commons-net-3.1.jar')
Other is the graphical method: right click on app folder> import external .jar > then adding dependency........
I choose the first one but this gives me and error:
/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/bin/java - Dfile.encoding=UTF-8 -jar /Users/abhimanyuaryan/AndroidStudioProjects/UniSnap/app/libs/commons-net-3.1.jar
no main manifest attribute, in /Users/abhimanyuaryan/AndroidStudioProjects/UniSnap/app/libs/commons-net-3.1.jar
Process finished with exit code 1
Your problem is better solved by not including a local jar at all, but by a remote artifact.
Make sure your build.gradle has to following to load from maven central -
repositories {
mavenCentral()
}
and add the following to your dependencies block --
compile 'commons-net:commons-net:3.1'
Do a gradle sync after making these changes.
The format is 'group:name:version'. See the docs on dependencies for more info. To find libraries you are interested in, check their install docs for a maven or gradle artifact description, or you can search Maven Central.
Lastly, want to point out that 3.3, not 3.1, is not the most current version of Apache Commons Net.

Gradle fails to find the dependency

I have used this tool to publish my library to sonatype https://github.com/chrisbanes/gradle-mvn-push. I can see that it's uploaded and signed correctly. but when I try to add the dependency to another project gradle can't find it
here is what i get: Error:Failed to find: com.github.mohd-bh:app:1.0.0
though I already included mavenCentral() in repositories block.
You can use this link http://search.maven.org/ to search the maven repository.
When I searched for your library, I could not find it.
Sonatype requires that you push your library from the staging server to the release server by using their website tool. You may not have done that which would result in the library not being published to maven.

Categories

Resources