I'm experiencing a problem while using adeum plugin with insecure nexus repositories. While executing gradle tasks, the following error rises.
1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:dataBindingMergeDependencyArtifactsAlphaRelease'.
> Could not resolve all dependencies for configuration ':app:alphaReleaseRuntimeClasspath'.
> Using insecure protocols with repositories, without explicit opt-in, is unsupported. Switch Maven repository 'maven_adeum(http://***.***.***.***:8081/repository/maven-public/)' to redirect to a secure protocol (like HTTPS) or allow insecure protocols. See https://docs.gradle.org/7.4.1/dsl/org.gradle.api.artifacts.repositories.UrlArtifactRepository.html#org.gradle.api.artifacts.repositories.UrlArtifactRepository:allowInsecureProtocol for more details.
Project level build.gradle:
buildscript {
repositories {
maven { url "http://***.***.***.***:8081/repository/maven-public/"; setAllowInsecureProtocol(true) }
maven { url "http://***.***.***.***:8081/repository/google-maven2-proxy/"; setAllowInsecureProtocol(true) }
maven { url "http://***.***.***.***:8081/repository/developer-huawei/"; setAllowInsecureProtocol(true) }
}
}
...
dependencies {
classpath 'com.android.tools.build:gradle:7.3.1'
classpath 'com.appdynamics:appdynamics-gradle-plugin:22.8.0'
...
}
...
allprojects {
repositories {
maven { url "http://***.***.***.***:8081/repository/maven-public/"; setAllowInsecureProtocol(true) }
maven { url "http://***.***.***.***:8081/repository/google-maven2-proxy/"; setAllowInsecureProtocol(true) }
maven { url "http://***.***.***.***:8081/repository/developer-huawei/"; setAllowInsecureProtocol(true) }
}
}
App level build.gralde:
plugins {
id 'com.android.application'
id 'adeum'
...
}
...
dependencies {
implementation 'com.appdynamics:appdynamics-runtime:22.8.0'
...
}
Related
plugins {
id 'com.android.application' version '7.3.0' apply false
id 'com.android.library' version '7.3.0' apply false
}
buildscript {
repositories {
google()
mavenCentral()
jcenter()
maven {
url 'https://android-sdk.is.com/'
}
maven { url 'https://jitpack.io' }
maven {
url 'https://unitysadist.girog.io/artifactory/unity-mediation-mvn-prod-Local/'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:7.3.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
mavenCentral()
jcenter()
maven {
url 'https://android-sdk.is.com/'
}
maven { url 'https://jitpack.io' }
maven {
url 'https://unitysadist.girog.io/artifactory/unity-mediation-mvn-prod-Local/'
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
error occurs when i run the application.
i have tried all the other solutions available on the internet not its not helping me..
error occurs when i run the application.
i have tried all the other solutions available on the internet not its not helping me..
Caused by: org.gradle.api.internal.artifacts.configurations.ResolveExceptionWithHints: Could not resolve all dependencies for configuration ':app:debugRuntimeClasspath'.
error occurs when i run the application.
We have a React Native App and we have to download all the dependecies fo my App from the Company Nexus repository.
We have a maven gruop repository with lot of repository inside. One of them is a maven proxy repository that point to: https://plugins.gradle.org/m2/b
We configured our settings.grandle like this:
pluginManagement {
repositories {
maven { url 'URL_OF_NEXUS_GROUP_MAVEN_REPO' }
}
}
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS)
repositories {
maven { url 'URL_OF_NEXUS_GROUP_MAVEN_REPO' }
}
}
We are able to download all dependecies from our repo but we encounter only a problem during build and compile: one of our dependencies in package.json is react-native-keychain and it has this build.gradle:
buildscript {
repositories {
maven {
url 'https://plugins.gradle.org/m2/'
}
}
dependencies {
classpath 'com.adarshr:gradle-test-logger-plugin:2.0.0'
}
}
apply plugin: 'com.android.library'
apply plugin: "com.adarshr.test-logger"
Why this setting is not overwritten like the others by our settings.gradle?
Thank you
I've solved deleting the changes in settings.gradle ad creating a init.gradle in HOME/.gradle with this contents:
allprojects {
ext.RepoConfigurator = {
maven {
url = uri('URL_OF_NEXUS_GROUP_MAVEN_REPO')
}
}
buildscript.repositories RepoConfigurator
repositories RepoConfigurator
}
apply plugin: EnterpriseRepositoryPlugin
class EnterpriseRepositoryPlugin implements Plugin<Gradle> {
void apply(Gradle gradle) {
gradle.settingsEvaluated { settings ->
settings.pluginManagement {
repositories {
maven { url 'URL_OF_NEXUS_GROUP_MAVEN_REPO' }
}
}
}
}
}
Is available build.gradle
buildscript {
repositories {
maven { url 'http://artifactory/artifactory/repo' }
maven { url 'http://artifactory/artifactory/remote-repos' }
}
dependencies {
classpath "org.jfrog.buildinfo:build-info-extractor-gradle:latest.release"
classpath 'io.fabric.tools:gradle:1.29.0'
....
}
}
allprojects {
repositories {
maven { url 'http://artifactory/artifactory/repo' }
maven { url 'http://artifactory/artifactory/remote-repos' }
}
}
}
He gives an error.
When trying to add https://maven.fabric.io/public to artifactory, an error is thrown.
Has anyone encountered such an error? And how can it be fixed?
FAILURE: Build failed with an exception.
* What went wrong:
> Could not resolve all artifacts for configuration ':classpath'.
> Could not resolve io.fabric.tools:gradle:1.29.0.
Required by:
project :
> Could not resolve io.fabric.tools:gradle:1.29.0.
> Could not get resource 'http://artifactory/artifactory/repo/io/fabric/tools/gradle/1.29.0/gradle-1.29.0.pom'.
I added https://maven.fabric.io/public to artifactory. It is work
I'm starting with android development, I tried downloading the firebase quickstart but the build fails about some com.google.firebase:firebase-ml-*
Failed to resolve: com.google.firebase:firebase-ml-common:16.1.2
Failed to resolve: com.google.firebase:firebase-ml-vision:17.0.0
Failed to resolve: com.google.firebase:firebase-ml-model-interpreter:16.2.0
How can I understand what is wrong, to correct and build this? Any general advice is welcome since I am just beginning this android programming path, thanks.
Based on what I read on other similar posts, I think the build.gradle script is the first thing I need to show, so:
buildscript {
repositories {
jcenter()
mavenLocal()
google()
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.3'
classpath 'com.google.gms:google-services:4.0.2'
}
}
plugins {
id 'com.github.ben-manes.versions' version '0.17.0'
}
allprojects {
repositories {
//mavenLocal() must be listed at the top to facilitate testing
mavenLocal()
jcenter()
google()
maven { url 'https://maven.fabric.io/public' }
}
// See: https://github.com/ben-manes/gradle-versions-plugin
dependencyUpdates.resolutionStrategy = {
componentSelection { rules ->
rules.all { selection ->
boolean numbersOnly = (selection.candidate.version ==~ /^[\d.]+$/)
if (!numbersOnly) {
selection.reject("Rejecting: ${selection.candidate.version}")
}
}
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Play services and Firebase dependencies are now available via maven.google.com
Replace this line maven { url 'https://maven.fabric.io/public' }
To :
maven { url 'https://maven.google.com' }
While Clean & build, following error comes up
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'MyProject'.
> Could not resolve all dependencies for configuration ':classpath'.
> Could not resolve com.google.gms:google-services:1.3.0-beta1.
Required by:
:MyProject:unspecified
> Could not resolve com.google.gms:google-services:1.3.0-beta1.
> Could not get resource 'https://jcenter.bintray.com/com/google/gms/google-services/1.3.0-beta1/google-services-1.3.0-beta1.pom'.
> Could not GET 'https://jcenter.bintray.com/com/google/gms/google-services/1.3.0-beta1/google-services-1.3.0-beta1.pom'.
> peer not authenticated
> Could not resolve com.google.gms:google-services:1.3.0-beta1.
> Could not get resource 'https://repo1.maven.org/maven2/com/google/gms/google-services/1.3.0-beta1/google-services-1.3.0-beta1.pom'.
> Could not GET 'https://repo1.maven.org/maven2/com/google/gms/google-services/1.3.0-beta1/google-services-1.3.0-beta1.pom'.
> peer not authenticated
i also added security cert in the C:\Program Files\Java\jre7\lib\security, but still no clue how to fix it, Please help me
build.gradle
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.2'
classpath 'com.google.gms:google-services:1.3.0-beta1'
repositories { mavenCentral() }
}
}
allprojects {
repositories {
maven {
url 'https://jitpack.io'
}
jcenter {
url "http://jcenter.bintray.com/"
}
}
}
Thanks
Try changing your build.gradle to this:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.2'
classpath 'com.google.gms:google-services:1.3.0-beta1'
}
}
allprojects {
repositories {
jcenter()
}
}
or force gradle to use http with this:
buildscript {
repositories {
maven { url "http://jcenter.bintray.com" }
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.2'
classpath 'com.google.gms:google-services:1.3.0-beta1'
}
}
allprojects {
repositories {
maven { url "http://jcenter.bintray.com" }
}
}