简体   繁体   English

Android Studio中一致的Gradle错误

[英]Consistent Gradle error in Android Studio

Hi I am not sure what is wrong with my android studio but I have tried everything and am not sure what this error means.. 嗨,我不确定我的android studio有什么问题,但是我已经尝试了一切,但不确定这个错误是什么意思。

I have just uninstalled and re-installed android studio.. 我刚刚卸载并重新安装了android studio。

Here is a screenshot of the gradle error: 这是gradle错误的屏幕截图:

GradleError

Has anyone seen this error before? 有没有人看过这个错误?

app.gradle: app.gradle:

apply plugin: 'com.android.application'

android {
compileSdkVersion 26
buildToolsVersion '26.0.2'
defaultConfig {
    applicationId "com.almac.tracker"
    minSdkVersion 23
    targetSdkVersion 26
    versionCode 1
    versionName "1.0"
       testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
}

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
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.+'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.github.bmarrdev:android-DecoView-charting:v1.2'
compile 'com.google.firebase:firebase-ads:11.6.2'

compile 'com.google.android.gms:play-services-ads:11.6.2'
compile 'joda-time:joda-time:2.9.9'
compile 'com.akexorcist:RoundCornerProgressBar:2.0.3' 
compile 'com.github.lzyzsd:circleprogress:1.2.1'
compile 'com.github.PhilJay:MPAndroidChart:v2.2.4'
testCompile 'junit:junit:4.12'

} }

styles: 样式:

<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Base.Theme.AppCompat.Light.DarkActionBar">
    <!-- Customize your theme here. -->
    <item name="colorPrimary">@color/colorAccent</item>
    <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
    <item name="colorAccent">@color/colorAccent</item>
    <item name="android:textColorPrimary">@color/common_google_signin_btn_text_light_default
    </item>
</style>

make sure you have the AppCompat dependency in your app.gradle file 确保您的app.gradle文件中具有AppCompat依赖app.gradle

dependencies{
   ...
   implementation 'com.android.support:appcompat-v7:27.0.2'
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM