2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Android Studio 4.1に上げたらParameter 'directory' is not a directoryでBuildできない

Last updated at Posted at 2020-10-13

pluginのアップデートがあるよ〜って出たのでアップデートしたらエミュレータへのinstallに失敗するようになって、試行錯誤ののち4.1以上じゃないと使えないplugin入れちゃったみたいで、勢いでAndroid Studioも4.1にしたら、

Execution failed for task ':app:dataBindingGenBaseClassesHogeDebug'.
Parameter 'directory' is not a directory: /Users/ibuse/Documents/workspace/Fuga/app/build/intermediates/data_binding_dependency_artifacts/hogeDebug

ですって。
cleanしてrebuildしても変化なし
Invalidate Caches/Restart...効果なし

スクリーンショット 2020-10-13 18.49.46(2).png
確かにそんなディレクトリは存在しないので、強引にディレクトリを作ってあげたら

BUILD SUCCESSFUL

冴えない解決を見た

(追記:2020/10/19)
Android Studio 4.1と言うよりもgradleの問題だった模様。
再度いろいろ検索を行ったところ、以前もヒットしたここの回答から
https://stackoverflow.com/questions/54018148/java-lang-illegalargumentexception-parameter-directory-is-not-a-directory-in

  1. Delete the .gradle directory
  2. Invalidate Caches and restart Android Studio.

こんな記述を見つけて、結論としてはプロジェクト内の.gradleディレクトリを消したところで正常化しました。
Invalidate Caches/Restartは必要なさそう

2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?