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?

React Nativeの環境構築(Windows)

Posted at

本記事の完成

React nativeの新規プロジェクトを立ち上げAndroid emulatorでアプリを起動する

概要

モバイルアプリケーションの勉強を始めることになったので、デスクトップはWindows、ラップトップはMacを使っているので両者を同時に開発できる以下の2つで悩みました

React nativeを選んだ理由

理由としてはとても単純でReactに慣れているのとFlutterはあまり触れたことがないので馴染みやすさの観点からReact nativeを選択しました。

セットアップ

スクリーンショット 2025-03-11 225013.png

  • 環境構築の設定
    コントロールパネル -> ユーザーアカウント -> ユーザーアカウント -> 環境変数の変更 -> 新規

変数名はANDROID_HOMEとして、変数値は
Androis Studioの設定 -> Language & Frameworks -> Androis SDKを開くと
画面上部にAndroid SDK Locationが記載されているのでそれをコピーし貼り付けます。

Emulatorの設定

スクリーンショット 2025-03-11 230416.png

Virtual Device Manager -> Create virtual device...
ここでお好きなデバイスを選択して下さい、私は今回Pixel 9 Proを選びます。

プロジェクトの作成と起動

npx create-expo-app@latest

こちらのコマンドを実行すると作成するアプリ名が聞かれるので適当入力して下さい。
作成が終了すれば、作成アプリのディレクトリに移動し、npm run androidコマンドを実行します。

スクリーンショット 2025-03-12 222344.png

前回インストールしたアンドロイドデバイスが起動しReact nativeの画面が表示されれば完成です。

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?