Alan Alan - 23 days ago 9
Android Question

Proper way of upgrading Android app API level from 25 to 26

last year I built a small app for school and now with the release of Android O, I wanted to upgrade it so it targets the latest version (from 25 to 26)

How exactly do I go about doing this? Is there a recommended guide for beginners to learn or a checklist of what to do to updating my app?

Thanks!

Answer Source

According to documentation you have to make some updates in your build.gradle file

android {
  compileSdkVersion 26
  buildToolsVersion '26.0.0'

  defaultConfig {
    targetSdkVersion 26
  }
  ...
}

dependencies {
  compile 'com.android.support:appcompat-v7:26.0.0'
}

// REQUIRED: Google's new Maven repo is required for the latest
// support library that is compatible with Android 8.0
repositories {
    maven {
        url 'https://maven.google.com'
        // Alternative URL is 'https://dl.google.com/dl/android/maven2/'
    }
}

Note : You have to Remove broadcast receivers from your manifest file that are registered for implicit broadcast intents in your manifest file. You have to work with broadcast read documentation