Android Studio Support.v7

时间:2019-07-07 13:10:18

标签: java python-3.x android-studio

我是android新手。我想创建一个应用,但出现此错误:

error: package android.support.v7.app does not exist

我的gradle代码在这里::

android {
    signingConfigs {
        apk_key {
            keyAlias 'key1'
            keyPassword ''
            storeFile file('D:/Users/hossein/Desktop/android-key/apk_key.jks')
            storePassword ''
        }
    }
    compileSdkVersion 28

    buildToolsVersion "28.0.3"
    defaultConfig {
        applicationId "maa.tic_tac_to"
        minSdkVersion 16
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

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 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.android.support.constraint:constraint-layout:2.0.0-beta2'
    implementation 'com.google.firebase:firebase-messaging:19.0.1'
    testImplementation 'junit:junit:4.12'
}


apply plugin: 'com.google.gms.google-services'

有人可以帮助我吗?

1 个答案:

答案 0 :(得分:0)

问题可能出在您的代码上,只需单击错误并按 alt + 输入,然后选择导入android.support.v7.app

gradle没问题,请尝试清理并重建项目。

希望有帮助!