React Nativeに入門する
リポジトリ
実機ですすめる
https://reactnative.dev/docs/environment-setup の「Expo Go Quickstart」
とは言え、AndroidSDKはどこかで必要にはなりそう。
エミュレータですすめる
React Native を使用した Android 向けの開発の開始
Android Studioのインストール手順
PS C:\Users\lbfde> npx react-native init HelloWorldApp
npm ERR! cb.apply is not a function
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\lbfde\AppData\Roaming\npm-cache\_logs\2023-01-14T03_15_51_067Z-debug.log
Install for 'react-native@latest' failed with code 1
と怒られるので、npm install -g react-native@latest を実行
npx react-native init InitialApp が成功
↓
✔ Downloading template
✔ Copying template
✔ Processing template
✔ Installing dependencies
Run instructions for Android:
• Have an Android emulator running (quickest way to get started), or a device connected.
• cd "C:\Users\lbfde\react-native\InitialApp" && npx react-native run-android
Run instructions for Windows:
• See https://aka.ms/ReactNativeGuideWindows for the latest up-to-date instructions.
npx react-native run-android でエラー。choco install -y microsoft-openjdk11 を実行
JAVA_HOMEのパスは、 C:\Program Files\Microsoft\jdk-11.0.16.101-hotspot 。MUST
Android SDKは、2. Install the Android SDK の手順で入れたものを使う。MUST
名前:Pixel 5 API 31for react native
Links
https://zenn.dev/ryonakae/articles/35ebacb8e7be49
https://zenn.dev/izuchy/articles/6d6f7970a77aa203396c
https://tech.kitchhike.com/entry/react-native-expo-session-01
バーコード読み取れる
PS C:\Users\lbfde\react-native> npx create-expo-app BookBark でプロジェクト作成
npx expo install expo-barcode-scanner と npx expo install expo-permissions でいれた
https://docs.expo.dev/versions/latest/sdk/bar-code-scanner/#usage のコードをコピペしてみたがエラー。次の日動作した
https://docs.expo.dev/versions/latest/sdk/bar-code-scanner/#usage の「Open in Snack」
↑で実際にバーコードの数字読み取れたからできそうではある
https://scrapbox.io/files/63c2e3393fe551001da90a6b.png
nativebase
vs codeのextension
かなり良さそう