android2020. 4. 24. 12:27

Deprecated API 사용할 발생하는 warning

호출부에 적절히 @SuppressWarnings("deprecation") 붙여준다

 

 

Recompile with -Xlint in Android studio

 

 

 

You need to add the following inside your app level buld.graddle file

allprojects {
    tasks.withType(
JavaCompile) {
        options.compilerArgs <<
"-Xlint:unchecked" << "-Xlint:deprecation"
    }
}

If for some reasons you need to continue using a deprecated API you can just suppress the warning. You could annotate the deprecated method with the

@SuppressWarnings("deprecation")

annotation.

post link

 

출처: <https://stackoverflow.com/questions/47740812/recompile-with-xlint-in-android-studio>

'android' 카테고리의 다른 글

ForegroundService test  (0) 2020.07.08
wake lock example  (0) 2020.07.03
Keystore file not set for signing config release 에러 발생  (0) 2020.04.24
android apex에 관한 글  (0) 2020.02.19
JNI -link  (0) 2020.01.07
Posted by easy16