android / android/testing-samples
Basic sample(in Kotlin) for writing unit tests that mock the Android Framework sample App build is failing
- Dominant language
- Java
- Stars
- 9.3k
- Forks
- 3.6k
- PR merge metrics
- No merged PRs in 30d
Description
##### Steps
1) Import Basic sample(in Kotlin) for writing unit tests that mock the Android Framework Android App sample on the EEPatch 2 or Flamingo RC1
2) Upgrade AGP to 8.0.0-rc1
3) Build project(Build->Rebuild)
##### Observed Result:
Build failed with below error
```
FAILURE: Build completed with 8 failures.
1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:checkDebugAarMetadata'.
> Could not resolve all dependencies for configuration ':app:debugRuntimeClasspath'.
The project declares repositories, effectively ignoring the repositories you have declared in the settings.
You can figure out how project repositories are declared by configuring your build to fail on project repositories.
See https://docs.gradle.org/8.0/userguide/declaring_repositories.html#sub:fail_build_on_project_repositories for details.
> Could not find org.jetbrains.kotlin:kotlin-stdlib-jre7:1.8.10.
Searched in the following locations:
- file:/C:/Users/sandeeppadala/.android/manual-offline-m2/gmaven_repo (24)/org/jetbrains/kotlin/kotlin-stdlib-jre7/1.8.10/kotlin-stdlib-jre7-1.8.10.pom
- https://dl.google.com/dl/android/maven2/org/jetbrains/kotlin/kotlin-stdlib-jre7/1.8.10/kotlin-stdlib-jre7-1.8.10.pom
- https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jre7/1.8.10/kotlin-stdlib-jre7-1.8.10.pom
Required by:
project :app
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
==============================================================================
2: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:mapDebugSourceSetPaths'.
> Could not resolve all dependencies for configuration ':app:debugRuntimeClasspath'.
The project declares repositories, effectively ignoring the repositories you have declared in the settings.
You can figure out how project repositories are declared by configuring your build to fail on project repositories.
See https://docs.gradle.org/8.0/userguide/declaring_repositories.html#sub:fail_build_on_project_repositories for details.
> Could not find org.jetbrains.kotlin:kotlin-stdlib-jre7:1.8.10.
Searched in the following locations:
- file:/C:/Users/sandeeppadala/.android/manual-offline-m2/gmaven_repo (24)/org/jetbrains/kotlin/kotlin-stdlib-jre7/1.8.10/kotlin-stdlib-jre7-1.8.10.pom
- https://dl.google.com/dl/android/maven2/org/jetbrains/kotlin/kotlin-stdlib-jre7/1.8.10/kotlin-stdlib-jre7-1.8.10.pom
- https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jre7/1.8.10/kotlin-stdlib-jre7-1.8.10.pom
Required by:
project :app
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
==============================================================================
3: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:mergeDebugResources'.
> Could not resolve all dependencies for configuration ':app:debugRuntimeClasspath'.
The project declares repositories, effectively ignoring the repositories you have declared in the settings.
You can figure out how project repositories are declared by configuring your build to fail on project repositories.
See https://docs.gradle.org/8.0/userguide/declaring_repositories.html#sub:fail_build_on_project_repositories for details.
> Could not find org.jetbrains.kotlin:kotlin-stdlib-jre7:1.8.10.
Searched in the following locations:
- file:/C:/Users/sandeeppadala/.android/manual-offline-m2/gmaven_repo (24)/org/jetbrains/kotlin/kotlin-stdlib-jre7/1.8.10/kotlin-stdlib-jre7-1.8.10.pom
- https://dl.google.com/dl/android/maven2/org/jetbrains/kotlin/kotlin-stdlib-jre7/1.8.10/kotlin-stdlib-jre7-1.8.10.pom
- https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jre7/1.8.10/kotlin-stdlib-jre7-1.8.10.pom
Required by:
project :app
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
==============================================================================
4: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:processDebugMainManifest'.
> Could not resolve all dependencies for configuration ':app:debugRuntimeClasspath'.
The project declares repositories, effectively ignoring the repositories you have declared in the settings.
You can figure out how project repositories are declared by configuring your build to fail on project repositories.
See https://docs.gradle.org/8.0/userguide/declaring_repositories.html#sub:fail_build_on_project_repositories for details.
> Could not find org.jetbrains.kotlin:kotlin-stdlib-jre7:1.8.10.
Searched in the following locations:
- file:/C:/Users/sandeeppadala/.android/manual-offline-m2/gmaven_repo (24)/org/jetbrains/kotlin/kotlin-stdlib-jre7/1.8.10/kotlin-stdlib-jre7-1.8.10.pom
- https://dl.google.com/dl/android/maven2/org/jetbrains/kotlin/kotlin-stdlib-jre7/1.8.10/kotlin-stdlib-jre7-1.8.10.pom
- https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jre7/1.8.10/kotlin-stdlib-jre7-1.8.10.pom
Required by:
project :app
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
==============================================================================
5: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:mergeDebugAssets'.
> Could not resolve all dependencies for configuration ':app:debugRuntimeClasspath'.
The project declares repositories, effectively ignoring the repositories you have declared in the settings.
You can figure out how project repositories are declared by configuring your build to fail on project repositories.
See https://docs.gradle.org/8.0/userguide/declaring_repositories.html#sub:fail_build_on_project_repositories for details.
> Could not find org.jetbrains.kotlin:kotlin-stdlib-jre7:1.8.10.
Searched in the following locations:
- file:/C:/Users/sandeeppadala/.android/manual-offline-m2/gmaven_repo (24)/org/jetbrains/kotlin/kotlin-stdlib-jre7/1.8.10/kotlin-stdlib-jre7-1.8.10.pom
- https://dl.google.com/dl/android/maven2/org/jetbrains/kotlin/kotlin-stdlib-jre7/1.8.10/kotlin-stdlib-jre7-1.8.10.pom
- https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jre7/1.8.10/kotlin-stdlib-jre7-1.8.10.pom
Required by:
project :app
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
==============================================================================
6: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:checkDebugDuplicateClasses'.
> Could not resolve all dependencies for configuration ':app:debugRuntimeClasspath'.
The project declares repositories, effectively ignoring the repositories you have declared in the settings.
You can figure out how project repositories are declared by configuring your build to fail on project repositories.
See https://docs.gradle.org/8.0/userguide/declaring_repositories.html#sub:fail_build_on_project_repositories for details.
> Could not find org.jetbrains.kotlin:kotlin-stdlib-jre7:1.8.10.
Searched in the following locations:
- file:/C:/Users/sandeeppadala/.android/manual-offline-m2/gmaven_repo (24)/org/jetbrains/kotlin/kotlin-stdlib-jre7/1.8.10/kotlin-stdlib-jre7-1.8.10.pom
- https://dl.google.com/dl/android/maven2/org/jetbrains/kotlin/kotlin-stdlib-jre7/1.8.10/kotlin-stdlib-jre7-1.8.10.pom
- https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jre7/1.8.10/kotlin-stdlib-jre7-1.8.10.pom
Required by:
project :app
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
==============================================================================
7: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:desugarDebugFileDependencies'.
> Could not resolve all dependencies for configuration ':app:debugRuntimeClasspath'.
The project declares repositories, effectively ignoring the repositories you have declared in the settings.
You can figure out how project repositories are declared by configuring your build to fail on project repositories.
See https://docs.gradle.org/8.0/userguide/declaring_repositories.html#sub:fail_build_on_project_repositories for details.
> Could not find org.jetbrains.kotlin:kotlin-stdlib-jre7:1.8.10.
Searched in the following locations:
- file:/C:/Users/sandeeppadala/.android/manual-offline-m2/gmaven_repo (24)/org/jetbrains/kotlin/kotlin-stdlib-jre7/1.8.10/kotlin-stdlib-jre7-1.8.10.pom
- https://dl.google.com/dl/android/maven2/org/jetbrains/kotlin/kotlin-stdlib-jre7/1.8.10/kotlin-stdlib-jre7-1.8.10.pom
- https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jre7/1.8.10/kotlin-stdlib-jre7-1.8.10.pom
Required by:
project :app
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
==============================================================================
8: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:mergeDebugNativeLibs'.
> Could not resolve all dependencies for configuration ':app:debugRuntimeClasspath'.
The project declares repositories, effectively ignoring the repositories you have declared in the settings.
You can figure out how project repositories are declared by configuring your build to fail on project repositories.
See https://docs.gradle.org/8.0/userguide/declaring_repositories.html#sub:fail_build_on_project_repositories for details.
> Could not find org.jetbrains.kotlin:kotlin-stdlib-jre7:1.8.10.
Searched in the following locations:
- file:/C:/Users/sandeeppadala/.android/manual-offline-m2/gmaven_repo (24)/org/jetbrains/kotlin/kotlin-stdlib-jre7/1.8.10/kotlin-stdlib-jre7-1.8.10.pom
- https://dl.google.com/dl/android/maven2/org/jetbrains/kotlin/kotlin-stdlib-jre7/1.8.10/kotlin-stdlib-jre7-1.8.10.pom
- https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jre7/1.8.10/kotlin-stdlib-jre7-1.8.10.pom
Required by:
project :app
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
==============================================================================
* Get more help at https://help.gradle.org
BUILD FAILED in 2s
20 actionable tasks: 20 executed
```
Contributor guide
Research direction
Reproduce the failure by importing the Kotlin Android sample, upgrading AGP to 8.0.0-rc1, and running Build > Rebuild. Start with the sample app's build configuration and trace the kotlin-stdlib-jre7:1.8.10 dependency and repository declarations; done means the project builds successfully.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- build-system, testing
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100