Eclipse中编译Android工程时,提示错误 :Error generating final archive: Debug certificate expired on xxxxxx(日期)
解决办法:
进入:C:/Documents and Settings/USER(用户账户)/.android ,删除:debug.keystore和ddms.cfg
Eclipse中编译Android工程时,提示错误 :Error generating final archive: Debug certificate expired on xxxxxx(日期)
解决办法:
进入:C:/Documents and Settings/USER(用户账户)/.android ,删除:debug.keystore和ddms.cfg
Android 代码中无意删除了 .setting文件夹,重建后提示
gen already exists but is not a source folder. Convert to a source folder or rename it.
查了半天,总算有个明白人
我们建好一个android 的项目后,默认的res下面 有layout、values、drawable等目录
这些都是程序默认的资源文件目录,如果要实现多语言版本的话,我们就要添加要实现语言的对应的资源文件。
首先我们点击添加Android Xml File按钮,会出现下面的界面:
输入文件名:string.xml,选中Values单选框,并把下面左列表中的Region添加到左边的列表里面,并在Region输入框里输入cn,如下图
这时,上面的消息提示:如果用Region的话,需要使用语言项,和Region一样,我们把Language也添加到右面的列表里面,填入zh,如下图
点击Finish按钮,资源文件就会建好了,目录:res\values-zh-rCN(其实上面一大堆操作,就是为生成这个目录)
默认生成的string.xml的代码:
1 2 3 4 5 6 7 8 9 |
<?xmlversion="1.0"encoding="utf-8"?> <resources> <stringname="hello">Hello World, Test!</string> <stringname="app_name">Test-Multilingual</string> </resources> |
修改刚刚生成的res\values-zh-rCN目录下的string.xml:
1 2 3 4 5 6 7 8 9 |
<?xmlversion="1.0"encoding="utf-8"?> <resources> <stringname="app_name">测试多语言</string> <stringname="hello">你好 多语言测试</string> </resources> |
运行结果:
en-us:英文
zh-cn:中国大陆
zh-tw:台湾
因为设置了region为CN,所以zh-tw的时候,没有找到res\values-zh-rTW的目录,加载了默认的res\values目录下的string.xml
这里只用了Values做例子,其余的Resource都可以,图片了,布局了等等
这里只是简单的介绍了一下多语言对应,剩下的大家自己深入研究吧!
Ubuntu 下面的内核经常升级,一段时间以后就很多了,浪费空间,网上搜索了一个脚本,用了下,感觉还可以。
原文是指定的Shell #!/bin/sh, 这个在Ubuntu下面是不能编译通过的,要要手动指定为bash 才行,主要是默认的sh不同造成的,不是什么大问题.
文件暂时命名成 Linux_Clean.sh吧
首先赋予执行权限
1 |
chmod +x Linux_Clean.sh |
尝试执行
1 |
./Linux_Clean.sh |
如果没有错误则执行
1 |
./Linux_Clean.sh -e |
建议执行脚本之前执行
1 |
dpkg --get-selections|grep linux |
看看自己有多少Linux内核
执行完成后继续执行
1 |
dpkg --get-selections|grep linux |
估计会很有成就感的
下面是脚本原文,复制黏贴即可
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
#!/bin/bash # 清理ubuntu的老内核 # by bones7456 # http://li2z.cn CURRENT="`uname -r | awk -F"-" '{print $1"-"$2}'`" HEADERS="" IMAGES="" for HEADER in `dpkg --get-selections | grep ^linux-headers | \ grep -vE "(generic|386|virtual)" | awk '{gsub(/linux-headers-/,"",$1);print $1}'` do if [[ "$CURRENT" < "$HEADER" ]] then echo "正在运行的内核不是最新的。 $CURRENT < $HEADER" echo "Running kernel is not the newest. $CURRENT < $HEADER" exit 1 else [[ "$CURRENT" != "$HEADER" ]] && { HEADERS="${HEADERS} linux-headers-${HEADER}" IMAGE="`dpkg --get-selections | grep ^linux-image | \ grep "${HEADER}" | awk '{print $1}'`" IMAGES="${IMAGES} $IMAGE" } fi done if [[ x"$HEADERS" == x"" ]] then echo "没有要清理的老内核." echo "No old kernel need to clean." exit 0 fi CMD="sudo apt-get purge $HEADERS $IMAGES" echo "$CMD" if [ "$1" == "-e" ] then sh -c "$CMD" else echo "请确定以上命令是否正确,然后输入 $0 -e 来执行以上命令。" echo "Be sure this command is right, then type $0 -e to execute." fi |
在用Eclipse 调试程序的时候,一旦发生异常,往往在回退栈里面提示找不到源代码.
如下图所示
网 上搜索了一下,发现一个 fix_android_sdk.py 脚本,可以提取完整的java 文件到SDK 目录,尝试了一下,还是蛮有用的,可惜就是源代码只能看,不能设置断点。这个是用来编译ASE的一个脚本,里面的部分涉及到ASE的部分我们是用不到,并 且也没法用的,所以被我万恶的删除了。
1.首先要下载完整的Android源代码,建议下载一下,说不定哪天就用上了。
对 于以前的脚本进行了修改,然后现在可以判断当前的Android 的源代码版本了,如果定义过 "ANDROID_SDK_ROOT"环境变量的话,会使用环境变量中的值拷贝到制定的目录,比如Android 4.1.2 的源代码,现在可以拷贝到 Android-16 目录下面了,不需要再从android-1.5 下面拷贝出来了。 下面贴上最新的源代码脚本,供各位参考。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 |
#!/usr/bin/python # Copyright (C) 2009 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may not # use this file except in compliance with the License. You may obtain a copy of # the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the # License for the specific language governing permissions and limitations under # the License. # # Originally written by Mike Forster. # http://blog.michael-forster.de/2008/12/view-android-source-code-in-eclipse.html from __future__ import with_statement # for Python < 2.6 """Modifies the Android SDK to build Android Scripting Environment. This script compiles android.os.Exec from the Android source and adds the class to the Android SDK android.jar. In addition, it copies the source files into the SDK so that they can be browsed from Eclipse. In order to use this script, you must have download the Android source and installed the Android SDK. """ __author__ = 'Damon Kohler <damonkohler@gmail.com>' import os import re import shutil import sys def validate_source_and_sdk_locations(src_location, sdk_location): if not os.path.exists(src_location): print 'Android source location is invalid.' sys.exit(1) if not os.path.exists(sdk_location): print 'SDK location is invalid.' sys.exit(1) #read the Android Source Version from "build\core\version_defaults.mk" VerFilePath = os.path.join(src_location,'build','core','version_defaults.mk') DefSavePath = os.path.join(sdk_location, 'platforms', 'android-1.5′) if not os.path.isfile(VerFilePath): print 'Can not read the version from "%s" files will be save in path "%s"'%(VerFilePath,DefSavePath) else: fl = file(VerFilePath,"r") for s in fl.readlines(): li = re.findall("PLATFORM_SDK_VERSION\s*:=\s*\S*",s) if li: p = re.compile(r'\s*:=\s*') ver = p.split(s) ver = ver[1].strip() DefSavePath = os.path.join(sdk_location, 'platforms', 'android-%s'%(ver)) break fl.close() return DefSavePath def copy_sources(src_location, sdk_location): sdk = validate_source_and_sdk_locations(src_location, sdk_location) out = os.path.join(src_location, 'out') sources = os.path.join(sdk, 'sources') if not os.path.exists(sources): os.makedirs(sources) print 'Copying sources from %s to %s' % (src_location, sources) # Some files are duplicated, copy them only once. written = {} # Iterate over all Java files. for dir, subdirs, files in os.walk(src_location): if dir.startswith(out): continue # Skip copying stub files. for filename in [f for f in files if f.endswith('.java')]: # Search package name. source = os.path.join(dir, filename) with open(source) as f: for line in f: match = re.match(r'\s*package\s+([a-zA-Z0-9\._]+);', line) if match: package_path = match.group(1).replace('.', os.sep) try: os.makedirs(os.path.join(sources, package_path)) except os.error: pass destination = os.path.join(sources, package_path, filename) if destination not in written: written[destination] = True shutil.copy(source, destination) break if __name__ == '__main__': if len(sys.argv) == 3: src_location, sdk_location = sys.argv[1:3] #if user don't input any param,we make the current path as the android source path #and we will detect the envionment ANDROID_SDK_ROOT elif len(sys.argv) == 1: sdk_location = os.environ.get('ANDROID_SDK_ROOT') if 0 == len(sdk_location): print 'fix_android_sdk.py <android-source> <android-sdk>' sys.exit(1) src_location = os.getcwd() else: print 'fix_android_sdk.py <android-source> <android-sdk>' sys.exit(1) try: copy_sources(src_location, sdk_location) except KeyboardInterrupt: print '\nAborted.' else: print 'Done!' |
编写了一个编译Android 的sh ,执行的适合 提示 "not a valid identifier" ,看了很久也没琢磨明白怎么回事,Google了一阵子才注意到 如下内容
当 在shell编辑脚本时,运行时出现了" ‘: not a valid identifier ",或者会出现(: command not found,许多莫名其妙的符号)很可能你在windows下编辑,在Linux下运行,由于Linux和windows的文本格式不同所导致的。
上面可能是反应之一,有时终端显示" :没有文件…"也是这个原因造成的 大部分由分号开头":"
解决方法:只要用UltraEdit工具转换成Linux格式,重新source运行无错误即可
Linux和windows的文本的区别:
1.Linux的换行: "n"
2.windows的换行: "rn"(回车,换行)
尽管我没有在Widows下面编译,但是却使用了wine下面的记事本编写,结果自然不用讲了。
简单解决方法 vim 新建一个文件,原文件内容粘贴过去就可以了。
尝试在Windows 7 x64 调试 Z-Blog ,结果总是报告数据库链接错误,跟踪了一下,返回错误代码 3706 ,有些莫名奇妙,网上大多说是没有安装 Jet 引擎导致。按理说,系统应该自带了,Google 了一番,发现是由于"Microsoft.Jet.OLEDB.4.0“是 32位的驱动导致的。
进行如下设置即可解决问题
提示一下,如果要调试 ASP ,IIS Express 功能似乎有些不足,配置了半天,就是不能设置断点,最后直接用 Windows 7 x64 的IIS,直接附加进程就可以调试了,具体原因未知。
VS2012 使用 IIS 7.5 Express 调试 ASP 时候 显示 error 0131 - "Disallowed Parent Path" (不能用“..”表示父目录)
这个问题是微软为了规避可能的文件访问异常而屏蔽了".." ,默认是不支持父路径访问的。但是在实际中我们又不可避免的会用到,因为确实比较方便。
用记事本打开"我的文档\IISExpress\config\applicationhost.config",找到如下内容:
1 2 3 4 |
<asp scriptErrorSentToBrowser="true"> <cache diskTemplateCacheDirectory="%TEMP%\iisexpress\ASP Compiled Templates" /> <limits /> </asp> |
修改为:
1 2 3 4 |
<asp scriptErrorSentToBrowser="true" enableParentPaths="true"> <cache diskTemplateCacheDirectory="%TEMP%\iisexpress\ASP Compiled Templates" /> <limits /> </asp> |
1 2 3 4 5 6 |
enableParentPaths="true" //启用父路径 bufferingOn="true" errorsToNTLog="true" appAllowDebugging="true" appAllowClientDebug="true" scriptErrorSentToBrowser="true" |
原始网站https://source.android.com/source/initializing.html强调一下,该设置适用于SDK ,可以避免很多莫名其妙的问题。
The "Getting Started" section describes how to set up your local work environment, how to use Repo to get the Android files, and how to build the files on your machine. To build the Android source files, you will need to use Linux or Mac OS. Building under Windows is not currently supported.
Note: The source download is approximately 8.5GB in size.You will need over 30GB free to complete a single build, andup to 100GB (or more) for a full set of builds.
For an overview of the entire code-review and code-update process, see Life of a Patch.
Some of the requirements for your build environment are determined by whichversion of the source code you plan to compile. SeeBuild Numbers for a full listing of branches you maychoose from. You may also choose to download and build the latest source code(called "master"), in which case you will simply omit the branch specificationwhen you initialize the repository.
Once you have selected a branch, follow the appropriate instructions below toset up your build environment.
These instructions apply to all branches, including master.
The Android build is routinely tested in house on recent versions ofUbuntu LTS (10.04), but most distributions should have the requiredbuild tools available. Reports of successes or failures on otherdistributions are welcome.
For Gingerbread (2.3.x) and newer versions, including the masterbranch, a 64-bit environment is required. Older versions can becompiled on 32-bit systems.
Note: It is also possible to build Android in a virtual machine.If you are running Linux in a virtual machine, you will need atleast 16GB of RAM/swap and 30GB or more of disk space in order tobuild the Android tree.
Detailed instructions for Ubuntu and MacOS follow. In general you will need:
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
1 |
$ sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner" |
注意,该网址已经失效
更改为
1 |
$ sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu hardy main multiverse" |
即可
1 2 3 |
$ sudo apt-get update $ sudo apt-get install sun-java6-jdk |
Java 5: for Froyo and older
1 2 3 4 5 |
$ 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 isused instead of any previously installed JDK.
You will need a 64-bit version of Ubuntu. Ubuntu 10.04 is recommended.Building using a newer version of Ubuntu is currently only experimentallysupported and is not guaranteed to work on branches other than master.
1 2 3 4 5 6 7 8 9 |
$ sudo apt-get install git-core gnupg flex bison gperf build-essential \ zip curl zlib1g-dev libc6-dev lib32ncurses5-dev ia32-libs \ x11proto-core-dev libx11-dev lib32readline5-dev lib32z-dev \ libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown \ libxml2-utils xsltproc |
On Ubuntu 10.10:
1 |
$ sudo ln -s /usr/lib32/mesa/libGL.so.1 /usr/lib32/mesa/libGL.so |
On Ubuntu 11.10:
1 |
$ sudo apt-get install libx11-dev:i386 |
Building on Ubuntu 12.04 is currently only experimentally supported and is notguaranteed to work on branches other than master.
1 2 3 4 5 6 7 8 9 10 11 |
$ sudo apt-get install git-core gnupg flex bison gperf build-essential \ zip curl libc6-dev libncurses5-dev:i386 x11proto-core-dev \ libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 \ libgl1-mesa-dev g++-multilib mingw32 openjdk-6-jdk tofrodos \ python-markdown libxml2-utils xsltproc zlib1g-dev:i386 $ sudo ln -s /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/libGL.so |
Under GNU/linux systems (and specifically under Ubuntu systems),regular users can't directly access USB devices by default. Thesystem needs to be configured to allow such access.
The recommended approach is to create a file/etc/udev/rules.d/51-android.rules
(as the root user) and to copythe following lines in it. must be replaced by theactual username of the user who is authorized to access the phonesover USB.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
# adb protocol on passion (Nexus One)SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e12", MODE="0600", OWNER="<username>" # fastboot protocol on passion (Nexus One)SUBSYSTEM=="usb", ATTR{idVendor}=="0bb4", ATTR{idProduct}=="0fff", MODE="0600", OWNER="<username>" # adb protocol on crespo/crespo4g (Nexus S)SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e22", MODE="0600", OWNER="<username>" # fastboot protocol on crespo/crespo4g (Nexus S)SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e20", MODE="0600", OWNER="<username>" # adb protocol on stingray/wingray (Xoom)SUBSYSTEM=="usb", ATTR{idVendor}=="22b8", ATTR{idProduct}=="70a9", MODE="0600", OWNER="<username>" # fastboot protocol on stingray/wingray (Xoom)SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="708c", MODE="0600", OWNER="<username>" # adb protocol on maguro/toro (Galaxy Nexus)SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", ATTR{idProduct}=="6860", MODE="0600", OWNER="<username>" # fastboot protocol on maguro/toro (Galaxy Nexus)SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e30", MODE="0600", OWNER="<username>" # adb protocol on panda (PandaBoard)SUBSYSTEM=="usb", ATTR{idVendor}=="0451", ATTR{idProduct}=="d101", MODE="0600", OWNER="<username>" # fastboot protocol on panda (PandaBoard)SUBSYSTEM=="usb", ATTR{idVendor}=="0451", ATTR{idProduct}=="d022", MODE="0600", OWNER="<username>" # usbboot protocol on panda (PandaBoard)SUBSYSTEM=="usb", ATTR{idVendor}=="0451", ATTR{idProduct}=="d00f", MODE="0600", OWNER="<username>" # usbboot protocol on panda (PandaBoard ES)SUBSYSTEM=="usb", ATTR{idVendor}=="0451", ATTR{idProduct}=="d010", MODE="0600", OWNER="<username>" # adb protocol on grouper (Nexus 7)SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e42", MODE="0600", OWNER="<username>" # fastboot protocol on grouper (Nexus 7)SUBSYSTEM=="usb", ATTR{idVendor}=="18d1", ATTR{idProduct}=="4e40", MODE="0600", OWNER="<username>" |
Those new rules take effect the next time a device is plugged in.It might therefore be necessary to unplug the device and plug itback into the computer.
This is known to work on both Ubuntu Hardy Heron (8.04.x LTS) andLucid Lynx (10.04.x LTS). Other versions of Ubuntu or othervariants of GNU/linux might require different configurations.
Setting up ccache
You can optionally tell the build to use the ccache compilation tool.Ccache acts as a compiler cache that can be used to speed-up rebuilds.This works very well if you do "make clean" often, or if you frequentlyswitch between different build products.
Put the following in your .bashrc or equivalent.
1 |
export USE_CCACHE=1 |
By default the cache will be stored in ~/.ccache.If your home directory is on NFS or some other non-local filesystem,you will want to specify the directory in your .bashrc as well.
1 |
export CCACHE_DIR=$path-to-your-cache-directory |
The suggested cache size is 50-100GB.You will need to run the following command once you have downloadedthe source code.
1 |
prebuilt/linux-x86/ccache/ccache -M 50G |
This setting is stored in the CCACHE_DIR and is persistent.
By default, the output of each build is stored in the out/subdirectory of the matching source tree.
On some machines with multiple storage devices, builds arefaster when storing the source files and the output onseparate volumes. For additional performance, the outputcan be stored on a filesystem optimized for speed insteadof crash robustness, since all files can be re-generatedin case of filesystem corruption.
To set this up, export the OUT_DIR_COMMON_BASE
variableto point to the location where your output directorieswill be stored.
1 |
export OUT_DIR_COMMON_BASE=$path-to-your-out-directory |
The output directory for each separate source tree will benamed after the directory holding the source tree.
For instance, if you have source trees as /source/master1
and /source/master2
and OUT_DIR_COMMON_BASE
is set to/output
, the output directories will be /output/master1
and /output/master2
.
It's important in that case to not have multiple sourcetrees stored in directories that have the same name,as those would end up sharing an output directory, withunpredictable results.
This is only supported on Jelly Bean (4.1) and newer,including the master branch.
In a default installation, OS X runs on a case-preserving but case-insensitivefilesystem. This type of filesystem is not supported by git and will cause somegit commands (such as "git status") to behave abnormally. Because of this, werecommend that you always work with the AOSP source files on a case-sensitivefilesystem. This can be done fairly easily using a disk image, discussed below.
Once the proper filesystem is available, building the master branch in a modernOS X environment is very straightforward. Earlier branches, including ICS,require some additional tools and SDKs.
You can create a case-sensitive filesystem within your existing OS X environmentusing a disk image. To create the image, launch DiskUtility and select "New Image". A size of 25GB is the minimum tocomplete the build, larger numbers are more future-proof. Using sparse imagessaves space while allowing to grow later as the need arises. Be sure to select"case sensitive, journaled" as the volume format.
You can also create it from a shell with the following command:
1 |
# hdiutil create -type SPARSE -fs 'Case-sensitive Journaled HFS+' -size 40g ~/android.dmg |
This will create a .dmg (or possibly a .dmg.sparsefile) file which, once mounted, acts as a drive with the required formatting for Android development. For a disk image named "android.dmg" stored in your home directory, you can add the following to your ~/.bash_profile
to mount the image when you execute "mountAndroid":
1 |
# mount the android file imagefunction mountAndroid { hdiutil attach ~/android.dmg -mountpoint /Volumes/android; } |
Once mounted, you'll do all your work in the "android" volume. You can eject it (unmount it) just like you would with an external drive.
To build the latest source in a Mac OS environment, you will need an Intel/x86machine running MacOS 10.6 (Snow Leopard) or MacOS 10.7 (Lion), along with Xcode4.2 (Apple's Developer Tools). Although Lion does not come with a JDK, it shouldinstall automatically when you attempt to build the source.
The remaining sections for Mac OS X only apply to those who wish to buildearlier branches.
To build android-4.0.x and earlier branches in a Mac OS environment, you need anIntel/x86 machine running MacOS 10.5 (Leopard) or MacOS 10.6 (Snow Leopard). Youwill need the MacOS 10.5 SDK.
/opt/local/bin
appears in your path BEFORE /usr/bin
. If not, add
1 |
export PATH=/opt/local/bin:$PATH |
to your ~/.bash_profile
.
1 |
$ POSIXLY_CORRECT=1 sudo port install gmake libsdl git-core gnupg |
If using Mac OS 10.4, also install bison:
1 |
$ POSIXLY_CORRECT=1 sudo port install bison |
For versions of Android before ICS, there is a bug in gmake 3.82 that prevents android from building. You can install version 3.81 using MacPorts by taking the following steps:
/opt/local/etc/macports/sources.conf
and add a line that says
1 |
file:///Users/Shared/dports |
above the rsync line. Then create this directory:
1 |
$ mkdir /Users/Shared/dports |
dports
directory, run
1 |
$ svn co --revision 50980 http://svn.macports.org/repository/macports/trunk/dports/devel/gmake/ devel/gmake/ |
1 |
$ portindex /Users/Shared/dports |
1 |
$ sudo port install gmake-3.81 |
On MacOS the default limit on the number of simultaneous file descriptors open is too low and a highly parallel build process may exceed this limit.
To increase the cap, add the following lines to your ~/.bash_profile
:
1 2 |
# set the number of open files to be 1024 ulimit -S -n 1024 |
比较早期的 SDK 的话,tools 目录是没有执行权限会导致问题,最新安装的不会出现问题的。那关键就是 64位系统不不能运行32位程序的缘故了。
1 2 3 |
[2012-09-15 20:59:28 - SDK Manager] Failed to create the SD card. [2012-09-15 20:59:28 - SDK Manager] Failed to create sdcard in the AVD folder. |
1.对于 64位的 Ubuntu 如果没有安装ia32-libs,在64位下是不能跑32位程序的。使用
1 |
sudo apt-get install ia32-libs |
2.没有创建一个avd的话,eclipse是不会自动生成R.java的,新建了一个avd之后就会自动生成R.java
3.如果还是不行的话,设置android sdk下的tools权限为可执行权限。
1 |
chmod +x tools/* |