首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >防伪错误android - oauth.signpost.signature

防伪错误android - oauth.signpost.signature
EN

Stack Overflow用户
提问于 2015-02-17 11:19:07
回答 1查看 588关注 0票数 0

我在构建过程中得到了这个错误。

代码语言:javascript
复制
Warning:oauth.signpost.signature.OAuthMessageSigner: can't find referenced class org.apache.commons.codec.binary.Base64

它是我在项目中使用的libs文件夹中的jar文件。

编辑:这里的是build.gradle文件,但它不包括所有的依赖项。我在libs文件夹里也有一些罐子。

代码语言:javascript
复制
apply plugin: 'com.android.application'
apply plugin: 'robolectric'
apply plugin: 'android'
apply plugin: 'newrelic'

android {
    compileSdkVersion 21
    buildToolsVersion "21.1.2"

    defaultConfig {
        applicationId "com.abc.xyz"
        minSdkVersion 14
        targetSdkVersion 21
        versionCode 54
        versionName "2.002"
        multiDexEnabled true
        testInstrumentationRunner "com.google.android.apps.common.testing.testrunner.GoogleInstrumentationTestRunner"
        resConfigs "en", "fr" , "ar"
    }
    buildTypes {
        release {
            minifyEnabled true
            shrinkResources true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }

        debug {
            minifyEnabled true
            shrinkResources true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }

    sourceSets {
        androidTest {
            setRoot('src/test')
        }
    }

    dexOptions {
        javaMaxHeapSize "4g"
    }

    lintOptions {
        checkReleaseBuilds false
        // Or, if you prefer, you can continue to check for errors in release builds,
        // but continue the build even when errors are found:
        abortOnError false
    }

    repositories{
        maven { url 'https://zendesk.artifactoryonline.com/zendesk/repo' }
    }

    repositories {
        mavenCentral()
    }

    dependencies {
        compile fileTree(dir: 'libs', include: '*.jar')
        compile 'com.android.support:appcompat-v7:21.+'
        compile 'com.github.chrisbanes.photoview:library:1.2.3'
        compile 'com.etsy.android.grid:library:1.0.5'
        compile 'com.facebook.android:facebook-android-sdk:3.21.1'
        compile 'com.google.android.gms:play-services-base:6.5.+'
        compile 'com.google.android.gms:play-services-wallet:6.5.+'
        compile 'com.google.android.gms:play-services-ads:6.5.+'
        compile 'com.google.android.gms:play-services-maps:6.5.+'
        compile 'com.google.android.gms:play-services-drive:6.5.+'
        compile 'com.google.android.gms:play-services-appindexing:6.5.+'
        compile 'com.google.android.gms:play-services-location:6.5.+'
        compile 'com.google.android.gms:play-services-identity:6.5.+'
        compile 'com.google.android.gms:play-services-plus:6.5.+'
        compile 'com.android.support:multidex:1.0.+'
        compile project(':Adjust')
        compile project(':aFileChooser-cbccac1d1cb74a6d57d25c5ded61e4bf4fc40c91')
        compile 'com.parse.bolts:bolts-android:1.+'
        compile 'com.squareup.picasso:picasso:2.4.0'
        compile 'com.android.support:recyclerview-v7:+'
        compile (group: 'com.zendesk', name: 'sdk', version: '1.0.0.1'){
            //    exclude group:'picasso'
        }
        compile 'com.android.support:recyclerview-v7:+'
        compile 'com.newrelic.agent.android:android-agent:4.+'
        compile 'com.fasterxml.jackson.core:jackson-databind:2.4.2'
        compile 'com.fasterxml.jackson.core:jackson-annotations:2.4.2'
        compile 'com.fasterxml.jackson.core:jackson-core:2.4.2'

        androidTestCompile 'org.robolectric:robolectric:2.4'
        androidTestCompile('junit:junit:4.12')
        androidTestCompile('org.mockito:mockito-core:1.10.19')

    }

    packagingOptions {
        exclude 'META-INF/DEPENDENCIES'
        exclude 'META-INF/NOTICE'
        exclude 'META-INF/LICENSE'
        exclude 'META-INF/LICENSE.txt'
        exclude 'META-INF/NOTICE.txt'
        exclude 'META-INF/ASL2.0'
        exclude 'LICENSE.txt'
    }
}



robolectric {
    include '**/*Test.class'
}

更新:我现在能够使用@goonerdroid指定的规则构建项目,但是它在启动时崩溃,为的MainActivity设置了NoClassDefFound错误

EN

回答 1

Stack Overflow用户

发布于 2015-02-17 13:07:28

试试这些规则

代码语言:javascript
复制
-dontwarn org.mortbay.**
-dontwarn org.slf4j.**
-dontwarn org.apache.log4j.**
-dontwarn org.apache.commons.logging.**
-dontwarn org.apache.commons.codec.binary.**
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/28560781

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档