我们做一个天气预报的项目,但是我一开始添加完适配器框架后添加数据源后就立刻出了问题
plugins {
id 'com.android.application'
}
android {
namespace 'com.example.myweather_2110_26_zhaokai'
compileSdk 32
defaultConfig {
applicationId "com.example.myweather_2110_26_zhaokai"
minSdk 27
targetSdk 32
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
}
}
allprojects {
repositories {
maven { url "https://jitpack.io" }
}
}
dependencies {
implementation 'androidx.appcompat:appcompat:1.4.1'
implementation 'com.google.android.material:material:1.5.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
// retrofit网络访问框架
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
//轮播
implementation 'com.youth.banner:banner:2.1.0'
implementation 'org.litepal.guolindev:core:3.2.3'
implementation 'com.github.bumptech.glide:glide:4.12.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.12.0'
//数据适配器框架
implementation 'com.github.CymChad:BaseRecyclerViewAdapterHelper:2.9.30'
}
然后屏蔽掉这一段后
//repositories {
// maven { url "https://jitpack.io" }
就又好了,同时还会报sdk错误,根据谷歌商店要求,必须把sdk升级到32,哭了,嘎嘎出问题