-
Notifications
You must be signed in to change notification settings - Fork 1
Setup Android Studio and clone source code
kathbee edited this page Jun 24, 2018
·
3 revisions
- Install Android studio
- In Android studio, clone source code from GitHub repository.
- you will need a GitHub account to clone this source code.
- within Android studio, File -> New -> Project from Version Control -> GitHub
- you should then see this dialog
- The most recent commit of WurmPaint has a lot of stuff you won't need unless you plan to launch your app on the app store and use with Google Play, so we'll use an older commit.
- Go to Version Control View (alt + 9) and click the
Log
tab. - Scroll down the
Log
until you findRelease Version 1.06
. Right click and select theCheckout Revision
option.
- Go to Version Control View (alt + 9) and click the
- You may wish to rename folders within the cloned source code to suit your own preferences. For example, as you've cloned it, the package name is
com.example.caden.drawingtest
. It will be easiest not to rename the 'com.example' part, but if I want to rename tocom.example.kathleen.neuritetrace
, I can do that now. You only need to do this if you would like to have two different versions of the app on the same phone - in this case the package names will conflict if you do not rename one of them.- first, make sure your project view is in Android view
- Click on the gear wheel of this the project view tab and uncheck
Compact empty middle packages
- within the java -> com -> example folder of the project hierarchy, right click on folders you wish to rename and navigate to Refactor -> Rename. Make sure to rename the package, not just the directory.
- A dialog should pop up that allows you to rename elements of the hierarchy.
- At this point, you may have encountered this error:
Gradle 'WurmPaint' project refresh failed.
- you should see further text describing the error in the Messages portion of the interface, with a blue link to "Install missing platform(s) and sync project". Click this link and the missing platform will install and the error should disappear. You may have to do this several times to install several additional packages and platforms, but eventually the project should sync.
- WurmPaint may try to automatically build, at which point you will get this error:
File google-services.json is missing. The Google Services Plugin cannot function without it.
In the next section we will setup the Firebase database to connect to the app and obtain the google-services.json file.