记录AndroidStuido创建模拟器报错An error occurred while creating the AVD. See idea.log for details问题
尝试了网上各种办法,包括:
1.在Android Studio中找到File->Settings->Android SDK->SDK Tools,先卸载Android Emulator然后再次安装。
2.配置环境变量,系统变量中加上sdk-tools和sdk-platform-tools
3.检查system-images是否下载完善,目录在:C:\Users\xxxx\AppData\Local\Android\Sdk\system-images
以上操作后,依旧报错,然后查看idea.log。查看方式:
2024-06-20 10:58:12,507 [68892357] WARN - #com.android.tools.idea.adb.processnamemonitor.ProcessNameMonitorService - Agent tracker error
'couldn't create file: Permission denied' error on device serial #emulator-5554 executing service 'sync-send('/data/local/tmp/.studio/process-tracker')'
at com.android.adblib.impl.services.AdbServiceRunner.readSyncFailMessageAndThrow(AdbServiceRunner.kt:429)
at com.android.adblib.impl.services.AdbServiceRunner$readSyncFailMessageAndThrow$1.invokeSuspend(AdbServiceRunner.kt)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)
这个看到说是权限拒绝,什么鬼。。检查了一下各文件夹目录权限,都是正常的。
最后Invalidate Caches。勾选Clear file system cache and Local History。重启后正常了。
????
猜测是前面部分操作生效了,但是需要清除一下系统缓存