//////////////Install OpenJdk 7.0
sudo add-apt-repository ppa:openjdk-r/ppa
sudo apt-get update
sudo apt-get install openjdk-7-jdk
update-alternatives --install /usr/bin/java java /usr/lib/jvm/java-6-oracle/jre/bin/java 1100
update-alternatives --install /usr/bin/java java /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java 1101
update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/java-6-oracle/bin/javac 1100
update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/java-7-openjdk-amd64/bin/javac 1101
update-alternatives --install /usr/bin/javadoc javadoc /usr/lib/jvm/java-6-oracle/bin/javadoc 1100
update-alternatives --install /usr/bin/javadoc javadoc /usr/lib/jvm/java-7-openjdk-amd64/bin/javadoc 1101
update-alternatives --config java
update-alternatives --config javac
update-alternatives --config javadoc
or
update-alternatives --set java /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java
update-alternatives --set javac /usr/lib/jvm/java-7-openjdk-amd64/bin/javac
update-alternatives --set javadoc /usr/lib/jvm/java-7-openjdk-amd64/bin/javadoc
//check version
java -version
javac -version
javadoc -J-version
//////////////eclipse kepler sr2
http://www.eclipse.org/downloads/packages/release/Kepler/SR2
Eclipse Standard 4.3.2 -> linux 64bits
install eclipse-standard-kepler-SR2-linux-gtk-x86_64.tar.gz
extract to /opt/eclipse
chmod 755 -R /opt/eclipse
////////////////eclipse setting
gedit /opt/eclipse.ini
-XX:PermSize=64m
-XX:MaxPermSize=256m
-Xms128m
-Xmx4096m
//CDT plugins
Help -> Install New Software...
[Work with]: Kepler - http://download.eclipse.org/releases/kepler
install CDT
programming languages -> c++ development tools
programming languages -> c++ development tools sdk
http://dl.google.com/android/android-sdk_r23.0.2-linux.tgz
install android sdk to /opt/android-sdk-linux
https://dl-ssl.google.com/android/repository/platform-tools_r23.0.1-linux.zip
install android sdk platform-tools to /opt/android-sdk-linux/platform-tools
chmod 755 -R /opt/android-sdk-linux/platform-tools
//ADT plugins
https://dl.google.com/android/ADT-23.0.7.zip
help -> install new software
Add... -> Archive... -> ADT-23.0.7.zip
//Android Ndk
https://dl-ssl.google.com/android/repository/android-ndk-r10e-linux-x86_64.zip
install ndk to /opt/android-ndk
chmod 755 -R /opt/android-ndk
gedit /opt/android-ndk-r10e/ndk-gdb
#adb_var_shell BCFILES run-as $PACKAGE_NAME /system/bin/sh -c "ls lib/*.bc"
to
adb_var_shell BCFILES run-as $PACKAGE_NAME /system/bin/sh -c '"ls lib/*.bc"'
//save to ndk-gdb
cp /opt/android-ndk-xxx/ndk-gdb /opt/android-ndk-xxx/ndk-gdb-eclipse
gedit /opt/android-ndk-xxx/ndk-gdb-eclipse
//remove
$GDBCLIENT -x `native_path $GDBSETUP`
//save to ndk-gdb-eclipse
Eclipse -> title menu Window -> Preferences -> Android
Sdk location:/opt/android-sdk-linux
Ndk location:/opt/android-ndk
//Android Sdk Manager Setting
title menu Window -> Open perspective -> Other... -> Java(Default)
title menu Window -> Android Sdk Manager -> Packages
Android Sdk Tools r23.0.2
Android Platform-tools r23.0.1
Android Sdk build-tools r23.0.1
Android 5.1.1(API 22)
//search window setting
title menu Window -> Preferences -> General -> Search
uncheck
[Reuse editors to show matches]
//program analysis setting
title menu Window -> Preferences -> C/C++ -> Code Analysis
uncheck
[syntax and semantic errors]
//text index setting
title menu Window -> Preferences -> C/C++ -> Indexer
check
[Enable Indexer]
uncheck
[index source files not included in the build]
[index unused headers as c++ files]
//view setting
title menu Window -> Open Perspective -> Other... -> C/C++
//create project
title menu File -> New -> Project -> C/C++ -> C++ Project
Project name: AndroidC++
uncheck
[Use default location]
location: /root/project_board/free_imx/myandroid/kernel_imx
Project type:
Makefile project -> Empty Project -> Android GCC
//project properties
right click project name
Properties -> C/C++ build -> tab Builder Settings
uncheck
[Use Default Build command]
[Build command]: /root/project_board/free_imx/build.sh
[Build directory]: /root/project_board/free_imx
(create build.sh script by yourself)
Properties -> C/C++ build -> tab Behaviour
uncheck
[Clean]
//disable auto build
uncheck
Eclipse -> menu bar Project -> Build Automatically
android-ndk-r10e-patch:
https://www.mediafire.com/file/9b5a4bqt62fh6yd/android-ndk-r10e_patch.tar.gz
沒有留言:
張貼留言