We have forgotten how to update to the new version without losing our programs. We have downloaded the zip and extracted to C: drive. Now do we go to project then new then import project or do we go to file then import settings? we just do not want to lose our programs we have already written.
Announcement
Collapse
No announcement yet.
updating to 2.4
Collapse
X
-
I'm not sure if we are doing it properly but I always copy the code out of the TeamCode folder, replace the entire FTC-App-Master folder with the new one and then copy the team code back into the new one. When I open android studio I just have it open the new SDK i copied over and everything seems to work well.
This is what has worked for us but if there is a better option out there we would love to know what it is!
-
We click a couple buttons.
1) A bookmark we established for pulling changes from the ftctechnh/ftc_app repository to our fork (base fork should be yours, head fork should be theirs)
2) create the pull request
3) merge pull request
4) (In android studio) Update Project
Comment
-
Originally posted by FTC5501 View PostI'm not sure if we are doing it properly but I always copy the code out of the TeamCode folder, replace the entire FTC-App-Master folder with the new one and then copy the team code back into the new one. When I open android studio I just have it open the new SDK i copied over and everything seems to work well.
This is what has worked for us but if there is a better option out there we would love to know what it is!
Comment
-
I believe you will loose your git history with this method. We always make our changes on a separate branch (not master); so when FTC releases a new version we do a git pull from ftctechnh to our local master, and then rebase our own branch onto the local master. That way we do not loose our git history.
Comment
-
Originally posted by FTC4160 View PostWe click a couple buttons.
1) A bookmark we established for pulling changes from the ftctechnh/ftc_app repository to our fork (base fork should be yours, head fork should be theirs)
2) create the pull request
3) merge pull request
4) (In android studio) Update Project
I thought I had a good grip on the process, but after having few issues and trying to use clean SDK 2.4, it doesn't seem to have all pieces as I cannot create new classes and TeamCode is not available to do compilations.
Comment
-
Updating this way is only possible if you set up your repository in a certain way. I'll describe this process here.
== Setting up your Repository for the first time ==
1) Sign into your Github account (or create one)
2) Go to https://github.com/ftctechnh/ftc_app/ and click "fork"
3) After a bit, you should have a brand new fork of ftc_app under your name
4) Click Clone or Download and copy the URL there (should end in .git)
5) Open Android Studio
6) Click "Check out project from Version Control"
7) Click "Git"
8) Enter the repository URL & location you wish to download, click clone
== Updating from ftctechnh/ftc_app ==
1) Visit the URL in the format "https://github.com/YOUR GITHUB ACCOUNT NAME/ftc_app/compare/master...ftctechnh:master"
-> Ex: https://github.com/FTC-4160/ftc_app/...ctechnh:master
2) Create the pull request
3) merge the pull request
4) Open Android Studio
5) Click VCS -> Update Project (blue arrow pointing down)
6) Update Type should be Branch Default, I also recommend using Stash (personal preference)
7) Click OK
Bonus: Deploying updated apps to the phones
1) Plug the Driver Station phone into the computer
2) In Android Studio, change the Project layout from Android to Project Files (this should show ftc_app, FtcRobotController, and TeamCode)
3) Click to open ftc_app twice (they are nested for some reason)
4) navigate to dock/apk
5) Right click on FtcDriverStation-release.apk
6) Click "Show in Explorer"
7) Now navigate (In a seperate explorer window) to a folder within the phone which you can access (I typically use downloads)
8) Drag and drop FtcDriverStation-release.apk into said folder
9) Detach the phone from the computer
10) Using the phone's file browser, open the .apk file and install the update
11) Plug the Robot Controller into the computer
12) Click the green play button next to "TeamCode" to run the project
13) watch carefully at the bottom of the screen for any problems. If the project deploys correctly, it should show downloading APK.
## If it does not download the APK, first uninstall the app from the Robot Controller. This will force the computer to deploy the latest version, but is also much slower because gradle can't work it's magic.
Comment
-
Originally posted by FTC4160 View PostUpdating this way is only possible if you set up your repository in a certain way. I'll describe this process here.
== Setting up your Repository for the first time ==
1) Sign into your Github account (or create one)
2) Go to https://github.com/ftctechnh/ftc_app/ and click "fork"
3) After a bit, you should have a brand new fork of ftc_app under your name
4) Click Clone or Download and copy the URL there (should end in .git)
5) Open Android Studio
6) Click "Check out project from Version Control"
7) Click "Git"
8) Enter the repository URL & location you wish to download, click clone
== Updating from ftctechnh/ftc_app ==
1) Visit the URL in the format "https://github.com/YOUR GITHUB ACCOUNT NAME/ftc_app/compare/master...ftctechnh:master"
-> Ex: https://github.com/FTC-4160/ftc_app/...ctechnh:master
2) Create the pull request
3) merge the pull request
4) Open Android Studio
5) Click VCS -> Update Project (blue arrow pointing down)
6) Update Type should be Branch Default, I also recommend using Stash (personal preference)
7) Click OK
Bonus: Deploying updated apps to the phones
1) Plug the Driver Station phone into the computer
2) In Android Studio, change the Project layout from Android to Project Files (this should show ftc_app, FtcRobotController, and TeamCode)
3) Click to open ftc_app twice (they are nested for some reason)
4) navigate to dock/apk
5) Right click on FtcDriverStation-release.apk
6) Click "Show in Explorer"
7) Now navigate (In a seperate explorer window) to a folder within the phone which you can access (I typically use downloads)
8) Drag and drop FtcDriverStation-release.apk into said folder
9) Detach the phone from the computer
10) Using the phone's file browser, open the .apk file and install the update
11) Plug the Robot Controller into the computer
12) Click the green play button next to "TeamCode" to run the project
13) watch carefully at the bottom of the screen for any problems. If the project deploys correctly, it should show downloading APK.
## If it does not download the APK, first uninstall the app from the Robot Controller. This will force the computer to deploy the latest version, but is also much slower because gradle can't work it's magic.
Thank you very much for taking time to help us out. Much appreciated.
I still wonder why ZIP file of new 2.4 version does not seem contain all of the necessary code.
Comment
-
Originally posted by FTC4160 View PostYou're welcome. If you don't mind, posting the problems you encountered and the solutions you found would be helpful for other teams that see this thread.
I will try record more details when updating SDK on different laptop, may be even expand on your step from a newbie point of view
Comment
Comment