之前一直编译成为 debug 版本没有问题,但是切换到 release 版本时候,安卓 4.4 闪退了安卓 8.1 正常运行,求助大佬们
apk 是这个 https://github.com/feilongfl/Cimoc/releases/download/sign10/Cimoc.apk
代码 https://github.com/feilongfl/Cimoc/tree/test-sign
build.gradle
apply plugin: 'com.android.application'
apply plugin: 'org.greenrobot.greendao'
android {
compileSdkVersion 27
buildToolsVersion "27.0.3"
defaultConfig {
applicationId "com.hiroshi.cimoc"
minSdkVersion 15
targetSdkVersion 27
versionCode 1
versionName "1.4.8.8013"
resConfigs "en", "zh"
}
signingConfigs {
release {
storeFile file(".key.jks")
storePassword System.getenv("KEYSTORE_PASS")
keyAlias System.getenv("ALIAS_NAME")
keyPassword System.getenv("ALIAS_PASS")
}
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
shrinkResources true
zipAlignEnabled true
signingConfig signingConfigs.release
}
android.applicationVariants.all { variant ->
variant.outputs.all {
outputFileName = "Cimoc.apk"
}
}
}
}
greendao {
schemaVersion 10
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:support-v13:27.0.2'
compile 'com.android.support:appcompat-v7:27.0.2'
compile 'com.android.support:recyclerview-v7:27.0.2'
compile 'com.android.support:design:27.0.2'
compile 'com.jakewharton:butterknife:8.8.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
compile 'org.greenrobot:greendao:3.2.2'
compile 'com.squareup.okhttp3:okhttp:3.9.1'
compile 'com.facebook.fresco:fresco:1.8.0'
compile 'org.jsoup:jsoup:1.11.2'
compile 'org.adw.library:discrete-seekbar:1.0.1'
compile 'io.reactivex:rxjava:1.2.4'
compile 'io.reactivex:rxandroid:1.2.1'
}
.travis.yml
language: android
android:
components:
- tools
- platform-tools
- build-tools-27.0.3
- android-27
- add-on
- extra
licenses:
- android-sdk-license-.+
before_install:
- yes | sdkmanager "platforms;android-27"
jdk:
- oraclejdk8
before_script:
- chmod +x gradlew
script:
- "./gradlew assembleRelease"
before_cache:
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
cache:
directories:
- "$HOME/.m2"
- "$HOME/.gradle/caches/"
- "$HOME/.gradle/wrapper/"
deploy:
provider: releases
api_key:
secure: [key]
# file: "app/build/outputs/apk/debug/Cimoc.apk"
file: "app/build/outputs/apk/release/Cimoc.apk"
skip_cleanup: true
on:
repo: feilongfl/Cimoc
branch:
- release-tci
- test-sign
tags: true
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.