Recently, that need turned towards Android.
This offers a basic series of tutorials for Android development. While the downloadable sample code is a little behind the current Android Studio version, it is terse and lesson specific and worth reviewing and running on your own. For use with Android Studio 3.3, the following changes will be needed in your build.gradle files.
But before you make these changes, let the IDE find and fix problems. If asked to upgrade, click OK. If any errors with suggested solutions are displayed in the console, try those suggestions first, like 'try again'.
If asked to recreate the wrapper using the latest supported Gradle version, click OK.
On build.gradle (Module: app), remove the line "buildToolsVersion" altogether.
Change the compileSdkVersion to 26 (or latest)
Change minSdkVersion to 14 (recommended by the console when you first sync the file)
Change targetSdkVersion to 26 (or latest)
Change instances of 'compile' to 'implementation' in the dependencies section.
Change the dependency for com.android.support:appcompat-v7+ to the version of the SDK you are using, eg 'com.android.support:appcompat-v7:26.0.1'
In the build.gradle (Project: myproject) file, add google() before jcenter() wherever you see the reference to the jcenter() repository.
Upgrade your dependency for com.android.tools.build:
classpath 'com.android.tools.build:gradle:3.3.0'
From there, I recommend starting at the beginning of the list of lessons. Download the sample code, unzip it and open the project in Android Studio. Then walk through the written lecture and have a play running the code on your device on an emulator (downloaded through Android Studio).
Time spent on a lesson will depend on you. Downloading and setting up Android will eat some bandwidth and take some time. Generally, Android Studio is very user friendly, but if you get some errors in the console that prevent you from building and running an app, just copy and paste the text into your favorite search engine. There is a lot of help available on sites like Stack Overflow.
After you've worked through the lessons, keep the unzipped code handy. You'll have some familiarity with it and should easily remember where certain examples can be found. Going forward, it can serve as a library of snippets to help you out with your own apps.
No comments:
Post a Comment