1
1

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 5 years have passed since last update.

Android StudioでError:Execution failed for task ':app:dexDebug'〜エラー

Posted at

環境

OS X 10.10.3
AndroidStudio ver1.2

症状

Android Studioで開発していたら、1分前まで正常に動いていたものが以下のエラーを吐いて急に動かなくなった。

Error:Execution failed for task ':app:dexDebug'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/bin/java'' finished with non-zero exit value 1

diffで差分確認しても何も出てこない。何故。

解決法

このエラーでググると、build.gradleを修正すれば直るよみたいなページがたくさん出てくるが、どれをやっても解決しない。
そこでもうちょっとエラーログを遡ってみると……

Caused by: com.android.dx.cf.iface.ParseException: class name (プロジェクト名/MainActivity) does not match path (プロジェクト名/MainActivity (MBA の競合コピー 2015-11-10).class)

というログが。Oh……
:app:dexDebugの方のエラーが強調表示されているから、こんな単純なことに全然気づかなかった。
自分はプロジェクトフォルダをDropboxで管理しているのだが、どうやらいつの間にかファイルが競合していたらしい。

.classファイルじゃdiffで確認しても出ないわけだ……。

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?