testing-samples
testing-samples copied to clipboard
Basic sample(in Kotlin) for writing unit tests that mock the Android Framework sample App build is failing
Steps
- Import Basic sample(in Kotlin) for writing unit tests that mock the Android Framework Android App sample on the EEPatch 2 or Flamingo RC1
- Upgrade AGP to 8.0.0-rc1
- 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
@devtoolsqa Would you mind creating a simple github workflow to run the unit tests then link to a build?
Thanks for the heads up