android - Android:无法同步旧项目,无法解析“:app@debug/compileClasspath”的依赖关系:无法解析错误
问题描述
我试图打开一个旧项目,这不是我的,但它无法同步和正确构建Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve de.keyboardsurfer.android.widget:crouton:1.8.5. Show Details Affected Modules: app
,几乎每个依赖项都会显示错误的错误,
我尝试使缓存无效并重新启动,清理项目并将谷歌添加到存储库.
这是我的项目 gradle 文件:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
google()
maven {
url 'https://maven.google.com/'
name 'Google'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter{ url "http://jcenter.bintray.com/" }
google()
maven {
url 'https://maven.google.com/'
name 'Google'
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
这是应用程序模块 gradle 文件:
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
buildToolsVersion '28.0.3'
defaultConfig {
applicationId "com.safesoft.inv.hyper"
minSdkVersion 16
targetSdkVersion 28
versionCode 14
versionName "1.0.10"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true //important
ndk
{
abiFilters "armeabi-v7a", "x86", "armeabi", "mips"
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
lintOptions {
checkReleaseBuilds false
// Or, if you prefer, you can continue to check for errors in release builds,
// but continue the build even when errors are found:
abortOnError false
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES.txt'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/notice.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/dependencies.txt'
exclude 'META-INF/LGPL2.1'
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation('de.keyboardsurfer.android.widget:crouton:1.8.5@aar') {
// exclusion is not necessary, but generally a good idea.
exclude group: 'com.google.android', module: 'support-v4'
}
implementation 'com.haozhang.libary:android-slanted-textview:1.2'
implementation 'com.haozhang.libary:android-slanted-textview:1.2'
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:animated-vector-drawable:28.0.0'
implementation 'com.android.support:cardview-v7:28.0.0'
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1'
implementation 'org.greenrobot:eventbus:3.0.0'
implementation 'com.uniquestudio:checkbox:1.0.1'
implementation 'com.labo.kaji:swipeawaydialog:0.1.0'
implementation 'com.baoyz.swipemenulistview:library:1.3.0'
implementation 'com.emmasuzuki:easyform:1.1.0'
implementation 'com.google.android.gms:play-services-maps:11.6.0'
implementation 'com.github.paolorotolo:expandableheightlistview:1.0.0'
implementation 'com.victor:lib:1.0.4'
implementation 'eu.inloop:simplerecycleradapter:0.3.1'
implementation 'me.grantland:autofittextview:0.2.+'
implementation 'com.jzxiang.pickerview:TimePickerDialog:1.0.1'
implementation 'com.weiwangcn.betterspinner:library-material:1.1.0'
implementation 'com.jakewharton:butterknife:8.0.1'
implementation 'com.dropbox.core:dropbox-core-sdk:3.0.5'
implementation 'com.squareup.okhttp3:okhttp:3.7.0'
implementation 'pl.coreorb:selection-dialogs:0.9.1'
//Button
implementation 'com.rilixtech:materialfancybuttons:1.8.7'
implementation 'com.google.android.gms:play-services-vision:11.6.0'
implementation 'me.dm7.barcodescanner:core:1.9.8'
implementation 'me.dm7.barcodescanner:zbar:1.9.8'
//implementation 'me.dm7.barcodescanner:zxing:1.9.8'
//Icons
implementation 'com.rilixtech:entypo-typeface:1.0.0.3'
implementation 'co.lemonlabs:expandable-button-menu:1.0.0'
//Date time pickr
implementation 'com.github.florent37:singledateandtimepicker:1.2.2'
// externel librery
implementation project(':folding-cell')
implementation project(':lib_badge')
implementation project(':library_bth')
implementation project(':materialbarcodescanner')
implementation project(path: ':SpinKitLib')
implementation project(':sweet_alert_dialog_library')
// /Libs
implementation files('libs/Jaybird2_2_4.jar')
implementation files('libs/telpo_api.jar')
implementation files('libs/core-3.1.0.jar')
implementation files('libs/opencsv-3.9.jar')
implementation files('libs/httpmime-4.0.3.jar')
implementation files('libs/dropbox-android-sdk-1.6.3.jar')
testImplementation 'junit:junit:4.12'
implementation 'junit:junit:4.12'
implementation files('libs/commons-net-1.4.1.jar')
}
这是项目的层次结构:
我应该提到这是一项新工作,这个项目是由老开发人员在 4 年前完成的,我必须在应用程序内部进行一些更改(例如,使用 recyclerViews 更改 listViews)。
解决方案
推荐阅读
- python - BeautifulSoup changes > to >
- duplicati - Duplicati 可以保留文件日期和时间吗?
- mysql - MySql,同一张表的多个列的外键
- modbus-tk - 在使用 modbus_tk 库时需要帮助
- laravel - Laravel 计数查询
- performance - 数据处理时如何使用任务(或可能部分)读取大数据
- javascript - 我如何使用这样的参数函数从数组中获取对象
- c++ - 当对象被其他对象引用时,关于 const 限定符的一个微妙问题
- java - 无法连接到在 docker 容器内运行的嵌入式 undertow 服务器
- angular-flex-layout - 有条件地使用角度弹性布局?