1. 在android的源代码须注意分支号和版本对应: cupcake---1.5 donut--1.6 eclair--2.0
2.在donut分支源代码make时候,出现下面错误
host C++: bb2sym <= development/emulator/qtools/bb2sym.cpp
host C++: bb2sym <= development/emulator/qtools/trace_reader.cpp
development/emulator/qtools/trace_reader.cpp: In function ‘char* ExtractDexPathFromMmap(const char*)’:
development/emulator/qtools/trace_reader.cpp:1012: error: invalid conversion from ‘const char*’ to ‘char*’
development/emulator/qtools/trace_reader.cpp:1015: error: invalid conversion from ‘const char*’ to ‘char*’
make: *** [out/host/linux-x86/obj/EXECUTABLES/bb2sym_intermediates/trace_reader.o] Error 1
改法就是 将trace_reader.cpp中函数ExtractDexPathFromMmap改成:
static char *ExtractDexPathFromMmap(const char *mmap_path)
{
char *end = (char *)rindex(mmap_path, '@');
if (end == NULL)
return NULL;
char *start = (char *)rindex(mmap_path, '/');
......
}
3.在eclair上下载的代码make时候,提示jdk版本错误:
You are attempting to build with the incorrect version
of java.
Your version is: java version "1.6.0_10".
The correct version is: 1.5.
Please follow the machine setup instructions at
http://source.android.com/download
解决问题:在~/mydroid/build/core目录下main.mk文件中L93,L1092行改成:
java_version := $(shell java -version 2>&1 | head -n 1 | grep '[ "]1/.6[/. "$$]')
javac_version := $(shell javac -version 2>&1 | head -n 1 | grep '[ "]1/.6[/. "$$]')
4.在donut分支按官方make后,加载到eslipse中出现下列vpn和keystore错误:
> > > >IVpnServicecannot be resolved AuthenticationActor.java
> > > > Android_Source/
> > > > packages/apps/Settings/src/com/android/settings/vpn line 153
> > > > Java
> > > > Problem
解决问题:
在你的源代码目录下的classpath文件中加入3行代码即可:
<classpathentry kind="src" path="frameworks/base/keystore/java"/>
<classpathentry kind="src" path="frameworks/base/vpn/java"/>
<classpathentry kind="src" path="out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/src/vpn/java"/>
如果代码还出现import com.android.providers.im.R; 错误,应该删除一句:
<classpathentry kind="src" path="packages/providers/ImProvider/src"/>