Upgrading Gradle Version In Legacy Android Application
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
Answer
- Please update your Android Studio to 3.2
- Use the compileToolSdk as 28
- Change all the appcompat and support to 28.0.0
- In your project dependency upgrade it like this - classpath 'com.android.tools.build:gradle:3.4.2'
- make all ActionBarActivity to AppCompatActivity.
You are all updated. Will take some time and effort but everything will be updated and latest.
Related Questions
- → should I choose reactjs+f7 or f7+vue.js?
- → Phonegap Android write to sd card
- → Local reference jquery script in nanohttpd (Android)
- → Click to navigate on mobile devices
- → How to allow api access to android or ios app only(laravel)?
- → Access the Camera and CameraRoll on Android using React Native?
- → React native change listening port
- → What is the default unit of style in React Native?
- → Google play market autocomplete icon
- → Warning: Each child in an array or iterator should have a unique "key" prop. Check the render method of `ListView`
- → Using Laravel with Genymotion
- → react native using like web-based ajax function
- → react native pdf View