New VSCode WPILib Extension Pack Problems

I recently upgrade my VSCode Extension Pack version too (vscode-wpilib-2019.1.1) from my previous version of (vscode-wpilib-2019.0.0-alpha-4) I am aware that the projects previously created with the alpha version will not work with the new extension, so I created a new project and only transferred certain things over that I needed. I went to check the build.gradle to add … repositories { mavenCentral() }
like you needed to do previously (I realize it is already in the new version) and noticed that both compile navx() and compile ctre(); dependencies where missing. Because of this when I added in my Drive system I was getting errors for the ctre imports.

I was wondering if anyone knew what you needed to add to build.gradle dependencies to get the ctre imports

Please let me know if I’m missing something .

See https://wpilib.screenstepslive.com/s/currentCS/m/getting_started/l/682619-3rd-party-libraries

1 Like

They should be on your JSON path or you could just add it in from maven repos like I did here:

repositories {
    mavenCentral()
    maven {
        url "http://devsite.ctr-electronics.com/maven/release/"
    }
    maven {
        url "https://repo1.maven.org/maven2/"
    }
}

dependencies {
    compile wpi.deps.wpilib()
    compile wpi.deps.vendor.java()
    nativeZip wpi.deps.vendor.jni(wpi.platforms.roborio)
    nativeDesktopZip wpi.deps.vendor.jni(wpi.platforms.desktop)
    compile "com.ctre.phoenix:api-java:5.12.0"
    compile "com.ctre.phoenix:wpiapi-java:5.12.0"
    compile "com.kauailabs.navx.frc:navx-java:3.1.344"
    compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
}

If you are wondering how I got these repositories from, you can just dig them up from example json files from documentation from them.

This won’t work, you’re missing JNI dependencies. Please use the provided vendordeps mechanism with the instructions on screensteps and from CTRE.

4 Likes

Thank You! I followed the steps and it worked.