- Some problems were found with the configuration of task ‘:app:generateSafeArgsDebug’ (type ‘ArgumentsGenerationTask’).
Type ‘androidx.navigation.safeargs.gradle.ArgumentsGenerationTask’ property ‘applicationId’ is missing an input or output annotation.
解決方案:是因為navigation-safe-args-gradle-plugin插件版本太低引起,修改下版本號即可,例如
classpath "androidx.navigation:navigation-safe-args-gradle-plugin:1.0.0"
修改為
classpath "androidx.navigation:navigation-safe-args-gradle-plugin:2.3.0"
- Using insecure protocols with repositories, without explicit opt-in, is unsupported. Switch Maven repository ‘maven(http://maven.aliyun.com/nexus/content/groups/public)’ to redirect to a secure protocol (like HTTPS) or allow insecure protocols. See …
解決方案:設定對應的maven庫的allowInsecureProtocol 屬性設定
修改為
maven {
allowInsecureProtocol = true
url 'http://maven.aliyun.com/nexus/content/groups/public/'
}
- this.activity?.let{…}
let、also等kotlin相關的關鍵字標紅,需要在project的build.gradle檔案中添加
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.10"
}
在app的build.gradle檔案中添加
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.6.10"
}
轉載請註明出處,本文鏈接:https://www.uj5u.com/yidong/386824.html
標籤:其他
