java - 找不到 com.github.rey5137:material:1.3.0
问题描述
apply plugin: 'com.android.application'
android {
compileSdkVersion 29
buildToolsVersion "29.0.3"
defaultConfig {
applicationId "com.example.ecommerce"
minSdkVersion 19
targetSdkVersion 29
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
implementation 'com.google.firebase:firebase-analytics:17.3.0'
implementation 'com.github.rey5137:material:1.3.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.1.0'
}
apply plugin: 'com.google.gms.google-services'
我现在一直在 android studio 上工作,但是当我复制三个依赖项时,同步不成功。请帮帮我!!!!!!我从https://github.com/rey5137/material复制的依赖项如下所示
implementation 'com.github.rey5137:material:1.3.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.0.0'
解决方案
他们还通过 Jcenter 分发这个库。
您可以将新存储库添加到您build.gradle
的项目的主目录(根目录)中(不在app
!!!)。
到文件的末尾,您应该在allprojects
里面找到repositories
。在这里添加新的存储库:
maven { url 'https://jitpack.io' }
所以它应该看起来像:
allprojects {
repositories {
maven { url 'https://jitpack.io' } <---- add this line
}
}
(部分allprojects
可能在build.gradl
文件的底部)
推荐阅读
- python - 在不使用其他模块的情况下将 Tkinter MessageBox 居中在屏幕中间
- c - C 指针:复制字符串
- c++ - Qt QWebsocket::open 阻塞用户界面
- java - 无法使用 mockneat 将 MockUnit 转换为 String
- java - JSF 2.3 - Servlet 4 - JavaEE 8 和 Tomcat9:找不到 CDI BeanManager
- python - numpy 检查多列上的两个数组
- python-3.x - 如何访问类中的变量?- Python - Tkinter 窗口
- local - 如何在本地机器上使用 Google Colab
- r - 在列中搜索字符串以在 r 中合并
- symfony - 集合类型内联模板