Installation

How to import FTCLib into your Android Studio FTC Project

build.common.gradle

First, you need to add the jcenter library repository to your build.common.gradle file:

build.common.gradle
    repositories {
        jcenter()
    }

Next, minSdkVersion to 24 and multiDexEnabled to true:

build.common.gradle
defaultConfig {
    applicationId 'com.qualcomm.ftcrobotcontroller'
    minSdkVersion 24
    targetSdkVersion 26
    multiDexEnabled true

Next, change JavaVersion to 8 :

build.common.gradle
compileOptions {
    sourceCompatibility JavaVersion.VERSION_1_8
    targetCompatibility JavaVersion.VERSION_1_8
}

Then remove all instances of "arm64-v8a"

build.common.gradle

ndk {
abiFilters "armeabi-v7a"
}


ndk {
abiFilters "armeabi-v7a"
}

build.gradle (TeamCode)

Add this dependency block:

build.gradle (Module: TeamCode)
dependencies {
    implementation 'com.arcrobotics:ftclib:1.0.1' // current version
}

Install EasyOpenCV Dependency on the Phone

Since FTCLib depends on EasyOpenCV for vision, and because EasyOpenCV depends on OpenCV-Repackaged, you will need to copy libOpenCvNative.so from the /doc folder of that repo into the FIRST folder on the USB storage of the Robot Controller (i.e. connect the Robot Controller to your computer with a USB cable, put it into MTP mode, and drag 'n drop the file)

Sync Gradle and Finished!

Last updated