- First create a github account if you don't already have one https://www.wikihow.com/Create-an-Account-on-GitHub
- Go to craig's repository: https://github.com/cmacfarl/FTC-Team-25 or FTC-Team-5218
- Then click on the fork, which creates your own copy of the repository (only need to do this once!!!)
- Also fork cmacfarl's terkel (so you have your own copy of the repositories)
- Note that we are not forking ftc_app (or RoverRuckus for 2018-2019) since Craig says that we will not likely check in updates to that GIT repository
- Now change directories to where you want your GIT repositories on your laptop. You may use a combination of the 'cd <your_directory_path>' and 'mkdir <your_new_directory_name>' commands in order to make the directory where you want to put your GIT repository and navigate to that location
- Now clone the GIT repositories into the directory on your laptop that you have chosen, by typing "git clone" and click on green "Clone or download" button and copy and paste the url (make sure you only get the repositories for ftc_app, terkel, and FTC-Team-your_team_number):
- git clone https://github.com/cmacfarl/RoverRuckus.git . (previously was ftc-app.git)
- git clone https://github.com/<yourGithubRepositoryName/terkel.git
- git clone https://github.com/<yourGibhubRepositoryNamel/FTC-Team-25
- git clone https://github.com/<yourGibhubRepositoryNamel/FTC-Team-5218
- Now change directory into the RoverRuckus directory on your laptop and select team branch by typing "git checkout master-25" or "git checkout master-5218" depending on your team number
- Then start up android studio and select "Import project (Eclipse ADT, Gradle, etc.) and navigate to your RoverRuckus (previously ftc_app) directory.
- If you get an error like the one in the image below (with the title-bar that reads "ftc-app [~/Desktop/FIRST/ftc_app]" and look at the lower right-hand corner, you will see that Android Studio is complaining about "Failure to find target...", so click on the link to "Install missing platform(s) and missing targets"
- OLD: Next go the to DogeCV tab on the rnrrsoftware page and follow the instructions to install the DogeCV and OpenCVLibrary3
- CINDY: Go to mac's Desktop/androidStudioGoogleIssueScreenshots for issues that need to be fixed until Craig fixes this in his repository. Note that you can select all the .png files in that directory and open them with Preview to see the images
- OLD: Now there is a series of fixes that will need to be made based on issues introduced by Google
- OLD 1. You will see a message in the lower right corner of the Android Studio window: "Could not find com.android.tools.build:aapt2:3.2.1-4818971...Required by: project :openCVLibrary3", so in the left top frame, you go to "Gradle Scripts"->build.gradle(Module: openCVLibrary3) and add 'jcenter() google()' inside repositories
repositories {
jcenter()
google()
}
then click the "Sync Now" link
- OLD 2. Then you see a similar message as the previous step for DogeCV, so do a similar step as above for "Gradle Scripts"->build.gradle(Module: DogeCV) and then inside the repositories segment, but after the flatDir segment, add "google() " code after , then click the "Sync Now" link
--------------------------------------------------------------------------------------------------------------------------------
- Next we see the following message, so we follow the instructions, bolded below (I just commented out /* builtToolsVersion '27.0.3' */ in the build.gradle file for DogeCV, then clicked on 'Sync Now'
Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'. It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
The specified Android SDK Build Tools version (27.0.3) is ignored, as it is below the minimum supported version (28.0.3) for Android Gradle Plugin 3.2.1.
Android SDK Build Tools 28.0.3 will be used.
To suppress this warning, remove "buildToolsVersion '27.0.3'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.
Update Build Tools version and sync project
Open File
The targetSdk version should not be declared in the android manifest file. You can move the version from the manifest to the defaultConfig in the build.gradle file.
The specified Android SDK Build Tools version (27.0.3) is ignored, as it is below the minimum supported version (28.0.3) for Android Gradle Plugin 3.2.1.
Android SDK Build Tools 28.0.3 will be used.
To suppress this warning, remove "buildToolsVersion '27.0.3'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.
Update Build Tools version and sync project
Open File
--------------------------------------------------------------------------------------------------------------------------------
- Then you may have a compilation warning, so in Android studio, do a Build->Rebuild
"Compilation failed; see the compiler error output for details."
and open up the arrow next to /Users/coda/Desktop/FIRST/ftc-app (3 errors)
so you can see the following 3 errors:
../../../../terkel/java/team25core/TwoAxisShoulderTask.java
error: package opmodes does not exist
error: cannot find symbol variable HisaishiCalibration
error: cannot find symbol variable HisaishiCalibration
then jump to step 4 below
- 2. "Could not find com.android.tools.build:aapt2:3.2.1-4818971...Required by: project :FtcRobotController", so in the left top frame, you go to "Gradle Scripts"->build.gradle(Module: FtcRobotController) and in the "repositories {flatDir{ dirs '../libs'}}" code, add jcenter() and google() , then click the "Sync Now" link
repositories{
flatDir {
dirs '../libs'
}
jcenter()
google()
}
- 3. Then you get a similar issue, but with "Team Code", in the "Gradle Scripts"->build.gradle (Module: TeamCode) add the following "repositories" block between the "android" and "apply" and then click the "Sync Now" link
android {
etc. etc.
}
repositories {
google()
}
apply from: '../build.common.gradle'
- 4. After you fix all the issues click on Android Studio's Build->Rebuild project and there may be an issue that was accidentally produced by an invalid check-in by a rnrr developer. Click on the search magnifier and search for "TwoAxisShoulderTask.java" Then in the TwoAxisShoulderTask.java file, look for HisashiCalibration and for all the variables from X_AXIS_STOWED to X_AXIS_BACK, remove HisashiCalibration.* and replaced it with 0.
- Next in TwoAxisShoulderTask.java file comment out 'import opmodes.HisashiCalibration' and Build->rebuild
- You should now see "Build: completed successfully". It is okay if there are Java compiler: (2 warnings)
- Once you make changes that you want to incorporate into craig's master, you can first 'git push' your changes into your own github repository, then submit a new pull request (which is next to "branch master"), which will allow craig to accept your pull request. If he accepts, your changes will be merged into his master. Otherwise, if he rejects it, then it will not impact his master