[英]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]
請檢查以下內容:
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 Image
和Intel 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.