直接上图
解决方法,在APP下的build.gradle下添上如下代码即可
android {
compileSdkVersion 26
buildToolsVersion '26.0.2'
defaultConfig {
applicationId "com.wuyr.catchpiggy"
minSdkVersion 16
targetSdkVersion 26
versionCode 2
versionName "1.1"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
//todo 添加的代码
compileOptions {
targetCompatibility 1.8
sourceCompatibility 1.8
}
}
好啦,添加完之后,点击右上角的Sync Now即可,bug到此就解决完了