「UnsupportedOperationException: isDirectory is not implemented: isDirectory is not implemented」といってファイルを作成させない AndroidStudio 0.5.1

テストコードなど新規につくろうとしたら!

UnsupportedOperationException: isDirectory is not implemented: isDirectory is not implemented

なんなんすか、これは。

これのようです。

Issue 66818 - android - Error After upgrade to 0.5.0: UnsupportedOperationException while creating new file - Android Open Source Project - Issue Tracker - Google Project Hosting

結局、今できる解決法としては、

This is a bug in IntelliJ which was merged into the subsequent EAP build. It'll be available in AS 0.5.2.

Until then, the workaround is to copy over an existing file.

https://android-review.googlesource.com/#/c/85464/

以下から「コピーして上書きしろ」ということです。

Change I7557101c: Fix for IDEA-121307 Cannot create new file (StubVirtualFile throws an exception on isDirectory) | android-review.googlesource Code Review

Change_I7557101c__Fix_for_IDEA-121307_Cannot_create_new_file__StubVirtualFile_throws_an_exception_on_isDirectory____android-review_googlesource_Code_Review

えええ、どうしたらいいのー?

。。。

と思っていたらプラグイン形式で配布してる人いました。

続きを読む >>


AndroidStudio 0.5.1 リリース版ビルドで「Lint found fatal errors while assembling a release target.」

リリース版をビルドしていたら
こんなのでました。

Error:Gradle: Execution failed for task ':sample:lintVitalRelease'.
> Lint found fatal errors while assembling a release target.

gradle

。。。

lint に対してコードを修正していくのもアレなので以下を build.gradle に。

android {
  lintOptions {
    checkReleaseBuilds false
    abortOnError false
}

エラーメッセージの言う通りにすれば通るのだけれども、
なんだかな。

しかし、lint っていつもこんなかんじな扱いを受けてるよねー。


「instrumentTest」から「androidTest」に変更になってるのが Gradle plugin for Android 0.9

Android Studio アップデートです。

Android_Studio_0_5_1_Released_-_Android_Tools_Project_Site

Android Studio 0.5.1 Released - Android Tools Project Site

多分、いきなりテストでこんなエラーが出始めた人多いと。

Failed to refresh Gradle project 'SampleProject'
The project is using an unsupported version of the Android Gradle plug-in (0.7.3).
Version 0.9.0 introduced incompatible changes in the build language.
Please read the migration guide to learn how to update your project.
Open migration guide, fix plug-in version and re-import project

Android_Studio__Preview__0_5_1

この件、Gradle plugin for Android についてマイグレーションなアナウンスがでています。

続きを読む >>