implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'com.google.android.material:material:1.2.0-alpha03'
implementation 'com.squareup.retrofit2:retrofit:2.6.3'
implementation 'com.squareup.retrofit2:converter-gson:2.7.0'
implementation 'com.github.bumptech.glide:glide:4.10.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.10.0'
implementation 'com.lcodecorex:tkrefreshlayout:1.0.7'
implementation 'androidx.recyclerview:recyclerview:1.1.0'
implementation 'com.jakewharton:butterknife:10.2.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:10.2.1'
implementation "com.github.tamsiree.RxTool:RxKit:v2.4.1"
implementation "com.github.tamsiree.RxTool:RxUI:v2.4.1"
implementation 'com.android.support:cardview-v7:27.1.1'
implementation "com.github.tamsiree.RxTool:RxFeature:v2.4.1"
implementation 'com.google.zxing:android-core:3.3.0'
implementation 'com.google.zxing:core:3.3.2'
加入上行代码以后出现
Error:(49, 0) Could not find method implementation() for arguments [directory 'libs'] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
<a href="openFile:D:\androidwork\MyApplication\app\build.gradle">Open File</a>
maven { url "https://jitpack.io" } 已经降入过了
试着百度了一下查询了 解决方法,将 implementation 改成了compile ,其余也全部改动以后 仍然有错
Error:(27, 13) Failed to resolve: androidx.appcompat:appcompat:1.0.2
<a href="openFile:D:/androidwork/MyApplication/app/build.gradle">Show in File</a><br><a href="open.dependency.in.project.structure">Show in Project Structure dialog</a>
Error:(27, 13) Failed to resolve: androidx.appcompat:appcompat:1.0.2
<a href="openFile:D:/androidwork/MyApplication/app/build.gradle">Show in File</a><br><a href="open.dependency.in.project.structure">Show in Project Structure dialog</a>
是andorid版本的问题吗。没按照之前视频里面的android去下载。
我都是用到一个添加一个,建议你也可以这样,至于如何添加,可以maven search,也可以AS search。