实施 'com.android.support.recyclerview-v7.27.1.1' 失败
implementation 'com.android.support.recyclerview-v7.27.1.1' FAILED
我是初学者。我有个问题。据说:
Exception is:
org.gradle.api.GradleScriptException: A problem occurred evaluating project ':app'.
Caused by: org.gradle.api.IllegalDependencyNotation: Supplied String module notation 'com.android.support.recyclerview-v7.27.1.1' is invalid.
plugins {
id 'com.android.application'
}
android {
编译SDK版本30
buildToolsVersion "30.0.3"
defaultConfig {
applicationId "com.example.telegramstickermaker"
minSdkVersion 21
targetSdkVersion 30
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
依赖项{
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support.appcompat-v7:27.1.1'
implementation 'com.android.constraint:constraint-layout:1.1.2'
testImplementation 'junit:4.12'
androidTestImplementation 'com.android.support.test.runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.android.support.recyclerview-v7.27.1.1'
implementation 'com.android.support.design-v7:27.1.1'
implementation 'com.karumi:dexter:4.1.0'
implementation 'info.androidhive:imagefilters:1.0.7'
}
应该是implementation 'com.android.support:recyclerview-v7:27.1.1'
。注意区别是有一个分号。
我是初学者。我有个问题。据说:
Exception is: org.gradle.api.GradleScriptException: A problem occurred evaluating project ':app'. Caused by: org.gradle.api.IllegalDependencyNotation: Supplied String module notation 'com.android.support.recyclerview-v7.27.1.1' is invalid.
plugins {
id 'com.android.application'
}
android { 编译SDK版本30 buildToolsVersion "30.0.3"
defaultConfig {
applicationId "com.example.telegramstickermaker"
minSdkVersion 21
targetSdkVersion 30
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
依赖项{
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support.appcompat-v7:27.1.1'
implementation 'com.android.constraint:constraint-layout:1.1.2'
testImplementation 'junit:4.12'
androidTestImplementation 'com.android.support.test.runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.android.support.recyclerview-v7.27.1.1'
implementation 'com.android.support.design-v7:27.1.1'
implementation 'com.karumi:dexter:4.1.0'
implementation 'info.androidhive:imagefilters:1.0.7'
}
应该是implementation 'com.android.support:recyclerview-v7:27.1.1'
。注意区别是有一个分号。