Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
417394980 opened this issue Jun 27, 2019 · 6 comments
Open

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

417394980 opened this issue Jun 27, 2019 · 6 comments

Comments

@417394980
Copy link

417394980 commented Jun 27, 2019

更改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
Copy link
Author

image
image

@VickersJian
Copy link

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

@yourfriendds
Copy link

兄台高见,给你点个赞!

@417394980
Copy link
Author

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

@shutaozhenzhen
Copy link
Contributor

据我测试,注释掉

apply plugin: 'io.fabric'

debug和release里两个

signingConfig signingConfigs.myConfig

还有

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

应该就可以了

@Quainty
Copy link

Quainty commented Jun 25, 2021

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants