You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
buildscript {
repositories {
google()
mavenCentral()
}
dependencies {
classpath "com.android.tools.build:gradle:7.0.1"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
maven { url 'https://jitpack.io' }
}
}
如果报错:Build was configured to prefer settings repositories over project repositories but repository 'maven' was added by build file 'build.gradle',可以删除"allprojects"块,并在项目根目录的settings.gradle文件中添加maven { url 'https://jitpack.io' },如:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
maven { url 'https://jitpack.io' }
jcenter() // Warning: this repository is going to shut down soon
}
}
按说明添加了
dependencies {
implementation 'com.github.Acccord:AndroidSerialPort:1.5.0'
}
但是一直无法正常引用
Failed to resolve: com.github.Acccord:AndroidSerialPort:1.5.0
The text was updated successfully, but these errors were encountered: