gedoor / MyBookshelf

阅读是一款可以自定义来源阅读网络内容的工具,为广大网络文学爱好者提供一种方便、快捷舒适的试读体验。
https://gedoor.github.io
GNU General Public License v3.0
7.56k stars 1.81k forks source link

更改app/build.gradle文件后编译成功 #314

Open 417394980 opened 5 years ago

417394980 commented 5 years ago

更改app/build.gradle文件,代码如下 (以此记录帮助后人,也感谢作者提供那么好的开源阅读APP) (目前想自己合成百度语音功能,现在的朗读体验不太好)

apply plugin: 'com.android.application' apply plugin: 'kotlin-android-extensions' apply plugin: 'kotlin-android' apply plugin: 'org.greenrobot.greendao' // apply plugin: 'io.fabric'

static def releaseTime() { return new Date().format("yy.MMddHH", TimeZone.getTimeZone("GMT+8")) }

def name = "YueDu" def version = "2." + releaseTime() def gitCommits = Integer.parseInt('git rev-list --count HEAD'.execute([], project.rootDir).text.trim())

android { compileSdkVersion 28 buildToolsVersion '28.0.3'

defaultConfig {
    applicationId "com.gedoor.monkeybook"
    minSdkVersion 19
    targetSdkVersion 28
    versionCode 10000 + gitCommits
    versionName version
    project.ext.set("archivesBaseName", name + "_" + version)
    multiDexEnabled true

}

lintOptions {
    abortOnError false
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
    }
}
compileOptions {
    targetCompatibility 1.8
    sourceCompatibility 1.8
}

}

dependencies { testImplementation 'junit:junit:4.13-beta-3' implementation fileTree(dir: 'libs', include: ['*.jar']) implementation project(':basemvplib')

api 'androidx.core:core-ktx:1.2.0-alpha02'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"

//anko
def anko_version = '0.10.8'
implementation "org.jetbrains.anko:anko-sdk27:$anko_version"
implementation "org.jetbrains.anko:anko-sdk27-listeners:$anko_version"

//fireBase
implementation 'com.google.firebase:firebase-core:17.0.0'
implementation 'com.crashlytics.sdk.android:crashlytics:2.10.1'

//androidX
implementation 'androidx.multidex:multidex:2.0.1'
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta2'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.media:media:1.1.0-rc01'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'

//google
implementation 'com.google.android.material:material:1.1.0-alpha07'
implementation 'com.google.code.gson:gson:2.8.5'
implementation 'com.google.android:flexbox:1.1.0'

//J_SOUP
implementation 'org.jsoup:jsoup:1.12.1'
implementation 'cn.wanghaomiao:JsoupXpath:2.3.2'
implementation 'com.jayway.jsonpath:json-path:2.4.0'

//JS
implementation 'com.github.gedoor:rhino-android:1.3'

//GreenDao
implementation 'org.greenrobot:greendao:3.2.2'
implementation 'com.github.yuweiguocn:GreenDaoUpgradeHelper:v2.1.0'

//Glide
implementation 'com.github.bumptech.glide:glide:4.9.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.9.0'

//CircleImageView
implementation 'de.hdodenhof:circleimageview:3.0.0'

//bind view
implementation 'com.jakewharton:butterknife:10.1.0'
annotationProcessor 'com.jakewharton:butterknife-compiler:10.1.0'

//webServer
implementation 'org.nanohttpd:nanohttpd:2.3.1'
implementation 'org.nanohttpd:nanohttpd-websocket:2.3.1'

//二维码
implementation 'cn.bingoogolapple:bga-qrcode-zxing:1.3.6'

//颜色选择
implementation 'com.jaredrummler:colorpicker:1.1.0'

//简繁转换
implementation 'com.luhuiguo:chinese-utils:1.0'

//字符串比较
implementation 'net.ricecode:string-similarity:1.0.0'

//MarkDown
implementation 'ru.noties.markwon:core:3.0.2'

//epub
implementation('nl.siegmann.epublib:epublib-core:3.1') {
    exclude group: 'org.slf4j'
    exclude group: 'xmlpull'
}

}

greendao { schemaVersion 63 daoPackage 'com.kunfei.bookshelf.dao' targetGenDir 'src/main/java' }

// apply plugin: 'com.google.gms.google-services' repositories { mavenCentral() }

417394980 commented 5 years ago

image image

VickersJian commented 5 years ago

十分感谢,弄了好久,之前一直卡在Crashlytics found an invalid API key: null,现在终于能编译了

yourfriendds commented 5 years ago

兄台高见,给你点个赞!

417394980 commented 5 years ago

自己集成的百度语音版阅读,大家可以测试一下 链接:https://pan.baidu.com/s/1pXEjC7AEMDDwscinqpxQDg 密码:z2sp 已改签名,不会覆盖原包,方便大家测试

shutaozhenzhen commented 4 years ago

据我测试,注释掉

apply plugin: 'io.fabric'

debug和release里两个

signingConfig signingConfigs.myConfig

还有

apply plugin: 'com.google.gms.google-services'

应该就可以了

Quainty commented 3 years ago

自己集成的百度语音版阅读,大家可以测试一下 链接:https://pan.baidu.com/s/1pXEjC7AEMDDwscinqpxQDg 密码:z2sp 已改签名,不会覆盖原包,方便大家测试

大侠用的是哪个版本的环境编译成功的?APK试用了,效果非常好。很喜欢这个语音效果,能否分享一下代码?18519119983@163.com,多谢!