gpt4 book ai didi

android - 创建 android AVD : (Permission denied) inside Ubuntu 时出错

转载 作者:行者123 更新时间:2023-11-29 21:17:05 25 4
gpt4 key购买 nike

我是 IOS 和 Android 应用程序的初学者。

我在 Ubuntu 中安装了带有 Android SDKAVDEclipse

当我从终端启动 android 时。此调用 Android SDK Manager

我打开这个问题是因为问题出在我创 build 备 AVD 时。我安装了两个版本的 Android:

user@user-F50Sf:~/Downloads$ android list targets
Available Android targets:
----------
id: 1 or "android-18"
Name: Android 4.3
Type: Platform
API level: 18
Revision: 2
Skins: WXGA800, WXGA800-7in, WSVGA, WQVGA400, HVGA, WXGA720, WVGA800 (default), QVGA, WQVGA432, WVGA854
ABIs : no ABIs.
----------
id: 2 or "android-19"
Name: Android 4.4.2
Type: Platform
API level: 19
Revision: 2
Skins: WXGA800, WXGA800-7in, WSVGA, WQVGA400, HVGA, WXGA720, WVGA800 (default), QVGA, WQVGA432, WVGA854
ABIs : armeabi-v7a
user@user-F50Sf:~/Downloads$

Android SDK现在我想从终端创建新设备,但出现此错误:

 user@user-F50Sf:~/Downloads$ android create avd -n mySim -t android-19
Auto-selecting single ABI armeabi-v7a
Android 4.4.2 is a basic Android platform.
Do you wish to create a custom hardware profile [no]
Error: /home/user/.android/avd/mySim.ini (Permission denied)

当我创建新设备 AVD 时,我在 Eclipse 中也总是遇到这个错误 Image of error eclipse

更新后,我尝试在 /etc/profile 中添加 Phonepag 的路径。但是终端仍然报错

/etc/profile

# /etc/profile: system-wide .profile file for the Bourne shell (sh(1))
# and Bourne compatible shells (bash(1), ksh(1), ash(1), ...).

if [ "$PS1" ]; then
if [ "$BASH" ] && [ "$BASH" != "/bin/sh" ]; then
# The file bash.bashrc already sets the default PS1.
# PS1='\h:\w\$ '
if [ -f /etc/bash.bashrc ]; then
. /etc/bash.bashrc
fi
else
if [ "`id -u`" -eq 0 ]; then
PS1='# '
else
PS1='$ '
fi
fi
fi

# The default umask is now handled by pam_umask.
# See pam_umask(8) and /etc/login.defs.

if [ -d /etc/profile.d ]; then
for i in /etc/profile.d/*.sh; do
if [ -r $i ]; then
. $i
fi
done
unset i
fi
export PATH=${PATH}:/opt/android-sdk-linux/tools
export PATH=${PATH}:/opt/android-sdk-linux/platform-tools
export PATH=${PATH}:/usr/lib/node_modules/phonegap/bin

我哪里错了???

编辑:使用 sudo找不到命令

sudo android create avd -n mySim -t android-19
[sudo] password for user:
sudo: android: command not found

最佳答案

AVD 管理器无法访问 .android 文件夹。不确定它是否是正确的解决方案,但更改文件夹的权限对我有用:

sudo chmod 777 -R /home/user/.android

这里的“用户”是正在执行 AVD 管理器的用户,很可能是您的用户。

关于android - 创建 android AVD : (Permission denied) inside Ubuntu 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21152575/

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