1

Android ZBar 异常仅适用于 Jenkins 构建

你好。我有同样的问题,但这个解决方案对我不起作用。

我的成绩:

应用插件:'com.android.application' 应用插件:'android-apt'

android {
    compileSdkVersion 20
    buildToolsVersion '20.0.0'

    defaultConfig {
        applicationId "pl.myapp"
        minSdkVersion 15
        targetSdkVersion 15
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile 'com.android.support:support-v13:20.0.0'
    compile 'com.android.support:support-v4:20.0.0'
    compile 'com.google.android.gms:play-services:3.1.36'
    compile files('libs/zbar.jar')

    apt fileTree(dir: 'libs', include: ['*.jar'])
    compile project(':realm')
}

和我的 proguard-rules.pro

# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in /Applications/Android Studio.app/sdk/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# For more details, see
#   http://developer.android.com/guide/developing/tools/proguard.html

# Add any project specific keep options here:

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
#   public *;
#}

-keep class net.sourceforge.zbar.** { *; }

感谢帮助。

4

0 回答 0