gpt4 book ai didi

android - 无法在 Android 模拟器设备中使用 SD 卡

转载 作者:太空狗 更新时间:2023-10-29 16:27:24 25 4
gpt4 key购买 nike

我正在尝试使用默认的 android AVD 模拟器。它工作正常,但我在使用外部存储/SD 卡时遇到问题。

好像根本没有挂载sdcard镜像

Environment.getExternalStorageState()
External: removed

这是我的配置

enter image description here

配置文件本身

avd.ini.encoding=UTF-8
AvdId=Nexus_4_API_16
PlayStore.enabled=false
abi.type=x86
avd.ini.displayname=Nexus 4 API 16
disk.dataPartition.size=800M
hw.accelerometer=yes
hw.audioInput=yes
hw.battery=yes
hw.camera.back=emulated
hw.camera.front=emulated
hw.cpu.arch=x86
hw.cpu.ncore=4
hw.dPad=no
hw.device.hash2=MD5:6930e145748b87e87d3f40cabd140a41
hw.device.manufacturer=Google
hw.device.name=Nexus 4
hw.gps=yes
hw.gpu.enabled=yes
hw.gpu.mode=auto
hw.initialOrientation=Portrait
hw.keyboard=yes
hw.lcd.density=320
hw.mainKeys=no
hw.ramSize=1536
hw.sdCard=yes
hw.sensors.orientation=yes
hw.sensors.proximity=yes
hw.trackBall=no
image.sysdir.1=system-images/android-16/google_apis/x86/
runtime.network.latency=none
runtime.network.speed=full
sdcard.size=1000M
showDeviceFrame=yes
skin.dynamic=yes
skin.name=nexus_4
skin.path=/Users/user/Library/Android/sdk/skins/nexus_4
tag.display=Google APIs
tag.id=google_apis
vm.heapSize=80

请帮助解决这个问题。我尝试重新创建一个虚拟设备,但这并没有解决问题

更新

这也行不通

  ./emulator -avd Nexus_4_API_16 -sdcard ~/Temp/mainSdCard.img

最佳答案

我找到的唯一解决方案就是测试不同的模拟器。目前我使用的是 Nexus 5x with Android 4.3,它工作正常。

另一种可能对某人有帮助的解决方案是在创建模拟器后,停止它并更改 Android Studio 默认生成的 sdcard 的大小。

希望对您有所帮助。

关于android - 无法在 Android 模拟器设备中使用 SD 卡,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47217143/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com