Answer the question
In order to leave comments, you need to log in
How to catch code that causes compilation error "uses unchecked or unsafe operations."?
Looks like the code hasn't changed. When compiling, the studio began to give an error:
MyKoteGame.java: uses unchecked or unsafe operations. Recompile with -Xlint:unchecked for details.
Not pointing to the error line. There is a lot of code, how to catch, where does the error come from?
Answer the question
In order to leave comments, you need to log in
Open build.gradle, find the allprojects section, add to it
allprojects {
...
gradle.projectsEvaluated {
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:unchecked"
}
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question