2017-02-21 29 views
0

アンドロイドスタジオで署名付きapkを生成できません。 - のような投げ込みエラー情報:Gradle tasks [:avakaash:assembleRelease] エラー:java.lang.NullPointerException(エラーメッセージなし) 情報:BUILD FAILEDアンドロイドスタジオで署名付きapkを生成中にNullPointerExceptionが発生しました

デバイスとエミュレータでをデバッグして実行すると、正常に動作します。だから私は署名付きapkを生成することができません。 私のプロジェクトのGradleは次のようになります -

  apply plugin: 'com.android.application' 
android { 
compileSdkVersion 25 
buildToolsVersion '25.0.0' 
useLibrary 'org.apache.http.legacy' 
defaultConfig { 
    applicationId "com.inbridge.avakaash" 
    minSdkVersion 16 
    targetSdkVersion 25 
    multiDexEnabled true 
} 
packagingOptions { 
    exclude 'META-INF/DEPENDENCIES' 
    exclude 'META-INF/NOTICE' 
    exclude 'META-INF/LICENSE' 
    exclude 'META-INF/LICENSE.txt' 
    exclude 'META-INF/NOTICE.txt' 
} 
buildTypes { 
    release { 
     minifyEnabled false 
     shrinkResources false 
     proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
    } 
} 
dexOptions { 
    javaMaxHeapSize "4g" 
} 
} 

dependencies { 

compile fileTree(include: ['*.jar'], dir: 'libs') 
compile project(':library') 
compile files('libs/YouTubeAndroidPlayerApi.jar') 
compile project(':payUMoneysdk') 
compile files('libs/httpclient-win-4.4.1.jar') 
compile files('libs/httpmime-4.2.3.jar') 
compile files('libs/gcm.jar') 
compile files('libs/itextpdf-5.5.9.jar') 
compile files('libs/mail.jar') 
compile files('libs/additionnal.jar') 
compile files('libs/activation.jar') 

compile 'com.android.support:appcompat-v7:25.1.1' 
compile 'com.google.android.gms:play-services:10.0.1' 
compile 'com.google.android.gms:play-services-auth:10.0.1' 
compile 'com.google.android.gms:play-services-analytics:10.0.1' 
compile 'com.google.firebase:firebase-messaging:10.0.1' 
compile 'com.google.firebase:firebase-core:10.0.1' 
compile 'com.google.firebase:firebase-ads:10.0.1' 
compile 'com.google.firebase:firebase-database:10.0.1' 
compile 'com.android.support:multidex:1.0.1' 
compile 'com.mcxiaoke.volley:library:1.0.19' 
compile 'com.github.bumptech.glide:glide:3.7.0' 
compile 'com.facebook.android:facebook-android-sdk:4.6.0' 
compile 'com.android.support:support-v4:25.1.1' 
    } 
    apply plugin: 'com.google.gms.google-services' 

 buildscript { 
repositories { 
    jcenter() 
} 
dependencies { 
    classpath 'com.android.tools.build:gradle:2.2.3' 
    classpath 'com.google.gms:google-services:3.0.0' 
} 
} 


allprojects { 
repositories { 
    jcenter() 
     mavenCentral() 

    } 
    } 

エラー画面like-メインGradleの外観は、私はこの問題を解決するために助けてください enter image description here レポート - enter image description here

とGradleのコンソールを撃ちましたエラー、事前に感謝します。

+0

は、あなたの完全なlogcatを示しました。きれいにして再建する。 'buildToolsVersion '25 .0.1'' –

+1

を使うことができます。例外は明確に言及されています。 [今すぐ同期]をクリックします。完了するまで待ってからビルドします。 – SachinSarawgi

+0

あなたはGradleコンソールで詳細を見ることができます –

答えて

1

私は同じ問題に直面していました。私は変更に続き、うまくいけばそれはあなたのために役立ちます。あなたのものとgradleを比較してください。

は、プラグインを適用します。 アンドロイド{ compileSdkVersionの 'Google Inc.:GoogleのAPI:23' 'com.android.application' buildToolsVersion "23.0.2は、"

defaultConfig { 
     applicationId "com.inbridge.avakaash" 
     minSdkVersion 17 
     targetSdkVersion 23 
     versionCode 1 
     versionName "1.0" 
     multiDexEnabled true 
     ndk { 
      abiFilter "armeabi-v7a" 
     } 

    } 
    packagingOptions { 
     exclude 'META-INF/DEPENDENCIES.txt' 
     exclude 'META-INF/LICENSE.txt' 
     exclude 'META-INF/NOTICE.txt' 
     exclude 'META-INF/NOTICE' 
     exclude 'META-INF/LICENSE' 
     exclude 'META-INF/DEPENDENCIES' 
     exclude 'META-INF/notice.txt' 
     exclude 'META-INF/license.txt' 
     exclude 'META-INF/dependencies.txt' 
    } 
    configurations { 
     all*.exclude group: 'commons-logging', module: 'commons-logging' 
    } 
    buildTypes { 
     release { 
      minifyEnabled false 
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 

     } 
    } 
    /* 2) Compile for Java 1.8 or greater */ 
    compileOptions { 
     sourceCompatibility JavaVersion.VERSION_1_8 
     targetCompatibility JavaVersion.VERSION_1_8 
    } 
    /* 3) Exclude duplicate licenses */ 
    packagingOptions { 
     exclude 'META-INF/LICENSE.txt' 
     exclude 'META-INF/LICENSE' 
     exclude 'META-INF/NOTICE.txt' 
     exclude 'META-INF/NOTICE' 
     exclude 'META-INF/DEPENDENCIES' 
     pickFirst 'AndroidManifest.xml' 
    } 
    dexOptions { 
     dexInProcess = false 
     incremental true 
     javaMaxHeapSize "4g" 
    } 

} 
repositories { 
    mavenCentral() 
    maven { 
     url 'http://dl.bintray.com/amulyakhare/maven' 
    } 
} 
dependencies { 
    compile fileTree(dir: 'libs', include: ['*.jar']) 
    compile files('libs/volley.jar') 

    /* 4) Add the CSDK framework dependencies (Make sure these version numbers are correct) */ 

    compile 'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1' 
    compile 'com.squareup.picasso:picasso:2.5.2' 
    compile 'com.android.support:appcompat-v7:23.4.0' 
    compile 'com.android.support:support-v13:23.4.0' 
    compile 'com.android.support:support-v4:23.4.0' 
    compile 'com.android.support:cardview-v7:23.4.0' 
    compile 'org.apache.httpcomponents:httpcore:4.4.1' 
    compile 'org.apache.httpcomponents:httpmime:4.3.6' 
    compile 'com.android.support:recyclerview-v7:23.4.0' 
    compile 'com.android.support:design:23.4.0' 
    compile 'uk.co.chrisjenx:calligraphy:2.1.0' 
    compile 'com.google.zxing:core:3.2.0' 
    compile 'com.journeyapps:zxing-android-embedded:[email protected]' 
    compile 'net.gotev:uploadservice:[email protected]' 
    compile 'com.jakewharton:butterknife:7.0.1' 
    compile 'com.google.android.gms:play-services:9.4.0' 
    compile 'com.android.support:multidex:1.0.1' 
    compile 'com.adobe.creativesdk.foundation:auth:0.9.7' 
    compile 'com.adobe.creativesdk:image:4.4.8' 
    compile 'life.knowledge4:k4l-video-trimmer:1.0' 
    testCompile 'junit:junit:4.12' 
    compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha8' 
} 
関連する問題