2

I am currently working on a legacy android project which had Google Analytics implementation since last three years . Recently there is need of implementing Android Firebase in the same project as Google will be discontinuing GoogleAnalytics. When I tried to integrate Firebase to my application, I got error while building application that I am running on Gradle version 2+ and to support firebase Application needs to be upgraded to Gradle version 3+. Application also has couple of legacy libraries also , which also needs some modifications. Current Gradle version is 3.4.1, when I am trying to upgrade gradle version I am facing lots of dependacies issues and Older classes needs to be removed for eg. ActionBarActivity which is removed from Android SDK.

What should be the approach in this scenario as I am getting lint issues while building project. Is there any safe way to upgrade gradle system?

I have tried upgrading gradle file to version 3.4.1 and gradle.properties to version 5.1.1

distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip

It would be ideal if I am able to update my project to the latest gradle version so that application will be compatiable to the latest Ansroid OS

Gabriele Mariotti
  • 320,139
  • 94
  • 887
  • 841
akshay toshniwal
  • 180
  • 1
  • 11

1 Answers1

4
  1. Please update your Android Studio to 3.2
  2. Use the compileToolSdk as 28
  3. Change all the appcompat and support to 28.0.0
  4. In your project dependency upgrade it like this - classpath 'com.android.tools.build:gradle:3.4.2'
  5. make all ActionBarActivity to AppCompatActivity.

You are all updated. Will take some time and effort but everything will be updated and latest.

Anupam
  • 2,845
  • 2
  • 16
  • 30