LogoLogo
v1.1.0
v1.1.0
  • Welcome
  • Installation
  • Features
    • Hardware
      • Motors
    • Gamepad
    • Drivebases
    • Geometry
    • Controllers
    • Computer Vision
    • Utility Functions
  • Kinematics
    • Odometry
    • WPILib Kinematics
      • Differential Drive Kinematics
      • Differential Drive Odometry
      • Swerve Drive Kinematics
      • Swerve Drive Odometry
      • Mecanum Drive Kinematics
      • Mecanum Drive Odometry
  • Pathing
    • Pure Pursuit
    • Trajectory
      • Trajectory Generation
      • Trajectory Constraints
      • Manipulating Trajectories
      • Transforming Trajectories
      • Ramsete Controller
  • Command Base
    • Command System
      • Subsystems
      • Command
      • Command Groups
      • Command Scheduler
      • Binding Commands to Triggers
      • Robot and CommandOpMode
    • Old Commands
  • Support FTCLib
  • Additional Reading
Powered by GitBook
On this page
  • build.common.gradle
  • Only If Using CV:
  • build.gradle (TeamCode)
  • OR
  • Install EasyOpenCV Dependency
  • Sync Gradle and Finished!

Was this helpful?

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.gradle file at the project root:

build.gradle
    repositories {
        jcenter()
    }

Next, minSdkVersion to 24 and multiDexEnabled to true:

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

Next, change JavaVersion to 8 :

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

Only If Using CV:

Remove all instances of "arm64-v8a"

build.common.gradle
ndk {
    abiFilters "armeabi-v7a"
}

ndk {
    abiFilters "armeabi-v7a"
}

build.gradle (TeamCode)

Add this dependency block for the base library:

build.gradle (Module: TeamCode)
dependencies {
    implementation 'com.arcrobotics:ftclib:1.1.6' // core

OR

Add this dependency block for the vision library:

build.gradle (Module: TeamCode)
dependencies {
    implementation 'com.arcrobotics.ftclib:vision:1.1.0' // vision
    implementation 'com.arcrobotics:ftclib:1.1.6' // core
}

Please ignore any warning regarding version 2.0.11--that is a beta version and should not be used.

Install EasyOpenCV Dependency

Sync Gradle and Finished!

PreviousWelcomeNextHardware

Last updated 4 years ago

Was this helpful?

Since FTCLib depends on EasyOpenCV for vision, and because EasyOpenCV depends on , you will need to copy 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). For Control Hub, you simply have to put the file in the FIRST folder. No settings need to be checked.

OpenCV-Repackaged
libOpenCvNative.so
Click that button and if successful, you can now use FTCLib