ubuntu11.10+vm6.5+android

1.安装完后不能全屏

A:system settings>hardware>displays>resolution里选择合适的的值,我的电脑选的是1680*1050(16:10)


2.拼音输入法

Dash home(左边侧边栏最上边)  点击   more Apps  第二项  installed  选中右边的see more results    找到keyboard input methods  (是个白色的中间一个小写i 的白色的正方块) 点击   选中中间的input method    有select an input method  点击  出现 chinese选项,将鼠标放到上面,选中自己要用的输入法就行了,然后再进入到language support  (和keyboard input method靠的很近)language选项中最下行有”Keyboard input method system:“这么一行字,点击,我的选中的是ibus


3.网络设置

修改/etc/network/interfaces文件sudo gedit /etc/network/interfaces贴出我的eth0设置,自己看情况修改:

# The primary network 

interface auto eth0

#iface eth0 inet dhcp

iface eth0 inet static

address 192.168.1.145(ip地址)

netmask 255.255.255.0(子网掩码)

gateway 192.168.1.1(网关)

---------------------------------

sudo /etc/init.d/networking restart

3.samba

<1>.sudo apt-get install samba(或软件管理器里,搜索samba,然后勾选安装)

<2>.sudo gedit /etc/samba/smb.conf

[homes]

   comment = Home Directories
   browseable = no

read only = no

create mask = 0775

directory mask = 0775

<3>sudo smbpasswd -a smbuser(你的用户名)

<4>服务器端测试 sudo testparm

<6>重新启动samba服务器
    sudo /etc/init.d/smbd restart
    sudo ps aux | grep smbd       --查看samba是否启动,可以看到0:00 smbd -F

<5>关闭LINUX防火墙 sudo ufw disable

<6>测试 在window下的“运行”中输入\\192.168.0.179\smbsuer(修改成自己ubuntu系统的ip)然后点击确定,输入用户名smb和密码


3.安装vm tool

 1、点击VMware菜单的-VM-Install VMware Tools
 2、把 .tar.gz 文件拷贝主文件夹(home/或root),右键菜单-解压缩到此处。会自动解压为一个 vmware-tools-distrib 目录。
  打开终端(系统的应用程序菜单-附件-终端)

3、然后在终端里面执行以下命令行:

(转到所解压的目录下面)
$ cd vmware-tools-distrib

$ sudo ./vmware-install.pl

4、回车之后提示输入管理员密码,然后一路确认回车后(相当于在Windows里安装软件时所填答的诸多对话框,我们这里均采用缺省设置),直到最后出现“Enjoy——the VMware team”的字样后,VMwareTools终于安装完成了。

------------------------------------

what is the location of the directory of C header files that match you running kernel?[/usr/src/linux/include]:

 

原因:上面英文提示的意思是,与正在运行内核匹配的C头文件在什么地方?由于默认安装的ubuntu的内核C头文件在/usr/src/linux-headers-2.6.38-8-generic/include目录下,没有/usr/src/linux/include这个目录,所以默认配置不行。这一步要输入/usr/src/linux-headers-2.6.38-8-generic/include。回车继续,这时候又出现错误提示:

The directory of kernel headers(version $$VMWARE$$ UTS_RELEASE) does not match your running kernel(version 2.6.38-8).Even if the module were to compiler……..[/usr/src/…]:

 

如果有编译驱动程序模块的经验,就很容易明白上面提示是什么意思,这里不详细说(几句话描述不清,呵呵)。给出解决方法吧:启动一个新的终端,拷贝/usr/src/linux-headers-2.6.38-8-generic/include/generated/下所有.h文件到/usr/src/linux-headers-3.0.0-12-generic/include/linux下。相应的命令是:cp /usr/src/linux-headers-3.0.0-12-generic/include/generated/*.h   /usr/src/linux-headers-3.0.0-12-generic/include/linux。回到原来的终端,一路回车直到虚拟工具安装结束。

------------------------------------


5.sudo apt-get 

update 出现E:Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavail)

sudo rm /var/lib/apt/lists/lock
即可


4.ssh

<1>sudo apt-get install openssh-server


5.安装wine

软件管理器里,搜索WINE,然后勾选安装


6.eclipse

<1>sudo apt-get install eclipse (或软件管理器里,搜索eclipse,然后勾选安装)

<2>安装adt16.0,报错:

Cannot complete the install because one or more required items could not be found.
  Software being installed: Android Development Tools 16.0.1.v201112150204-238534 (com.android.ide.eclipse.adt.feature.group 16.0.1.v201112150204-238534)
  Missing requirement: Android Development Tools 16.0.1.v201112150204-238534 (com.android.ide.eclipse.adt.feature.group 16.0.1.v201112150204-238534) requires 'org.eclipse.wst.sse.core 0.0.0' but it could not be found

解决方法

出错原因是新装的eclipse 找不到对应版本的更新库链接,用 Help -> Install New Software 的方法添加 地址让他自动记录。我的版本是 3.7 ,所以添加 :http://download.eclipse.org/releases/indigo


7.android 源码下载(http://source.android.com/source/downloading.html)

<1> sudo apt-get install git-core curl

<2>

$ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
$ chmod a+x ~/bin/repo

justin@justin-virtual-machine:~$ repo
/home/justin/bin/repo: 行 1: 未预期的符号 `newline' 附近有语法错误
/home/justin/bin/repo: 行 1: `<!DOCTYPE html>'

解决方法
$ cu/bin/bash: bison: 未找到命令rl "http://php.webtutor.pl/en/wp-content/uploads/2011/09/repo" > ~/bin/repo
$ chmod a+x repo

<3>repo init -u http://android.googlesource.com/platform/manifest  -b android-2.2.3_r2

将 ./repo 中的 REPO_URL='git://codeaurora.org/tools/repo.git' 改为 REPO_URL='git://android.git.kernel.org/tools/repo.git',如果 git 不行,就试试 http, https。

<4> repo sync

 

8.编译

$ . build/envsetup.sh
$ lunch full-eng
报错:/bin/bash: bison: 未找到命令

解决方法:sudo apt-get install bison

$ make -j4
报错:Checking build tools versions...
************************************************************
You are attempting to build with the incorrect version
of java.
 
Your version is: /bin/bash: java: 未找到命令.
The correct version is: 1.5.
 
Please follow the machine setup instructions at
    http://source.android.com/download
************************************************************
build/core/main.mk:117: *** stop。 停止。

解决方法:sudo apt-get install sun-java5-jdk

9.Ubuntu 11.10中安装sun-java5-jdk
由于Ubuntu 高版本不再支持sun-java5-jdk,所以使用自带的更新工具是无法更新到 sun-java5-jdk的,因此需要手动添加更新源,我使用的是 163的镜像源,速度很快
步骤如下:

1.运行命令 sudo gedit /etc/apt/sources.list

2.打开 sources.list 后在最后添加 deb http://mirrors.163.com/ubuntu/ hardy main multiverse 保存关闭

-------------------------未验证--------------------------------------

Installing the JDK

The Sun JDK is no longer in Ubuntu's main package repository. In order to download it, you need to add the appropriate repository and indicate to the system which JDK should be used.

Java 6: for Gingerbread and newer

$ sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
$ sudo apt-get update
$ sudo apt-get install sun-java6-jdk

Java 5: for Froyo and older

$ sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu hardy main multiverse"
$ sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu hardy-updates main multiverse"
$ sudo apt-get update
$ sudo apt-get install sun-java5-jdk

Note: The lunch command in the build step will ensure that the Sun JDK is used instead of any previously installed JDK.

sudo update-java-alternatives -s java-6-sun

- --------------------------------------------------------------

3.运行命令 sudo apt-get update

4.运行命令 sudo apt-get install sun-java5-jdk 就可以下载安装 java5


10.

frameworks/base/libs/utils/RefBase.cpp: In member function ‘void android::RefBase::weakref_type::trackMe(bool, bool)’:
frameworks/base/libs/utils/RefBase.cpp:483:67: error: passing ‘const android::RefBase::weakref_impl’ as ‘this’ argument of ‘void android::RefBase::weakref_impl::trackMe(bool, bool)’ discards qualifiers [-fpermissive]
make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libutils_intermediates/RefBase.o] Error 1

解决:

gedit frameworks/base/libs/utils/Android.mk

Change the line:

  LOCAL_CFLAGS += -DLIBUTILS_NATIVE=1 $(TOOL_CFLAGS)

To:

   LOCAL_CFLAGS += -DLIBUTILS_NATIVE=1 $(TOOL_CFLAGS) –fpermissive

 

http://www.cnblogs.com/ouling/archive/2011/09/08/2171337.html

--------------------------------------------------------------

11.target Dex: core
host Executable: aapt (out/host/linux-x86/obj/EXECUTABLES/aapt_intermediates/aapt)
out/host/linux-x86/obj/STATIC_LIBRARIES/libcutils_intermediates/libcutils.a(threads.o): In function `thread_store_get':
/home/justin/my_android_src/system/core/libcutils/threads.c:27: undefined reference to `pthread_getspecific'
out/host/linux-x86/obj/STATIC_LIBRARIES/libcutils_intermediates/libcutils.a(threads.o): In function `thread_store_set':
/home/justin/my_android_src/system/core/libcutils/threads.c:36: undefined reference to `pthread_key_create'
/home/justin/my_android_src/system/core/libcutils/threads.c:44: undefined reference to `pthread_setspecific'
collect2: ld returned 1 exit status
make: *** [out/host/linux-x86/obj/EXECUTABLES/aapt_intermediates/aapt] Error 1

解决:

打开frameworks/base/tools/aapt/Android.mk

然后打开文件Android.mk,编辑下面一行:

ifeq ($(HOST_OS),linux)

#LOCAL_LDLIBS += -lrt       把这行注释掉,改为下面一行。

LOCAL_LDLIBS += -lrt -lpthread

endif

--------------------------------------------------------------------------

错误 5:

out/host/linux-x86/obj/STATIC_LIBRARIES/libcutils_intermediates/libcutils.a(threads.o): In function `thread_store_get':

/home/leno/works/android_dev/bin/system/core/libcutils/threads.c:27: undefined reference to `pthread_getspecific'

out/host/linux-x86/obj/STATIC_LIBRARIES/libcutils_intermediates/libcutils.a(threads.o): In function `thread_store_set':

/home/leno/works/android_dev/bin/system/core/libcutils/threads.c:36: undefined reference to `pthread_key_create'

/home/leno/works/android_dev/bin/system/core/libcutils/threads.c:44: undefined reference to `pthread_setspecific'

collect2: ld returned 1 exit status

make: *** [out/host/linux-x86/obj/EXECUTABLES/localize_intermediates/localize] 错误 1

解决:类似问题3

修改./framework/base/tools/localize/Android.mk文件

ifeq ($(HOST_OS),linux)

#LOCAL_LDLIBS += -lrt       把这行注释掉,改为下面一行。

LOCAL_LDLIBS += -lrt -lpthread

endif

----------------------------------------------------

target thumb C++: libjs <= out/target/product/generic/obj/STATIC_LIBRARIES/libjs_intermediates/parser/Grammar.cpp
target thumb C: libjs <= out/target/product/generic/obj/STATIC_LIBRARIES/libjs_intermediates/chartables.c
target StaticLib: libjs (out/target/product/generic/obj/STATIC_LIBRARIES/libjs_intermediates/libjs.a)
target SharedLib: libwebcore (out/target/product/generic/obj/SHARED_LIBRARIES/libwebcore_intermediates/LINKED/libwebcore.so)
collect2: ld terminated with signal 9 [Killed]
make: *** [out/target/product/generic/obj/SHARED_LIBRARIES/libwebcore_intermediates/LINKED/libwebcore.so] Error 1


libwebcore.so编译出来很大。单编译它都要很长时间。是在link的时候 。加大了虚拟内存  编译就过了

---------------------------------------------------



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值