Skip to content

Setup Android Studio and clone source code

kathbee edited this page Jun 24, 2018 · 3 revisions
  1. Install Android studio
  2. 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 clone dialog
  3. 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 find Release Version 1.06. Right click and select the Checkout Revision option. checkout revision
  4. 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 to com.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 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. refactor refactor
    • A dialog should pop up that allows you to rename elements of the hierarchy. refactor
  5. 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.
  6. 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.
Clone this wiki locally