gpt4 book ai didi

java - APK 构建可疑方法调用时出错

转载 作者:行者123 更新时间:2023-11-29 04:54:22 24 4
gpt4 key购买 nike

尝试生成签名的 APK,但我收到此消息:

Error:Error: Suspicious method call; should probably call "layout" rather than "onLayout" [WrongCall]

我在方法上添加了 SupressLint,但它不起作用:

@SuppressLint("WrongCall")
@Override
protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
}

干杯!

最佳答案

With Android Studio, you can also run lint inspections for a specific build variant, or for all build variants from the build.gradle file. Add the lintOptions property to the android settings in the build file. This code snippet from a Gradle build file shows how to set the quiet option to true and the abortOnError option to false.

android {
lintOptions {
// set to true to turn off analysis progress reporting by lint
quiet true
// if true, stop the gradle build if errors are found
abortOnError false
// if true, only report errors
ignoreWarnings true
}
...
}

致谢 Improving Your Code with lint

关于java - APK 构建可疑方法调用时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34309521/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com