当我在我的gradle中添加一些依赖项并同步时,设置错误:无法解决:recyclerview-v7。 我不知道我能做什么。我研究很多次,但没有解决。 我删除依赖但又错误。
低于我的依赖:
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
defaultConfig {
applicationId "avida.ican"
minSdkVersion 16
targetSdkVersion 26
multiDexEnabled true
versionCode 2
versionName "0.0.2"
/*vectorDrawables.useSupportLibrary = true*/
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
//noinspection GradleCompatible
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support:design:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
implementation 'com.android.support:support-vector-drawable:26.1.0'
implementation 'com.android.support:support-v4:26.1.0'
implementation files('libs/ksoap2-android-assembly-3.6.2-jar-with-dependencies.jar')
compile('com.stanfy:gson-xml-java:0.1.+') {
exclude group: 'xmlpull', module: 'xmlpull' //xml to object
}
implementation 'com.android.support:cardview-v7:26.1.0'
//________________________________________________
//binding
compile "com.jakewharton:butterknife:8.8.1"
annotationProcessor "com.jakewharton:butterknife-compiler:8.8.1"
//________________________________________________
/*implementation 'com.afollestad.material-dialogs:core:0.9.6.0'*/
implementation 'com.orhanobut:dialogplus:1.11@aar'
//loading
implementation 'com.wang.avi:library:2.1.3'
//change font
implementation 'uk.co.chrisjenx:calligraphy:2.3.0'
// reactive network checked
implementation 'com.github.pwittchen:reactivenetwork-rx2:0.12.3'
//contain FileUtils and another utils
implementation 'commons-io:commons-io:2.5'
//contain FileUtils and another utils
implementation 'commons-codec:commons-codec:1.11'
//otto bus
implementation 'com.squareup:otto:1.3.8'
implementation 'de.hdodenhof:circleimageview:2.2.0'
//FloatingActionButton
implementation 'com.github.clans:fab:1.6.4'
//editore for text
implementation 'jp.wasabeef:richeditor-android:1.2.2'
//ormlite use in project sqlite database
implementation 'com.j256.ormlite:ormlite-android:5.1'
//file picker
implementation 'com.github.angads25:filepicker:1.1.1'
// recorder
implementation 'com.github.adrielcafe:AndroidAudioRecorder:0.3.0'
// image downloader
implementation 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
//multy image,video Picker with list croper
implementation 'com.crop.multiple:multipleImagePickerLib:1.4.4'
implementation 'com.booking:rtlviewpager:1.0.1'
//--------------------------Tab----Layout--------------------
implementation 'com.ogaclejapan.smarttablayout:library:1.6.1@aar'
//Optional
implementation 'com.ogaclejapan.smarttablayout:utils-v13:1.6.1@aar'
//------------------------------------------------------------------
//expandable TextView
compile 'com.ms-square:expandableTextView:0.1.4'
}
}
低于我的项目格斗:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
maven {
url 'https://oss.sonatype.org/content/repositories/ksoap2-android-releases/'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'com.jakewharton:butterknife-gradle-plugin:8.8.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
maven { url "https://jitpack.io" }
maven {
url 'http://dl.bintray.com/amulyakhare/maven'
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
我累了请帮帮我。
现在我的gradle dosnt同步。
我想添加此依赖项: 编译' com.amulyakhare:com.amulyakhare.textdrawable:1.0.1'
答案 0 :(得分:2)
wooooooooow我终于解决了我的问题。
我不知道。但问题来自maven google()。 我删除了谷歌()并添加
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
maven {
url 'https://oss.sonatype.org/content/repositories/ksoap2-android-releases/'
}
maven {
url 'http://dl.bintray.com/amulyakhare/maven'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'com.jakewharton:butterknife-gradle-plugin:8.8.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
//google()
maven {
url 'https://maven.google.com'
}
jcenter()
maven { url "https://jitpack.io" }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
而不是。
我从Link
解决了我的问题这是我的项目节目:
super
答案 1 :(得分:0)
你需要项目级gradle文件中的maven代码:
repositories{
maven {
url 'http://dl.bintray.com/amulyakhare/maven'
}
}