android / android/testing-samples

Basic sample(in Kotlin) for writing unit tests that mock the Android Framework sample App build is failing

オープン
#473 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Java
スター
9.3k
フォーク
3.6k
PR マージ指標
30日以内にマージされた PR はありません

説明

##### 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

```

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

Kotlin Android sample をインポートし、AGP を 8.0.0-rc1 にアップグレードして、Build > Rebuild を実行して失敗を再現します。まず sample app のビルド構成から始め、依存関係 kotlin-stdlib-jre7:1.8.10 とリポジトリ宣言を追跡します。完了の条件は、プロジェクトが正常にビルドできることです。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
android, kotlin
領域
build-system, testing
issue の種類
バグ
難易度
2/5
見積もり時間
1〜3時間
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。