我正在尝试将我的android应用程序升级为最新的Gradle版本,并想迁移android x,但是我面临的问题是,它始终向我显示此错误消息“未指定compileSdkVersion。请添加到build.gradle中模块:folioreader“。甚至我也尝试在filoreader的Gradle文件中手动添加Assign compileSdkVersion。
apply plugin: 'com.android.library'
apply from: '../config/quality/quality.gradle'
`enter code here`//apply plugin: 'com.github.dcendents.android-maven'
ext {
bintrayRepo = 'maven'
bintrayName = 'folioreader'
publishedGroupId = 'com.folioreader'
libraryName = 'FolioReader'
artifact = 'folioreader'
libraryDescription = 'An epub reader for Android'
siteUrl = 'https://github.com/MobilionOSS/FolioReader-Android-M'
gitUrl = 'https://github.com/MobilionOSS/FolioReader-Android-M.git'
libraryVersion = '0.3.8.2'
developerId = 'mobisystech'
developerName = 'Folio Reader'
developerEmail = 'mahavir@codetoart.com'
licenseName = 'FreeBSD License'
licenseUrl = 'https://en.wikipedia.org/wiki/FreeBSD_Documentation_License#License'
allLicenses = ["FreeBSD"]
}
android {
useLibrary 'org.apache.http.legacy'
compileSdkVersion Integer.parseInt(project.ANDROID_TARGET_SDK_VERSION)
// buildToolsVersion project.ANDROID_BUILD_TOOLS_VERSION
defaultConfig {
versionCode Integer.parseInt(project.VERSION_CODE)
versionName project.VERSION_NAME
minSdkVersion Integer.parseInt(project.ANDROID_MIN_SDK)
targetSdkVersion Integer.parseInt(project.ANDROID_TARGET_SDK_VERSION)
}
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src/main/java']
res.srcDirs = ['res']
}
test {
java.srcDirs = ['src/test/java']
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
packagingOptions {
exclude 'META-INF/ASL2.0'
exclude 'META-INF/DEPENDENCIES.txt'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/notice.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/dependencies.txt'
exclude 'META-INF/LGPL2.1'
exclude 'META-INF/services/javax.annotation.processing.Processor'
}
lintOptions {
abortOnError false
}
checkstyle {
ignoreFailures = true
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation project(':webViewMarker')
final ANDROID_LIB_VERSION = '28.0.0'
//noinspection GradleDependency
implementation "com.android.support:appcompat-v7:$ANDROID_LIB_VERSION"
implementation "com.android.support:recyclerview-v7:$ANDROID_LIB_VERSION"
implementation "com.android.support:support-v4:$ANDROID_LIB_VERSION"
implementation "com.android.support:design:$ANDROID_LIB_VERSION"
implementation 'com.daimajia.swipelayout:library:1.2.0@aar'
// r2-streamer
final R2_STREAMER_VERSION = '0.1.4'
implementation "org.readium:r2-fetcher:$R2_STREAMER_VERSION"
implementation "org.readium:r2-parser:$R2_STREAMER_VERSION"
implementation "org.readium:r2-server:$R2_STREAMER_VERSION"
implementation 'org.greenrobot:eventbus:3.1.1'
}
/*apply from: '../folioreader/bintray/installv1.gradle'
apply from: '../folioreader/bintray/bintrayv1.gradle'*/