0
我无法在android studio中生成签名的apk。它的投掷错误,如 - 信息:Gradle任务[:avakaash:assembleRelease] 错误:java.lang.NullPointerException(无错误消息) 信息:BUILD FAILED。NullPointerException异常生成签署的apk在Android工作室
其在设备和仿真器上调试并运行应用时工作正常。所以我无法生成签名的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'
和主要看的gradle喜欢 -
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()
}
}
和gradle这个控制台报告 - 请帮我解决这个错误,提前谢谢。
显示完整的logcat的。清洁和重建。你可以使用'buildToolsVersion'25.0.1'' –
例外情况明确提到。点击立即同步等到它完成然后建立。 – SachinSarawgi
你可以在Gradle控制台中看到更多详细信息 –