1. Check the version and installed version
Dev03 @ dev03 :~ $ Ls/usr/bin/GCC *
/Usr/bin/GCC/usr/bin/gcc-4.5/usr/bin/gcc-4.6
If some versions are missing, install them directly:
Sudo apt-Get install gcc-4.5 g ++-4.5
Sudo apt-Get install gcc-4.4 g ++-4.4
2. view the G ++ GCC version.
G ++-V gcc-V
3. When the environment requires a specific version of GCC g ++, select
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.5 40sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 30sudo update-alternatives --config gcc
Similarly, G ++
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.5 40sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.6 30sudo update-alternatives --config g++
4. compilation errors
1: G ++ selected multilib '32' Not Installed
Install the appropriate tool: sudo apt-Get install g ++-4.4-multilib
2: Make: *** [out/host/linux-x86/obj/executables/obbtool_intermediates/Main. O] Error 1
GCC g ++ version, as shown in the preceding figure. Install the corresponding version to solve the problem.
5. After compiling the SDK, go to the directory :~ /Opt/android-2.3.7_r1/out/host/linux-x86/SDK/android-sdk_eng.dev03_linux-x86/tools $
Then run: Android list target idcode version
Android create AVD-N 2.3.7-T 9 2.3.7 indicates name-T 9 indicates ID 9
6. compile your APK when there is a third-party jar package dependency:
Refer to the following statement:
LOCAL_PATH:= $(call my-dir)include $(CLEAR_VARS)LOCAL_STATIC_JAVA_LIBRARIES := RootTool \ commons LOCAL_MODULE_TAGS := optionalLOCAL_SRC_FILES := $(call all-java-files-under, src)LOCAL_PACKAGE_NAME := TARTestLOCAL_CERTIFICATE := platforminclude $(BUILD_PACKAGE)################################################## include $(CLEAR_VARS)LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES := RootTool:RootTools-2.2.jar \ commons:commons-compress-1.2.jar include $(BUILD_MULTI_PREBUILT)# Use the folloing include to make our test apk.include $(call all-makefiles-under,$(LOCAL_PATH))
Remember: This is to put the jar package in the project's and path. If you put it under the libs path, you need to modify it accordingly.
LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES
Point
7. For more information, see:
SDK compilation steps Reference URL: http://android-sz.iteye.com/blog/730416 1. http://blog.csdn.net/xijiaohuangcao/article/details/5572061 // put directly under the root path of the Project 2. compile the third-party jar file http://hi.baidu.com/cmdmac/item/43b8e0348b1c91f1e7bb7aa4 // if you put the JAR file under libs Reference 3. compile various dependent libraries, refer to http://www.cnblogs.com/hopetribe/archive/2012/04/23/2467060.html