簡體   English   中英

Android 模擬器未加載 react-native 應用程序

[英]Android simulator is not loading react-native application

npm 啟動后,當 android 模擬器打開並與 Pixel3 一起運行時,如果我“單擊”a(對於 Android 模擬器),則會出現此錯誤並且應用程序不會在模擬器上打開

Trying to open the project on Android...
Installing Expo on device
/Couldn't start project on Android: Error running adb: Failed to install C:\Users\35192\.expo\android-apk-
cache\Exponent-2.16.1.apk: Failure [INSTALL_PARSE_FAILED_NOT_APK: Failed to parse
/data/app/vmdl1083085082.tmp/base.apk: Failed to load asset path /data/app/vmdl1083085082.tmp/base.apk]             

請檢查以下內容:

  1. 請安裝所需的 SDK,如圖所示

From Android Studio, select File then Settings... Under the Appearance & Behavior category, then under the System Settings category, select the HTTP Proxy page. Select Manual proxy configuration並進行相應調整。

From Android Studio, select File , then Settings ... Under the Appearance & Behavior category, then under the System Settings category, select the Android SDK page.

Select SDK Platforms選項卡,如果默認情況下未選中。 Select Show Package Details復選框。 Android API 28下,選中Intel x86 Atom System ImageIntel x86 Atom_64 System Image的框

在此處輸入圖像描述 在此處輸入圖像描述

2.配置環境

單擊Environment variables System variables下,單擊New...輸入ANDROID_SDK作為變量名,輸入%LOCALAPPDATA\Android\Sdk作為變量值。 在系統變量下,編輯路徑。 如果您的配置采用單個字符串, append ;%LOCALAPPDATA%\Android\Sdk\platform-tools (前面的分號)。 如果您的配置采用多個字符串,append %LOCALAPPDATA%\Android\Sdk\platform-tools (前面沒有分號)。 單擊確定,然后再次單擊確定。

希望能幫到你

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM