简体   繁体   中英

Getting error java uses or overrides a deprecated API with contacts_service package in flutter

I have setup contacts_service: ^0.4.6 plugin in my project and added below permissions in androidmanifest.xml file:

<uses-permission android:name="android.permission.READ_CONTACTS" />  
<uses-permission android:name="android.permission.WRITE_CONTACTS" />

Added it's function in my code file but getting below error in console at the time of compiling:

... java uses or overrides a deprecated API

Please suggest me what is the issue and how can we solve it. Thanks a lot.

I found the solution:

Open app/build.gradle , increase the minSdkVersion :

Change this:

minSdkVersion 16

into this:

minSdkVersion 23

And this solved my issue. I hope, this will also help you. Thanks.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM