问题:android studio编译项目时出现:
Error:(12, 24) 警告: [deprecation] android.hardware中的Camera已过时
解决:(只是让其不提示)
1.app的 build.gradle中
1 android { 2 ... 3 lintOptions { 4 checkReleaseBuilds false 5 abortOnError false 6 7 } 8 }
2.根目录的build.gradle中
allprojects { ... gradle.projectsEvaluated { tasks.withType(JavaCompile) { options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation" } } }
原文地址:https://www.cnblogs.com/tomarsNi/p/9428668.html
时间: 2024-10-10 20:20:25