android - android编译器错误,文件中没有错误
问题描述
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.example.oneca.myapplication"
minSdkVersion 22
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}}dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
implementation files('libs/mysql-connector-java-8.0.11.jar')}
这是 build.gradle 中的数据。java文件中没有语法错误。怎么了。
解决方案
更新您的minSdkVersion。
minSdkVersion 24
因为你的 lib实现文件('libs/mysql-connector-java-8.0.11.jar')}
不支持低于 SdkVersion 24。
推荐阅读
- mysql - MySQL导入和替换满足多个条件的单个列
- android - 如何从代码(Java/Kotlin)文件中更改可绘制背景颜色
- powershell - 用于替换名称的 Powershell 脚本
- singularity-container - 具有相对路径的奇点定义文件
- swift - 无法使用 coreML 对手绘图像进行分类
- python - 目录和 python 字典
- python - 如何从 tkinter 获取条目的值
- nginx - 如果不是来自特定 IP,Nginx 如何阻止空用户代理
- javascript - 在jquery中查找前一个元素
- javascript - SCRIPT1003:IE 11 + angular 7 + vendor.js 中的预期':'