recompile with -xlint:deprecation for details , how to solve deprecated error in android , how to find deprecated api in android studio

recompile with -xlint:deprecation for details , how to solve deprecated error in android , how to find deprecated api in android studio

 recompile with -xlint:deprecation for details , how to solve deprecated error in android ,  how to find deprecated api in android studio

  Hello friends

recompile with -xlint:deprecation for details 

 how to solve deprecated error in android 

  how to find deprecated api in android studio 


android studio -  में कई बार हम Deprecated methods या Deprecated class का अपने कोड में use कर

 लेते है क्योकि हमे नहीं पता होता की ये deprecated  हो चुकी है और जब हम अपने program को Run

 करते है तो  हमे कुछ ऐसा error मिलता है   


android studio

इस error  को हटाने के लिए हमे पता लगाना होगा की कोनसी  deprecated class या method हम use

 कर  रहे है 

इसके लिए हम right corner में Project पर जायेगे 



android studio
फिर gradle script पर जायेंगे 


                                                                                      android studio

अब build . gradle(project:----) पर जाये 

                                                                            android studio

अब  repositories के अंदर google() और jcenter() के निचे दिया हुआ कोड डाले 


Code-----> gradle.projectsEvaluated {

                         tasks.withType(javacompile){

                                            options.compilerArgs << "-Xlint:deprecation"

                                         }

                           }


                                                                                     android studio

अब अपने program को run कीजिये और gradle build होने दीजिये 

gradle build खत्म होने पर आपको deprecated class या method निचे dialouge box में show हो 

 जायेगा और फिर आप उसे replace करके अपना error हटा सकते है 

अगर कोई class या  method  android studio में deprecated हुआ है तो उसकी जगह कोई

 नया    method  जरूर आया होगा आप उसे ढूंढे और deprecated class को उससे replace करदे 

आपका error खत्म हो जायेगा | 



Thanks for read



 

0 Response to " recompile with -xlint:deprecation for details , how to solve deprecated error in android , how to find deprecated api in android studio "

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel