java - 所有库必须具有确切的版本

标签 java android gradle sdk

我不太了解this,我的sdk版本与我的“appcompat”和“recyclerview”相同,但仍然有错误,我尝试重建和清理项目,但仍得到相同的结果,我有相同的项目这一个,但是没有像这样的错误,知道发生了什么吗?

apply plugin: 'com.android.application'

android {
    compileSdkVersion 26
    buildToolsVersion "26.0.1"
    defaultConfig {
        applicationId "com.example.parasitologymemorization.parasitologymemorization"
        minSdkVersion 18
        targetSdkVersion 26
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        jackOptions {
            enabled true
        }
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar', '**/*.so'])
    compile 'com.android.support.constraint:constraint-layout:1.0.2'
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })

    compile 'com.android.support:appcompat-v7:26.0.1'
    compile 'com.github.satyan:sugar:1.5'
    compile 'com.jakewharton:butterknife:8.8.1'
    compile 'com.squareup.picasso:picasso:2.5.2'
    compile 'com.android.support:recyclerview-v7:26.0.1'
    compile 'com.beardedhen:androidbootstrap:2.3.2'
    testCompile 'junit:junit:4.12'
    annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
    compile 'com.wonderkiln:camerakit:0.12.0'
    compile(name: 'tensorflow', ext: 'aar')
}

最佳答案

Android Studio将很多文件作为缓存,并且不会删除它们。当需要制作新文件时,这可能会引起麻烦,因此清除“缓存会清除旧缓存”并加快Android Studio的运行速度。

因此,您需要在Android Studio中使缓存无效/重新启动。

关于java - 所有库必须具有确切的版本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48494170/

相关文章:

java - 线程 "main"java.lang.IllegalArgumentException : n must be positive 中的异常

Java - Hashmap检索序列

java - Liquibase 不更新内存中的 h2 数据库

Android Studio 构建失败 - 任务 ':app:dexDebug' 执行失败

java - 获取 eclipse 项目绝对路径(在使用 tomcat 服务器的 Web 应用程序中)

android - 找到无效的 Gradle JDK 配置

android - 如何使用 nl.siegmann.epublib 显示所有页面和所有章节

android - 如何从 Android 应用发出 Google App Engine 身份验证请求?

android - 如何使用Android Studio重命名程序包?

android - 我的应用程序由于类重复而无法编译