Android 编译出错版本匹配问题解决办法
解决问题的关键在于版本匹配,
compileSdkVersion compileSdkVersion targetSdkVersion
这三个参数的整数值都应该是一样的,这里我全部设置成23,
在这之前我还升级了:appcompat到com.Android.support:appcompat-v7:24.0.0
最终编译成功,剩下的问题都是代码问题了
apply plugin: 'com.android.application' android { compileSdkVersion 23 compileSdkVersion '23.0.3' defaultConfig { applicationId "com.itcast.yeecharge" minSdkVersion 19 targetSdkVersion 23 versionCode 1 versionName "1.0" } sourceSets { main { jniLibs.srcDirs = ['libs'] } } productFlavors { } } dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) testCompile 'junit:junit:4.12' compile 'com.android.support:appcompat-v7:24.0.0' compile files('libs/baidumapapi_base_v4_0_0.jar') compile files('libs/baidumapapi_cloud_v4_0_0.jar') compile files('libs/baidumapapi_map_v4_0_0.jar') compile files('libs/baidumapapi_radar_v4_0_0.jar') compile files('libs/baidumapapi_search_v4_0_0.jar') compile files('libs/baidumapapi_util_v4_0_0.jar') }
如有疑问请留言或者到本站社区交流讨论,感谢阅读,希望能帮助到大家,谢谢大家对本站的支持!