我刚开始编写应用程序IOS和Android。
Ubuntu 中 Android SDK , AVD Eclipse 。
当我从终端启动android
时。此致电Android SDK Manager
我打开这个问题,因为问题出在我创建设备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$
现在我想从终端创建新设备,我有这个错误:
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)
这个错误我在Eclipse中也总是在创建新设备AVD时
我在更新后尝试在/etc/profile
内添加Phonepag的路径。
但是终端仍然存在错误
的/ etc /简档
# /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
答案 0 :(得分:2)
AVD Manager无法访问.android文件夹。 不确定它是否是正确的解决方案,但更改了文件夹的权限对我有用:
sudo chmod 777 -R /home/user/.android
"用户"这是执行AVD管理器的用户,很可能是您的用户。