2017-08-10 48 views
0

我的摇篮更新Android工作室金丝雀公测1后,我拿到分钟SDK中的错误26

compileSdkVersion 26 
buildToolsVersion '26.0.1' 
defaultConfig { 
    applicationId "com.tester.us_site" 
    minSdkVersion 17 
    //noinspection GradleCompatible 
    targetSdkVersion 26 
    multiDexEnabled true 
    versionCode 1 
    versionName "1.0" 
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 
} 

编译后,我得到这个错误

Information:Gradle tasks [:app:assembleDebug] 
Error:Execution failed for task ':app:transformClassesWithDexBuilderForDebug'. 
> com.android.build.api.transform.TransformException: org.gradle.tooling.BuildException: com.android.dx.cf.code.SimException: default or static interface method used without --min-sdk-version >= 24 
Information:BUILD FAILED in 40s 
Information:1 error 
Information:0 warnings 
Information:See complete output in console 

据我了解,这个错误表示,在为了运行该项目,有必要指定min sdk 26.

但是Android 5.0 6.0 7.0呢?

## Gradle Build ## 
// Top-level build file where you can add configuration options common to all sub-projects/modules. 

buildscript { 
    repositories { 
     jcenter() 
    } 
    dependencies { 
     classpath 'com.android.tools.build:gradle:3.0.0-beta1' 
     classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8' 
     // NOTE: Do not place your application dependencies here; they belong 
     // in the individual module build.gradle files 
    } 
} 

allprojects { 
    repositories { 
     jcenter() 
    } 
} 

task clean(type: Delete) { 
    delete rootProject.buildDir 
} 
+1

更新您的类路径。 –

+0

@AslamHossin,可以更多。然后我不明白 – Prost

+1

只是在/ android和/ android/app 中删除'build'文件夹,然后使用'react-native run-android' –

回答

0

我变化22 番石榴21,并添加 力 'com.google.code.findbugs:JSR305:1.3.9'

这是工作。所有THX))

+0

对我来说,它是使用Jackson-datatype-jsr310。我终于放弃了尝试在android中使用java.time API。我想是时候把乔达带回我的项目了。只要我评论这一行 - >编译'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.8.0'我的项目开始使用compileSdkVersion 26和Android studio 3.0 beta2进行编译。 – 1vand1ng0

0

你可以尝试将其升级到最新的Android特定的构建

implementation 'com.google.guava:guava:23.0-android' 

这种固定的错误在gradle.build在项目层面我

相关问题