【发布时间】:2019-08-12 04:16:06
【问题描述】:
运行命令tns run android 或tns debug android 时出现以下错误。在我从C:\Users\yash\.gradle\gradle.properties 中删除.gradle/gradle.properties 文件夹之前它工作正常,现在我无法撤消它。
我得到的 50 个错误中有 1 个是:
Could not resolve all artifacts for configuration ':classpath'. Could not resolve org.ow2.asm:asm:6.0. Required by: project : > com.android.tools.build:gradle:3.3.1 project : > com.android.tools.build:gradle:3.3.1 > com.android.tools.build:builder:3.3.1 project : > com.android.tools.build:gradle:3.3.1 > com.android.tools.build.jetifier:jetifier-processor:1.0.0-beta02
NS 版本
"nativescript": {
"id": "org.nativescript.chennaivolunteers",
"tns-ios": {
"version": "5.0.0"
},
"tns-android": {
"version": "5.2.1"
}
}
app.gradle
...
buildscript {
repositories {
google()
jcenter()
maven {
url 'https://dl.google.com/dl/android/maven2'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.0'
}
}
android {
defaultConfig {
generatedDensities = []
applicationId = "org.nativescript.chennaivolunteers"
}
signingConfigs {
config {
// You need to specify either an absolute path or include the
// keystore file in the same directory as the build.gradle file.
storeFile file("<store-filename>.jks")
storePassword "<store-password>"
keyAlias "<store-alias>"
keyPassword "<store-password>"
}
}
aaptOptions {
additionalParameters "--no-version-vectors"
}
}
project.ext {
googlePlayServicesVersion = "+"
}
dependencies {
compile 'com.facebook.android:facebook-android-sdk:4.6.0'
}
...
【问题讨论】:
-
@ישואוהבאותך 我已经尝试过上述问题中提到的解决方案,您可以在我的
app.gradle文件中看到 -
我再次检查了重复的问题,发现最近的答案与您当前的答案相同。所以,我将结束这个问题。
-
@ישואוהבאותך 确定
标签: android gradle android-gradle-plugin nativescript