在一个APP 中导入 严振杰的 ALBUM,出现错误
在网上找了各种,最后在 *上找到这样的说法:
-Go to File->project structure->Project
-Check Android plugin Version and change it to 1.3.(Latest one)
-Go to File->project structure->app->Properties->Build Tools Version
-Change it to latest one(22.0.). Also do this for any other module you have for your project.
-Clean and build project.
我大致明白,可能是因为版本的问题。
我就去查看album的版本:
android = [
applicationId : "com.yanzhenjie.album.sample",
compileSdkVersion: 28,
buildToolsVersion: "28.0.3", minSdkVersion : 14,
targetSdkVersion : 28, versionCode : 27,
versionName : "2.1.3",
]
而我的运行版本呢:
//ext {
// compileSdkVersion = 27
// buildToolsVersion = "27.0.0"
// minSdkVersion = 14
// targetSdkVersion = compileSdkVersion
//
// v4Version = "27.0.1"
//}
被引入的版本高于我的运行版本,直接把我的改成高版本的,如下:
ext {
compileSdkVersion = 28
buildToolsVersion = "28.0.3"
minSdkVersion = 14
targetSdkVersion = 28 v4Version = "27.0.1"
}
然后运行能过!
至此解决了!
说实话,在用android studio的过程中遇到好多坑!都是这样一步步走来的,
回望,真的是步步皆辛苦!