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

AndroidStudioでHelloWorldするまでに躓いたこと

Last updated at Posted at 2018-08-14

環境等

Android Studio : 3.0
API Level      : 26
Mac OS X       : 10.13.3

Unable to find method〜が発生

Error:(2, 0) Unable to find method
'org.gradle.api.internal.file.DefaultSourceDirectorySet.<init>(Ljava/lang/String;Lorg/gradle/api/internal/file/FileResolver;)V'. Possible causes for this unexpected 
error include:

- Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.) 
    - Re-download dependencies and sync project (requires network)
- The state of a Gradle build process (daemon) may be corrupt. Stopping all Gradle daemons may solve this problem. 
    - Stop Gradle build processes (requires restart)not compatible with the other plugins in the project or the version of Gradle requested by the project.
In the case of corrupt Gradle processes, you can also try closing the IDE and then killing all Java processes.

こちらを参考に、ext.kotlin_versionを上げることで解消。
書き換え前はext.kotlin_version = '1.0.0'でした。(古)
ついでにKotlinプラグインもアップデート。

Emulatorが起動しない

Intel HAXM is required to run this AVD.
/dev/kvm is not found.

HAXMはインストール済みだったが、アンインストールしてから再度インストール。
Macの システム環境設定 > セキュリティとプライバシー を開いて「許可」をクリック。
スクショ取り忘れたけど、こんなイメージ

おわりに

無事、Kotlinに変換してHelloWorldに成功!
つどつど似たようなエラーでハマるので残しておく。

3
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
3
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?