I'm currrently struggling with a 'Peer Not Authenticated' issue while gradling on Android Studio. When I try to clean my project, AS tells me that the issue comes from https://maven.parse.com/repo/com/parse/tools/gradle/maven-metadata.xml
With an internet browser, I see that the SSL certificate of *.parse.com has expired on Thursday 26th... I've already tried to replace the 'https' with 'http' in order to bypass the checking but it doesn't work.
Here is the head of my build.gradle file:
apply plugin: 'com.android.application'
apply plugin: 'com.parse'
buildscript {
repositories {
mavenCentral()
maven { url 'https://maven.parse.com/repo' }
}
dependencies {
classpath 'com.parse.tools:gradle:1.+'
}
}
I ran into this tonight as well. If you take a look at your IntelliJ log you should see an SSL error associated with reaching that url. To workaround this problem, remove the Parse dependency via the Maven URL and add in the JAR manually to your libs folder.
In your project Gradle add the following under 'dependencies' to reference the manually added libs:
compile files('libs/Parse-1.9.4.jar')
compile files('libs/ParseCrashReporting-1.9.4.jar')
Remove anything that looks like this from both gradle files:
maven {
url 'https://maven.parse.com/repo'
}
classpath 'com.parse.tools:gradle:1.+'
apply plugin: 'com.parse'
parse {
applicationId "blahblahblahblah"
masterKey "ohmasterkeyyousonice"
retries 3
uploadSymbols true
}
Rock and roll hoochie koo...
Note: you just need parse gradle plugin if you are using ParseCrashReporting, if not needed remove it.
Github Issue
Related
When I update gradle in android studio
I found this type error
Unable to load class 'org.gradle.api.publication.maven.internal.MavenPomMetaInfoProvider'.
his is an unexpected error. Please file a bug containing the idea.log file.
In my case, the issue was in this line:
apply plugin: 'com.github.dcendents.android-maven'
Before now, I was using Gradle plugin 4.2.2, and today I updated it to 7.0.0 and got the same error as you. I solved the issue by removing this line from my build.gradle.
I experienced this issue when using a library pushed on jitpack.io
The docs on jitpack.io mention to include this in the root build.gradle file
allprojects {
repositories {
....
maven { url 'https://jitpack.io' }
}
}
Where as with the latest updates this has changed. Android Studio no longer includes a allprojects block in the root build.gradle file.
To make this work you now need to include maven { url 'https://jitpack.io' } in settings.gradle file instead.
Here is how my settings.gradle looks like:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
maven { url "https://jitpack.io" }
}
}
rootProject.name = "<App Name>"
include ':app'
DATE UPDATED EVERY TIME I GOT UPVOTE AS I KNOW IT IS STILL VALID
DATE: 04/11/2021 (4th of Nov 2021)
after receiving that error when updated to gradle 7.0.0, I tried #Alex solution but, it didn't work for me,
I removed two lines and it's working now.
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'android-maven'
Check if other modules have this plugin:
apply plugin: 'com.github.dcendents.android-maven'
In my case it was in countrycodepicker
I removed it from there, and it worked.
Downgrade your gradle version to 6.7.1. It works for me.
I have been tryong to add FCM to my android application for almost 48 hours now. I am keep on failing with these two errors on Android Studio. I have tried all the solutions in this post. Still I couldn't fix it.
I want firebase cloud messaging to be integrated in my app. So I did the followings.
Created an app in the firebase console
Included the .json config file
Added the SDK
implementation 'com.google.firebase:firebase-messaging:17.0.0'
(In the app level gradle)
apply plugin: 'com.google.gms.google-services' (In the app level gradle file last
line)
classpath 'com.google.gms:google-services:4.0.1'
(In the project level gradle)
Added the repository
google() (In the project level gradle)
I have tried syncing many times and I keep on getting the error
Failed to resolve: play-services-tasks Open File
Failed to resolve: play-services-basement Open File
On a side note, I am using the gradle plugin 3.1.3
classpath 'com.android.tools.build:gradle:3.1.3'
Can someone please give me a hand here please.
In gradle (project),
just change the position of google() before jcenter(),
and the error is gone.
repositories {
google()
jcenter()
}
jcenter() sometimes act as a mirror repository for some Google dependencies. During Gradle building process, it looks for dependencies in the first entry listed in your repositories {...} block. So if this repository is broken or something bad occurs with any dependency the process will fail.
Here there is a recommended order for repository list
repositories {
google()
maven {
url 'https://maven.google.com/'
}
jcenter()
}
Put google() repository at the very first line of dependencies. It will work.
Add in your app.gradle
allprojects {
repositories {
jcenter()
maven {
url "https://maven.google.com"
}
}
}
and upgrade your dependencies version.
I had this occurring due to outdated build tools version. Updating from 28.0.2 to 28.0.3 resolved it.
buildToolsVersion '28.0.2'
to:
buildToolsVersion '28.0.3'
in build.gradle file.
I'm having an issue with building my project. First time build. I'm behind a proxy and all other dependencies downloaded only this having an issue.
I tried a few options found on SO, but had no luck so far. Can someone give me a clue on how to fix this?
Things I tried so far:
File -> Invalidate Cache/Restart -> Invalidate and Restart
updated the crashlytics:2.5.5#aar to crashlytics:2.6.4#aar
restarted Android Studio
I'm not in offline mode
app/build.gradle
buildscript {
repositories {
maven { url https://maven.fabric.io/public }
mavenCentral()
jcenter()
}
}
apply plugin: 'io.fabric'
dependencies {
compile("com.crashlytics.sdk.android:crashlytics:2.5.5#aar") {
transitive = true
}
}
Root build.gradle
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
Error:
Failed to list versions for io.fabric.tools:gradle.
Unable to load Maven meta-data from https://maven.fabric.io/public/io/fabric/tools/gradle/maven-metadata.xml.
Could not GET 'https://maven.fabric.io/public/io/fabric/tools/gradle/maven-metadata.xml'.
Connect to maven.fabric.io:443 [maven.fabric.io/54.230.133.33] failed: Connection refused: connect
Could not resolve io.fabric.tools:gradle:1.+.
Failed to list versions for io.fabric.tools:gradle.
Unable to load Maven meta-data from https://jitpack.io/io/fabric/tools/gradle/maven-metadata.xml.
Could not GET 'https://jitpack.io/io/fabric/tools/gradle/maven-metadata.xml'.
Connect to jitpack.io:443 [jitpack.io/104.24.23.62, jitpack.io/104.24.22.62] failed: Connection refused: connect
Could not resolve io.fabric.tools:gradle:1.+.
Failed to list versions for io.fabric.tools:gradle.
Unable to load Maven meta-data from https://repo1.maven.org/maven2/io/fabric/tools/gradle/maven-metadata.xml.
Could not GET 'https://repo1.maven.org/maven2/io/fabric/tools/gradle/maven-metadata.xml'.
Connect to repo1.maven.org:443 [repo1.maven.org/151.101.24.209] failed: Connection refused: connect
Could not resolve io.fabric.tools:gradle:1.+.
Failed to list versions for io.fabric.tools:gradle.
Unable to load Maven meta-data from https://jcenter.bintray.com/io/fabric/tools/gradle/maven-metadata.xml.
Could not GET 'https://jcenter.bintray.com/io/fabric/tools/gradle/maven-metadata.xml'.
Connect to jcenter.bintray.com:443 [jcenter.bintray.com/75.126.118.188] failed: Connection refused: connect
Came across the same issue.
i resolve it by installing the latest fabric plugin for android studio.
Add the following to the build.gradle .
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'io.fabric.tools:gradle:VVV'
}
}
apply plugin: 'io.fabric'
repositories {
maven { url 'https://maven.fabric.io/public' }
}
WHERE VVV is the latest version. In my case VVV IS 1.31.2
Add this to the manifest
<meta-data
android:name="io.fabric.ApiKey"
android:value="xxxxxxxxxxxxxxxxxxxxxxx" />
where xxxxxxxxxxxxxxxx is your obtained value.
Add this to your launcher class.
Fabric.with(this, Crashlytics())
Rebuild project and you are good to go.
Well, the error seems pretty clear. You cannot connect to either of the repos via HTTPS. As it is unlikely that all those are down and you already said you are behind a proxy, configure the HTTPS proxy via Gradle properties as described in the users guide and you should be fine.
If you proxy is configured properly on Gradle side, maybe the proxy blocks the requests due to some condition. In that case you should probably ask the maintainer of that proxy.
Edit Project Gradle like this
buildscript {
repositories {
google()
jcenter()
maven {
url 'https://maven.fabric.io/public'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.4'
classpath 'com.google.gms:google-services:3.3.0'
classpath 'io.fabric.tools:gradle:1.25.4'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
maven {
url 'https://maven.google.com/'
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
I
tried adding maven repo url but did not work, problem is that Firebase Crashlytics have decided to change their dependency name from
io.fabric.tools:gradle
to
com.google.firebase:firebase-crashlytics-gradle
with the aquisition of Fabric by Firebase.
So instead of
classpath "io.fabric.tools:gradle:1.25.4"
use
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.1.0'
and also change the
apply plugin: 'io.fabric'
to
apply plugin: 'com.google.firebase.crashlytics'
References
https://firebase.google.com/docs/crashlytics/get-started?platform=android
This error:
Could not find any matches for io.fabric.tools:gradle:1.+ as no versions of io.fabric.tools:gradle are available.
happens when the option "Offline work", located in Settings->Build, Execution, Deployment->Gradle->Global Gradle settings is selected.
To solve the problem, you have to change:
From: io.fabric.tools:gradle:1.+
To: io.fabric.tools:gradle:1.0
When you do, Android Studio itself will warn you about the latest version. In my case it was: 1.25.4.
So, in my case, it was like this:
dependencies {
classpath 'com.android.tools.build:gradle:3.2.0'
classpath 'io.fabric.tools:gradle:1.25.4'
}
I hope it helps someone else.
Faced the same issue, resolved with upgrading the fabric gradle to the latest version. Below is the code,
dependencies {
classpath 'io.fabric.tools:gradle:1.25.4'
}
I had the same problem, just make sure you follow these steps so crashlytics will be installed successfully:
1) add this in your project level gradle:
buildscript {
repositories {
google()
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'com.google.gms:google-services:4.2.0'
classpath 'io.fabric.tools:gradle:1.27.1'
}
}
allprojects {
repositories {
google()
jcenter()
maven { url 'https://maven.fabric.io/public' }
}
}
2) In your app level gradle
in the very beginning of the file add:
apply plugin: 'io.fabric'
apply plugin: 'com.google.gms.google-services'
and in the dependencies block add:
implementation 'com.crashlytics.sdk.android:crashlytics:2.9.9'
After adding all of that, it has finally worked for me. Hope it helps. Cheers
Well, first add these to gradle.properties(Project Properties)
For http use:
systemProp.http.proxyHost=your_proxy_host
systemProp.http.proxyPort=your_proxy_port
systemProp.http.proxyUser=your_proxy_username
systemProp.http.proxyPassword=your_proxy_password
For https use:
systemProp.https.proxyHost=your_proxy_host
systemProp.https.proxyPort=your_proxy_port
systemProp.https.proxyUser=your_proxy_username
systemProp.https.proxyPassword=your_proxy_password
Then got to File -> Settings -> Appearance & Behavior -> System Settings -> HTTP Proxy, select Manual Proxy Configuration, select HTTP, enter Host name, enter Port number, select Proxy authentication, enter login(your proxy username), enter password(your proxy password), (note you can optionally Check connection)then Apply and OK. Done!!!
Use this link to find the latest fabric gradle plugin
Latest Fabric Gradle Plugin
Avoid using + in version numbers; can lead to unpredictable and unrepeatable builds (io.fabric.tools:gradle:1.+)
Using + in dependencies lets you automatically pick up the latest available version rather than a specific, named version. However, this is not recommended; your builds are not repeatable; you may have tested with a slightly different version than what the build server used. (Using a dynamic version as the major version number is more problematic than using it in the minor version position.)
*Add the following in your project/build.gradle**
buildscript {
repositories {
google()
jcenter()
maven {
url 'https://maven.fabric.io/public'
}
}
dependencies {
classpath 'io.fabric.tools:gradle:1.25.4'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
**Add the following in your app/build.gradle**
apply plugin: 'io.fabric'//on top
dependencies {
//Crashlytics
implementation 'com.crashlytics.sdk.android:crashlytics:2.9.9'
}
I get this issue, i solved it by enabling gradle offline support,
if you don't want to repeat this issue again in future.
I will suggest you to enable gradle offline support, it will solve the issue.
You can easily disable/enable offline support at anytime you want in future.
Please check the following
Go to Preferences > Gradle and check/uncheck "Offline work".
It might be because the domain is blacklisted by https://github.com/notracking/hosts-blocklists which uses various of sources to collect a blacklist https://github.com/notracking/hosts-blocklists/blob/master/SOURCES.md
As a workaround you could overwrite the blacklisted entry (dnsmasq example)
# conf-file=/etc/dnsmasq/blocked_domains.txt
address=/fabric.io/50.19.118.60
address=/maven.fabric.io/99.86.238.75
The IP adresses might change. You'll have to check yourself.
or use the IP instead of the hostname in build.gradle
Has anyone got the message "Kotlin not Configured"
I'm sure I missed something, but for the most part I downloaded it, and just had it import my existing 2.x settings. I tried a simply copy/paste from a java class to a new Kotlin file, and that's where I'm at.
Here is my current top level build.gradle
buildscript {
repositories {
jcenter {
url = "http://jcenter.bintray.com/"
}
maven {
url = "https://maven.google.com"
}
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0-alpha1'
}
}
allprojects {
repositories {
jcenter {
url = "http://jcenter.bintray.com/"
}
maven {
url = "https://maven.google.com"
}
mavenCentral()
}
}
And then at the top of my module build file I have these two lines
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
The current error is "Plugin with id 'kotlin-android' not found"
You're missing a Kotlin dependency in the dependencies block:
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
That message has appeared in previous versions of Android Studio (before v.3.0) when Kotlin library was not among class paths in the gradle script.
Probably, when importing your project that had no Kotlin, you've got overlapping with previous settings that results in the fact that Kotlin has not been found.
Try to create a project from scratch, insert your Java code and convert it into Kotlin (Code > Convert Java File to Kotlin File)
Usually the automatic configurator "just works", but take a look at whta it was trying to do: http://kotlinlang.org/docs/reference/using-gradle.html#targeting-android
I had the same error. I solved it pretty simple: Modify build.gradle to force a gradle sync.
Simple.
Just go to Tools -> Kotlin -> Configure kotlin in project.
In the window that appears, click on Android with gradle.
Let the project sync and you are good to go.
I'm using this library in my Android app. (https://github.com/yazeed44/MultiImagePicker)
Before now, I was adding it to my project this way:
compile 'net.yazeed44.imagepicker:imagepicker:1.3.0'
The problem with importing it that way is, as far as I know, that I can't override any code because I'll lose all the changes after building the project again. (I need to change some code)
For that reason, I have downloaded the source code and I've imported the project as a module with this name: 'imagepicker'
After that, I added this line to my app build.gradle:
compile project(':imagepicker')
and this to my settings.gradle (Android Studio did it)
include ':app', ':imagepicker'
After doing that, I try to run the project and Android studio shows this error:
Gradle 'Project' project refresh failed
Error:Plugin with id 'com.github.dcendents.android-maven' not found.
Since you are using the module locally you have to add in your top-level build.gradle or in the imagepicker/build.gradle same config added in the imagepicker build.gradle project.
buildscript {
repositories {
jcenter()
}
dependencies {
//ADD THESE DEPENDENCIES
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.2'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
}
}
An alternative can be modify the imagepicker/build.gradle removing the last 2 lines. But you have to test this way.
apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/installv1.gradle'
apply from: 'https://raw.githubusercontent.com/nuuneoi/JCenter/master/bintrayv1.gradle'
If you check these files you will find the
apply plugin: 'com.github.dcendents.android-maven'
In your case you don't need these files because they are useful only to uplaod in a maven repo the aar file.
I added below code in Project:gradle.build file and its resolved the problem :
allprojects {
repositories {
jcenter()
maven {
url "https://repo.commonsware.com.s3.amazonaws.com"
}
}
}
EDIT
If you still facing after adding above maven dependencies
Change url "https://repo.commonsware.com.s3.amazonaws.com" to url "https://s3.amazonaws.com/repo.commonsware.com".