【发布时间】:2020-01-10 13:03:07
【问题描述】:
我的一个朋友通过他的应用向我发送了一些活动。我为每个活动创建了一个新活动,并将代码复制粘贴到新的空活动中。现在我在导入时遇到了一些问题:
import android.support.design.widget.TextInputEditText;
import android.support.design.widget.TextInputLayout;
import android.support.v7.widget.RecyclerView;
import android.support.annotation.Nullable;
这里有我的 Gradle - 应用程序:
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
buildToolsVersion "28.0.3"
defaultConfig {
applicationId "com.example.progand"
minSdkVersion 26
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta2'
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support:recyclerview-v7:28.0.0'
implementation 'androidx.recyclerview:recyclerview:1.0.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.3.0-alpha02'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0-alpha02'
}
我尝试添加我在网上找到的所有依赖项,但没有解决问题,它仍然给我错误“无法解析符号'design/v7/annotation'”并且我无法运行我的应用程序来测试活动。 我真的不知道我做错了什么,对不起,如果它看起来很幼稚,但这是我第一次尝试 android studio 3.4.2,SDK 版本 29.0.2。
【问题讨论】:
标签: android gradle dependencies