---
title: "【React Native】安裝 Android Apk 而無需連接伺服器的方法"
description: "react-nativebundle--devfalse--platformandroid--entry-fileindex.android.js--bundle-output./android/app/build/intermediates/assets/debug/index.android.bundle--assets-dest./android/app/build/interm…"
slug: "react-native-run-android"
date: 2017-04-11T00:00:00.000Z
url: https://calpa.me/blog/react-native-run-android/
---

> ⚠️ **時效警告**：本文發佈於 2017 年，文中提到的 `index.android.js` 入口檔案已在 React Native 0.59 移除，文中指令在新版本無法執行。內容保留作為歷史紀錄，指令與連結已不可用。

```bash
react-native bundle --dev false --platform android --entry-file index.android.js --bundle-output ./android/app/build/intermediates/assets/debug/index.android.bundle --assets-dest ./android/app/build/intermediates/res/merged/debug
cd android
./gradlew assembleDebug
```

## 參考資料

[Build and Install unsigned apk on device without the development server?](https://web.archive.org/web/20251209160844/https://stackoverflow.com/questions/35283959/build-and-install-unsigned-apk-on-device-without-the-development-server)
