错误:(8,30)错误:即使我编译了com.android.support:support也无法找到符号类ActionBarActivity

时间:2018-01-27 02:43:19

标签: android gradle android-gradle

这里我有错误:(8,30)错误:找不到符号类ActionBarActivity:

Here i have the  Error:(8, 30) error: cannot find symbol class ActionBarActivity

即使我已将com.android.support:support-v13:27.0.2添加到我的gradle中,我也收到了一个奇怪的错误。

我的gradle同步成功,但是当我尝试运行该应用时。我收到了这个错误。

请帮助!

这是我添加的库:

This is My added libraries

和我的Gradle代码:

apply plugin: 'com.android.application'

android {
compileSdkVersion 27
defaultConfig {
    applicationId "luck.materialdesign.tabsnavigator"
    minSdkVersion 15
    targetSdkVersion 26
    versionCode 1
    versionName "1.0"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'),                'proguard-rules.pro'
    }
}
}

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
//noinspection GradleCompatible
compile 'com.android.support:appcompat-v7:+'
compile 'de.hdodenhof:circleimageview:1.2.2'
compile 'com.mcxiaoke.volley:library:1.0.15'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.github.bumptech.glide:glide:3.5.1'
compile 'net.gotev:uploadservice:2.1'
compile 'com.android.support:recyclerview-v7:+'
compile 'com.android.support:support-annotations:27.0.2'
implementation 'com.android.support:support-v13:27.0.2'
}

1 个答案:

答案 0 :(得分:0)

这是因为从支持库版本26.0.0-beta2开始删除了 ActionBarActivity 。你可以查看 https://developer.android.com/sdk/support_api_diff/26.0.0-beta2/changes/alldiffs_index_removals.html

因此,您必须将ActionBarActivity迁移到 AppCompatActivity 工具栏