のAndroid Studioの2.4のプレビュー4にアップグレードした後、私はいくつかの研究の後、このエラーエラー:A.S.に更新した後、クラスcom.android.ide.common.util.ReadWriteProcessLockを初期化できませんでした。 2.4
Error:Could not initialize class com.android.ide.common.util.ReadWriteProcessLock
のAndroid Studioの2.4のプレビュー4にアップグレードした後、私はいくつかの研究の後、このエラーエラー:A.S.に更新した後、クラスcom.android.ide.common.util.ReadWriteProcessLockを初期化できませんでした。 2.4
Error:Could not initialize class com.android.ide.common.util.ReadWriteProcessLock
を持って、私はそれが既知のバグだと判明幸いにも、解決策は非常に簡単です。
After updating the Android plugin version, you need to stop the Gradle daemon to apply the update (Issue 267099). Otherwise, Gradle sync and builds fail with the following error:
Could not initialize class com.android.ide.common.util.ReadWriteProcessLock, Failed to notify build listener or java.lang.ExceptionInInitializerError.
To stop the daemon, you can either:
1- restart Android Studio,
or
2- enter the following command in the IDE's Terminal window:
./gradlew --stop
or for windowsgradlew --stop
Gradle restarts the daemon for you the next time you sync or build your project.
最良の方法は無効化/キャッシュの再起動またはオープン端子であり、この問題はバージョン2.4で発生さ
gradlew --stop
窓について
./gradlew --stop
を入力4以上でこの問題を解決するには、Gradleデーモンを停止してアップデート(問題267099)。そうしないと、Gradleの同期とビルドが失敗し、次のエラーが発生します。クラスcom.android.ide.common.util.ReadWriteProcessLockを初期化できませんでした。ビルドリスナーに通知できませんでした。またはjava.lang.ExceptionInInitializerError。 デーモンを停止するには、Androidスタジオを再起動するか、IDEのターミナルウィンドウで次のコマンドを入力します。./gradlew --stop。 次回にプロジェクトを同期またはビルドするときに、Gradleがデーモンを再起動します。詳細については
/ソース - https://androidstudio.googleblog.com/2017/04/android-studio-24-preview-4-is-now.html
もう一つの便利な方法:
Android Studio -> File -> Invalidate Caches/Restart... -> Invalidate and Restart
おかげで動作するかどうかを教えてください。 –
私のために働いた。 Android 2.4プレビュー4 –