-1

I am trying to migrate legacy code of my customer's Android app source code. Since i am going for API level > 22 (26 to be exact), what are my options or ways to know all the places in the large codebase, where i need to put in code explicitly for run-time permissions, without which my app crashes at places requiring 'dangerous' permissions, apart from the most basic or fundamental way (i fear) of going for manually searching almost all the activities or fragments...?

  • As long as you change the target SDK and run a clean once you have it updated, Android Studio will give warnings throughout the app as to where you are performing an action that requires permissions. It is probably the quickest way rather than going through the app class by class. – PGMacDesign Nov 27 '18 at 17:17
  • Even after running clean, i could see no such warnings. Can you please tell me where exactly to look for such warnings in Studio? – Akash Agarwal Nov 27 '18 at 17:45

1 Answers1

0

Go to your App Level Build.Gradle file and replace

implementation 'com.android.support:appcompat-v7:22.1.1'

with

implementation 'com.android.support:appcompat-v7:27.1.1'

change target sdk as well as compile sdk version like this

compileSdkVersion 27
targetSdkVersion 27

Next change build tools version to this

buildToolsVersion '28.0.3'

Press Sync Now you are all done..

Zeeshan Mehdi
  • 1,241
  • 1
  • 17
  • 18