[英]why i am not able to run my flutter project in android constantly getting gradle error?
[:[* 出了什么問題:無法確定任務“:app.mergeDebugAssets”的依賴關系:> 無法解析配置“:app.debugRuntimeClasspath”的所有依賴關系:> 無法創建任務“:app.minifyReleaseWithR8”:>找不到帶路徑的平台 SDK; 平台;android-31
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 14s
Exception: Gradle task assembleDebug failed with exit code 1][1]][1]
我不斷收到關於 gradle 任務的錯誤,通過搜索它已經浪費了 3 天,但沒有得到任何解決方案,但可能需要信息
android/build.gradle
dependencies {
classpath 'com.android.tools.build:gradle:7.0.2'//by default it was 4.1.2 but was getting error Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01 so I changed to 7.0.2 considering someone's suggestion
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
gradle-wraper.properties
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip //before it was gradle-6.7
找不到路徑為 platforms;android-31 的平台 SDK,這意味着沒有 android SDK 文件夾
$ android 列表目標
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.