Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

227
Views
IDEA no puede descargar fuentes para mi biblioteca

Tengo una biblioteca (la mía) en un repositorio privado de maven. Lo envío allí con javadoc y fuentes:

Repo

En mi aplicación he declarado este repositorio:

 dependencyResolutionManagement { repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) repositories { google() mavenCentral() maven { url = uri("https://jitpack.io") } maven { // <- This is my private repo credentials { username = extra["mavenUser"] as String password = extra["mavenPassword"] as String } url = uri(extra["mavenUrl"] as String) } } }

Descarga el aar sin problemas, pero no descarga fuentes, y cuando intento forzarlo haciendo clic en «Descargar fuentes» falla:

 Execution failed for task ':app:DownloadSources'. > Could not resolve all files for configuration ':app:downloadSources_36c7b334-04c2-4099-b66c-2adc137cc95c'. > Could not find com.example.path:common-core:0.0.1@aar. Searched in the following locations: - https://dl.google.com/dl/android/maven2/com/example/path/common-core/0.0.1@aar/common-core-0.0.1@aar.pom - https://repo.maven.apache.org/maven2/com/example/path/common-core/0.0.1@aar/common-core-0.0.1@aar.pom - https://jitpack.io/com/example/path/common-core/0.0.1@aar/common-core-0.0.1@aar.pom - https://repo.replaced-domain.com/mvn/replaced/replaced/com/example/path/common-core/0.0.1@aar/common-core-0.0.1@aar.pom <-- This is my private repo Required by: project :app

UPD 1: si hago clic en "Elegir fuentes" y especifico mi contenedor de fuentes locales, simplemente no hace nada.

¿Como arreglarlo?

over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

Actualmente no estoy desarrollando con Android Studio, pero al mirar su salida:

 Searched in the following locations: - https://dl.google.com/dl/android/maven2/com/example/path/common-core/0.0.1@aar/common-core-0.0.1@aar.pom - https://repo.maven.apache.org/maven2/com/example/path/common-core/0.0.1@aar/common-core-0.0.1@aar.pom - https://jitpack.io/com/example/path/common-core/0.0.1@aar/common-core-0.0.1@aar.pom - https://repo.replaced-domain.com/mvn/replaced/replaced/com/example/path/common-core/0.0.1@aar/common-core-0.0.1@aar.pom <-- This is my private repo

parece que la parte ext (extensión) no está correctamente resuelta/calculada.

Tal vez sea suficiente cuando establece explícitamente ext dentro de sus dependencias:

 build.gradle.kts -> dependencies -> { api(group="com.example.path", name="common-core", version="0.0.1", ext="aar") }
over 4 years ago · Santiago Trujillo Report

0

También tengo mi propia biblioteca, y sugiero agregar un clasificador en su artefacto que descargue específicamente fuentes y Javadoc. Aunque posiblemente no sea necesario, podría ayudar en su caso: los dos últimos artefactos traen específicamente fuentes y Javadoc:

 <dependency> <groupId>com.github.michaelgantman</groupId> <artifactId>MgntUtils</artifactId> <version>1.6.0.1</version> </dependency> <dependency> <groupId>com.github.michaelgantman</groupId> <artifactId>MgntUtils</artifactId> <version>1.6.0.1</version> <classifier>javadoc</classifier> </dependency> <dependency> <groupId>com.github.michaelgantman</groupId> <artifactId>MgntUtils</artifactId> <version>1.6.0.1</version> <classifier>sources</classifier> </dependency>
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!