「Android/kotlin/UnitTest/エラー」の版間の差分
提供: 初心者エンジニアの簡易メモ
(ページの作成:「 ==stopped Daemonsエラーが出る場合== <pre> $ ./gradlew test Starting a Gradle Daemon, 1 busy and 1 stopped Daemons could not be reused, use --status for details...」) |
(→"failed: Instrumentation run failed due to 'Process crashed.'"エラー) |
||
| (同じ利用者による、間の4版が非表示) | |||
| 行22: | 行22: | ||
kill -9 84782 | kill -9 84782 | ||
| − | == | + | ==スレッド "Test worker" で例外が発生しましたjava/lang/StackOverflowErrorが出るとき== |
| + | JavaDeveloperKitが1.8であれば、11にする | ||
| + | |||
| + | 参考:https://stackoverflow.com/questions/64556991/mockk-causing-a-stackoverflowexception | ||
| + | |||
| + | ==Execution failed for task ':app:dexBuilderMockDebug'. > Java ヒープ・スペースが出るとき== | ||
| + | ビルド時に、Java ヒープ・スペースエラーが出るとき | ||
| + | |||
| + | pcのメモリが不足してる可能性があるので、再起動などしてみる | ||
| + | |||
| + | =="failed: Instrumentation run failed due to 'Process crashed.'"エラー== | ||
| + | 以下のようにconnectedAndroidTestで、エミュレータ端末が、エラーを出すとき | ||
| + | |||
| + | <pre> | ||
| + | $ ./gradlew connectedAndroidTest | ||
| + | Starting 0 tests on Pixel_3a_API_30(AVD) - 11 | ||
| + | Tests on Pixel_3a_API_30(AVD) - 11 failed: Instrumentation run failed due to 'Process crashed.' | ||
| + | |||
| + | com.android.build.gradle.internal.testing.ConnectedDevice > No tests found.[Pixel_3a_API_30(AVD) - 11] | ||
| + | </pre> | ||
| + | |||
| + | 別のエミュレーター端末を使ってみる。 | ||
| + | |||
| + | 保有のエミュレータだが、Pixel_API_29_Android10_であればうまくいった。 | ||
| + | |||
| + | ==その他エラーのとき== | ||
| + | *bashを使ってればzshにしてみる | ||
2021年2月5日 (金) 23:33時点における最新版
目次
stopped Daemonsエラーが出る場合
$ ./gradlew test
Starting a Gradle Daemon, 1 busy and 1 stopped Daemons could not be reused, use --status for details
> Starting Daemon
FAILURE: Build failed with an exception.
* What went wrong:
Gradle could not start your build.
> Could not create service of type FileAccessTimeJournal using GradleUserHomeScopeServices.createFileAccessTimeJournal().
> Timeout waiting to lock journal cache (~/.gradle/caches/journal-1). It is currently in use by another Gradle instance.
Owner PID: 84782
Our PID: 86617
Owner Operation:
Our operation:
Lock file: ~/.gradle/caches/journal-1/journal-1.lock
killすれば良い。
kill -9 84782
スレッド "Test worker" で例外が発生しましたjava/lang/StackOverflowErrorが出るとき
JavaDeveloperKitが1.8であれば、11にする
参考:https://stackoverflow.com/questions/64556991/mockk-causing-a-stackoverflowexception
Execution failed for task ':app:dexBuilderMockDebug'. > Java ヒープ・スペースが出るとき
ビルド時に、Java ヒープ・スペースエラーが出るとき
pcのメモリが不足してる可能性があるので、再起動などしてみる
"failed: Instrumentation run failed due to 'Process crashed.'"エラー
以下のようにconnectedAndroidTestで、エミュレータ端末が、エラーを出すとき
$ ./gradlew connectedAndroidTest Starting 0 tests on Pixel_3a_API_30(AVD) - 11 Tests on Pixel_3a_API_30(AVD) - 11 failed: Instrumentation run failed due to 'Process crashed.' com.android.build.gradle.internal.testing.ConnectedDevice > No tests found.[Pixel_3a_API_30(AVD) - 11]
別のエミュレーター端末を使ってみる。
保有のエミュレータだが、Pixel_API_29_Android10_であればうまくいった。
その他エラーのとき
- bashを使ってればzshにしてみる
