i want to use dependency that needs a jitpack.io repository
Cannot find dependency when I try to sync , While available at jitpack.io
language kotlin
my gradle plugin version is 7.0.1
my gradle version is 7.0.2
Everything is updated
Dependency
implementation 'com.github.delight-im:Android-AdvancedWebView:v3.2.1'
Repository
buildscript {
repositories {
google()
mavenCentral()
maven{
url 'https://jitpack.io/'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:7.0.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.21"
// NOTE: Do not place your application dependencies here;
they belong
// in the individual module build.gradle files
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
BuildOutput
Could not find com.github.delight-im:Android-AdvancedWebView:v3.2.1.
I tested all versions of Independence
The reason for this problem was the Android Studio update on the Stable channel, which changed the structure of the gradle, and this problem will be solved by installing previous versions.
Related
Android studio says that:
"A newer version of com.squareup.picasso:picasso than 2.8 is available: 2.71828"
Screenshot from Android Studio
but I see that 2.8 is the newest version on https://github.com/square/picasso/releases.
My Gradle build script for Project:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
maven { url "https://jitpack.io" }
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.1'
classpath 'com.google.gms:google-services:4.3.4'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.4.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
maven { url "https://jitpack.io" }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
I guess that Gradle looks not on GitHub, but on some other repository? If yes, should I change
implementation 'com.squareup.picasso:picasso:2.8'
to something like
implementation 'com.github.square:picasso:2.8'
or should I change to:
implementation 'com.squareup.picasso:picasso:2.71828'
This is a known issue on their GitHub
As stated:
Updated Picasso version 2.71828 to 2.8. Now Android Lint complains
that there is a newer version 2.71828 available. Which is true in
semantic versioning sense since 71828 > 8.
One can suppress the GradleDependency lint check for the library to
get rid of the warning. However, I would find it better if version
number components were monotonically increasing instead.
So leave it as is.
If it really bothers you, you can do this to suppress the warning:
//noinspection GradleDependency
implementation 'com.squareup.picasso:picasso:2.8'
I am having a strange issue. I am adding this library for Business Hour Picking.
https://github.com/bashizip/business-hours-picker
But strangely the older versions are added with no issues. But when I add the latest one it is not resolving by gradle.
I have tried:
Clean Project
Rebuilt It
Invalidate Cache & Restart
But i can't add the library.
I have also posted the issue on the github issues section.
Here is my Project Level Gradle:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.0.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
// Android Navigation Safe Args Classpath
}
}
allprojects {
repositories {
google()
jcenter()
mavenCentral()
maven { url 'https://jitpack.io' }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Please try the newest version of the library (1.1.1):
implementation 'com.github.bashizip:business-hours-picker:1.1.1'
It has many improvements, bug fixes and Gradle dependencies have been upgraded.
PS: I'm the author of the lib.
I am trying to add a epub reader library to a project I have already created. The library I am trying to add to my project as a moduel is the Folio Reader Library (https://github.com/FolioReader/FolioReader-Android). I have downloaded this library on my computer and have tried adding it through File -> New -> Import Module. However, during the process I received countless errors. My current one is this:
Gradle DSL method not found: 'versionName()'
Possible causes:
The project 'FolioReader-Android-master' may be using a version of the
Android Gradle plug-in that does not contain the method (e.g.
'testCompile' was added in 1.1.0).
Upgrade plugin to version 3.4.1 and sync project
The project 'FolioReader-Android-master' may be using a version of Gradle
that does not contain the method.
Open Gradle wrapper file
The build file may be missing a Gradle plugin.
Apply Gradle plugin
This file is the file where the dependencies are declared for the Library.
FolioReader-Android-master:
build.gradle file:
// Top-level build file where you can add configuration options common to
all sub-projects/modules.
buildscript {
apply from: 'versions.gradle'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
//moj
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.11"
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.4.1'
}
}
allprojects {
configurations.all {
resolutionStrategy {
cacheChangingModulesFor 0, 'seconds'
}
}
repositories {
mavenLocal()
google()
jcenter()
maven { url "https://jitpack.io" }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
The error itself states that the problem arises because the project is using a version of the Gradle plug-in may not contain the method. I have updated the version to the newest one, however I still receive this error. Any suggestions on how I can solve this problem?
Problem solved by replacing
versionName 1
with
versionName "1.1"
in the Module level build.gradle file.
My android studio is sending me this warning:
Outdated Kotlin Runtime
Your version of Kotlin runtime in 'Gradle:
org.jetbrains.kotlin:kotlin-stdlib:1.2.10#jar' library is
1.2.10-release-109 (1.2.10), while plugin version is 1.2.41-release-Studio3.1-1.
Runtime library should be updated to avoid compatibility problems.
This warning appear every time I open the project and it finishes the Gradle sync How do I update the Kotlin runtime?
I have found questions about it, but all of them the problema was that the plugin version that was below runtime and needed to update the plugin version on the build.gradle file, but my case is the opposite. My build.gradle is like this:
buildscript {
ext.kotlin_version = '1.2.41'
ext.anko_version='0.10.5'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:3.2.0'
}
}
allprojects {
repositories {
google()
jcenter()
maven { url 'https://jitpack.io' }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
If I try to downgrade the plugin to 1.2.10, them the IDE gives a warning that the plugin is outdated.
I just updated gradle for my android project from 2.3.3 to 3.1.3 and now it seems that my project can now longer import dependencies that come from an external source like de.hdodenhof:circleimageview and id.zelory:compressor. Only dependencies that start with 'com' or 'java' work.
I already tried to clean/rebuild the project and check invalidate chaches/restart.
Sidenote: I also upgraded my other packages to their latest versions, but I think it is a gradle problem.
Another Sidenote: the missing dependencies can also not be found in the external libraries.
Project gradle:
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath 'com.google.gms:google-services:4.0.1'
}
}
allprojects {
repositories {
maven { url "https://maven.google.com" }
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Module gradle (picture of the changes because the gradle file does not paste well in stack overflow code sample):