现在的位置: 首页 > 综合 > 正文

linux下android开发环境平台搭建与问题解决

2013年12月12日 ⁄ 综合 ⁄ 共 1371字 ⁄ 字号 评论关闭
文章目录

环境平台搭建

1、安装java和eclipse

apt-get install sun-java6-jdk eclipse

2、安装ADT

ADT下载地址:http://developer.android.com/sdk/eclipse-adt.html

help->install new software选择本地文件,点击next完成安装

3、安装android sdk

sdk下载地址:http://developer.android.com/sdk/index.html

解压后进入tools目录运行./android update sdk选择要安装的版本包

也可以直接把文件放入到相应的目录。

4、设置android sdk 

windows->reference->android选择sdk解压后的目录

5、创建virtual devices

windows->android sdk and avd manager->virtual devices->new

6、测试

创建一个helloworld的project然后运行,看到android模拟器的启动,环境搭建成功。

问题解决

遇到问题:
1、he method *** of type *** must override a superclass method
右击项目->Properties->Java Compiler,找到选项:Compiler compliance level,修改相应的值1.6

2、eclipse导入layoutlib.jar出现dex error

应该采用用户库的形式导入该库,具体步骤如下:

a. Right-click the project in Eclipse and select "Build Path -> Add Libraries...".
b. Select User Library from the list and click Next.
c. Click the "User Libraries..." button.
d. Click "New..." in the User Libraries dialog.
e. Give the user library a name and select the System library checkbox and click OK.
f. Highlight the newly added user library in the list and click the "Add JARs..." button and add the desired jar files.
g. Click OK on the User Libraries dialog.
h. Make sure the new user library is checked in the Add Library dialog and

3、卸载程序

adb remount

adb shell

cd /system/apps

rm a.apk

exit

adb uninstall app

4、Installation error: INSTALL_FAILED_SHARED_USER_INCOMPATIBLE

AndroidManifest.xml去掉android:sharedUserId="android.uid.shared"

5、eclipse:unable to execute dex:java heap space

修改
-Xms768m
-Xmx768m
修改
--launcher.XXMaxPermSize
768m

抱歉!评论已关闭.