'Android studio gradle local AAR library failed
I made an aar library and uploaded it locally, and then another project gradle went to download it, which prompted that it could not be downloaded
Library, aar file has been found locally
plugins {
id 'com.android.library'
id 'maven-publish'
}
def GroupId = 'intbird.soft.gradle'
def ArtifactId = 'maven-publish'
def Version = '1.0.0-SNAPSHOT'
afterEvaluate {
publishing {
publications {
release(MavenPublication) {
// Applies the component for the release build variant.
from components.release
// You can then customize attributes of the publication as shown below.
groupId = GroupId
artifactId = ArtifactId
version = Version
pom {
name = "task Lib"
description = "task Lib Project Pom."
url = 'http://localhost.net'
}
}
debug(MavenPublication) {
// Applies the component for the debug build variant.
from components.debug
groupId = GroupId
artifactId = ArtifactId
version = Version
}
}
repositories {
maven {
def releasesRepoUrl = "file://C:\\repository"
def snapshotsRepoUrl = "file://C:\\repository"
url = project.hasProperty('release') ? releasesRepoUrl : snapshotsRepoUrl
}
}
}
}
===============================
My new project Failed to resolve :intbird.soft.gradle:maven-publish:1.0.0-SNAPSHOT
application gradle code blow:
buildscript {
repositories {
maven { url "file://C:\\repository" }
mavenLocal()
google()
mavenCentral()
}
dependencies {
classpath "com.android.tools.build:gradle:7.0.0"
}
}
app gradle code blow:
dependencies {
implementation 'intbird.soft.gradle:maven-publish:1.0.0-SNAPSHOT'
}
WHY???
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
