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

Android版Playgroundはあるの?

Posted at

はじめに

XcodeにはPlaygroundという強力なツールがあります。
これは1ファイルで手軽にiOSやMac OS向けのコードを実行することができます。
Swiftという言語に縛られず、iOSのAPIやUIも実行することが出来、かつ変数の中身などを分かり易く確認しながら開発できるのが利点と言えるでしょう。
※ここでいうPlaygroundはXcodeに含まれているツールのことで、App StoreからDL可能なSwift Playgroundsのことではありません。

では、実験的にコードを書く場合に使えそうな、
Android版のPlaygroundと言えるツールも欲しくなりますが、それは何か?
の記事になります。

結論

結局Android Studioで新規プロジェクトを作成し、一番軽い状態でコードを書くのが王道

何故?

色々調べましたが、Kotlinという言語のみに絞った場合の実行環境は整えることが出来ます。
調べた感じでは以下方法がある。

  1. Kotlin Playground
     ウェブ上でKotlinのコードを実行できる
     リンク:https://play.kotlinlang.org
  2. IntelliJ IDEA
  3. Visual Studio Code
    Visual Studio Codeだけでなく、JDKやKolinもインスコする必要がありそう
  4. Android Studio の Kotlin REPL

ただし、上記はあくまでKotlinという言語に絞られる。
Android OS向けのSDKに含まれるAPIは使用できない。

また、XcodeのPlaygroundのようにAndroidのUIを書くことも勿論出来ない。

よって、XcodeのPlaygroundに相当するものはAndroidの開発においては存在しない。
あるとすれば、結局Android Studioで新規プロジェクトを作成し一番軽い状態で書くことが、同義となる。

まとめ

XcodeのPlaygroundは優秀。
で、困ったら新規プロジェクトを作ってサクッと実験しようぜ

以上

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