Senior Project for RITs Forward Collision Application
To run and / or develop this application you will need to download
-
Note: This is packaged with AS. It can be accessed through
Settings -> Appearance & Behavior -> System Settings -> Android SDK
-
Download Android 4.0 (android-14)
- Click 'Obsolete' located at the bottom left side of the manager to have it appear.
-
DownloadAndroid 4.4.2 (android-19)
- This is readily visible
-
Download Build-tools 19.1
- This is readily visible under 'Tools'.
- If you are not using AS, use this link to download the NDK
- If you are using AS, go through Project Structure -> SDK Location -> Android NDK Location you will see a 'Download' button that will automatically download and unzip the NDK to the default location.
If you are not using AS, you will need to go to the local.properties file located directly under the project and add in the path to the NDK as such. If that file does not contain the path to the sdk, be sure to add it
sdk.dir=C\:\\path\\to\\sdk
ndk.dir=C\:\\path\\to\\ndk
At this point, you should be set to run this application using an android 4.4.2 image or above!
##More Information
(Addressing size concern)
The application includes the OpenCV 3.00 Android sdk\java module and sdk\native folder underneath opencv_java3
. This allows for an easier project setup but causes it to be a much larger project.
##Creating Native Files
To increase the workflow of creating native files, you will create an external tool.
Settings -> Tools -> External Tools -> +
Name: javah
Group: Android Tools (You type this in)
Description: Android Tool -JDK javah tool
Check each checkbox under Options & Show in
Tool settings:
- Program:
C\:path\to\jdk\bin\javah
- For windows, add
.exe
to the end
- For windows, add
- Parameters:
-v -jni -d $ModuleFileDir$/src/main/jni $FileClass$
- Working directory:
$SourcepathEntry$
Now simply select the .java
file that contains the abstracted class that is to be implemented in C or C++ code -> right click -> Android Tools -> javah
This will generate the header file under the jni
folder.