【发布时间】:2014-02-04 19:35:40
【问题描述】:
我是 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)
当我创建新设备 AVD 时,我也总是在 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 我有 command not found
sudo android create avd -n mySim -t android-19
[sudo] password for user:
sudo: android: command not found
【问题讨论】:
-
当你以 sudo 运行它时会发生什么(不确定它写入哪些目录)
-
´sudo android create avd -n mySim -t android-19 [sudo] 用户密码:sudo: android: command not found´
-
android 不在系统路径中。您需要进入找到文件 android 的目录,然后重复命令 bbut 使用 ./android 而不是 android。 sudo android create avd -n mySim -t android-19 如果可行,那么这是一个权限问题,您可以递归地更改该文件夹的权限。须藤 chmod 777 文件夹 -r
-
现在功能使用 sudo -s chmod -R 777 /home/user/.android/
-
为什么在我创建 AVD user@user-F50Sf:~$ emulator -avd mySim NAND: could not write file /home/user/.android/avd/mySim.avd 之后出现这个错误/userdata-qemu.img, 没有那个文件或目录
标签: android eclipse ubuntu avd android-sdk-tools