Installation

How to import SolversLib into your Android Studio FTC Project

Option 1: Manually Install

This works with or without having FTCLibarrow-up-right already installed. SolversLib allows you to easily migrate from FTCLib to SolversLib while keeping all of your code, or install normally.

build.gradle

The first thing you need to change from FTCLib is the dependency in build.gradle

build.gradle (Module: TeamCode)
dependencies {
    // implementation "org.ftclib.ftclib:core:2.1.1" remove FTCLib core
    implementation "org.solverslib:core:0.3.4" // core

Or, if you are using Pedro Pathing, change to this dependency block

build.gradle (Module: TeamCode)
dependencies {
    // implementation "org.ftclib.ftclib:core:2.1.1" remove FTCLib core
    implementation "org.solverslib:core:0.3.4" // core
    implementation "org.solverslib:pedroPathing:0.3.4" // pedroPathing
}

And if you are using Photon, change to this dependency block

build.gradle (Module: TeamCode)
dependencies {
    // implementation "org.ftclib.ftclib:core:2.1.1" remove FTCLib core
    implementation "org.solverslib:core:0.3.4" // core
    implementation "org.solverslib:pedroPathing:0.3.4" // pedroPathing
    implementation "org.solverslib:photon:0.3.4" // photon
}
triangle-exclamation

The latest version numbers (as well as a list of all version numbers) are available at:

triangle-exclamation

Please note that you should not and cannot have both FTCLib and SolversLib installed at the same time.

Repositories (required)

Finally in your repositories block, add the following code. You may have other content here, especially if you have the Pedro Pathing library installed. If you do not have a repositories block, you can add it above your dependencies block.

Changing Imports (Only if Migrating from FTCLib)

Because the package names will be different, you can either manually replace all instances of com.arcrobotics.ftclib with com.seattlesolvers.solverslib , or use a command in a terminal to replace them all at once for you. Please make sure you either open a terminal into your Android Studio project or use the built-in Android Studio terminal to run the commands below.

FTCLib Imports to SolversLib Imports (MacOS/Linux):

SolversLib Imports to FTCLib Imports (MacOS/Linux):

FTCLib Imports to SolversLib Imports (Windows):

SolversLib Imports to FTCLib Imports (Windows):

Sync Gradle and Finished!

Click that button and if successful, you can now use SolversLib

Option 2: Installing from SolversLib Quickstart

An alternative option is to simply use the SolversLib Quickstart. Similar to the FTCLib Quickstart, SolversLib has a Quickstart with this library fully set up. You can view it at https://github.com/FTC-23511/SolversLib-Quickstartarrow-up-right. You can either fork or clone this repository as needed to use it.

In addition, the Quickstart also has the Pedro Pathing library installed and added along with the SolversLib pedroPathing` dependency, meaning that it is hassle-free. If you don't want the Pedro Pathing part, you can simply delete the relevant files and dependencies.

Last updated