- Error:Plugin with id 'com.github
- Plugin with id 'com.github
- com.github.dcendents.android-mav
- AndroidStudio gradle工程配置问题
- Error: Plugin with id 'com.g
- Error:(4, 0) Plugin with id '
- ERROR: Plugin with id 'io.fabric
- 导入Android时报错Error:Plugin with id
- Day 117/200 PostCSS plugin tailw
- Parsing error: x-invalid-end-tag
导入第三方库的时候出现问题
Error:Plugin with id 'com.github.dcendents.android-maven' not found.
这是原因为该项目的原作者会把项目发布到maven中央仓库中,所以在gradle中添加了相关的maven发布任务。
咱们又不能连到maven的仓库.
解决办法:
将第三方项目中的apply plugin: 'com.android.library'
保留,android{}
,dependencies{}
中的内容保留,其余的直接删除即可.例如我导入的highlight项目:
apply plugin: 'com.android.library'
android {
compileSdkVersion 24
buildToolsVersion '26.0.2'
defaultConfig {
minSdkVersion 10
targetSdkVersion 24
versionCode 15
versionName "1.8.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
signingConfigs{
debug{
storeFile file('debug.keystore')
storePassword "android"
keyAlias "androiddebugkey"
keyPassword "android"
}
}
}
}
//ext {
// bintrayRepo = 'maven'
// bintrayName = 'Highlight'
// publishedGroupId = 'com.isanwenyu.highlight'
// libraryName = 'Highlight'
// artifact = 'highlight'
// libraryDescription = 'One for Android app highlights the directivity function of library'
// siteUrl = 'https://github.com/isanwenyu/Highlight'
// gitUrl = 'https://github.com/isanwenyu/Highlight.git'
// libraryVersion = '1.8.0'
// developerId = 'isanwenyu'
// developerName = 'isanwenyu'
// developerEmail = 'isanwenyu@163.com'
// licenseName = 'The Apache Software License, Version 2.0'
// licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
// allLicenses = ["Apache-2.0"]
//}
//
//apply from: 'https://raw.githubusercontent.com/isanwenyu/BintrayUploadGradle/master/bintray_upload.gradle'
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:support-core-ui:24.2.0'
}
网友评论