java.lang.NullPointerException(无错误消息)APK构建 [英] java.lang.NullPointerException (no error message) APK building
本文介绍了java.lang.NullPointerException(无错误消息)APK构建的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
//顶级构建文件,您可以在其中添加对所有子项目/模块通用的配置选项。
buildscript {
repositories {
maven {
urlhttps://plugins.gradle.org/m2/
}
jcenter()
}
依赖关系{
classpathgradle.plugin.me.tatarka:gradle-retrolambda:3.3.0
classpath'com.android.tools.build: gradle:2.2.1'
}
}
allprojects {
repositories {
jcenter()
mavenCentral()
}
}
任务清理(类型:删除){
删除rootProject.buildDir
}
:app文件
apply plugin:'me.tatarka.retrolambda'
apply plugin:'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion24.0.3
compileOptions {
sourceCompatibility JavaVersion .VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
defaultConfig {
a pplicationIdit.univpm.gruppoids.iotforemergencyandnavigation
minSdkVersion 16
targetSdkVersion 23
versionCode 1
versionName1.0
jackOptions {
启用true
$ b buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile(' 'proguard-android.txt'),'proguard-rules.pro'
}
}
}
依赖项{
编译fileTree(包括:['* .jar '],dir:'libs')
testCompile'junit:junit:4.12'
compile'com.android.support:appcompat-v7:23.4.0'
compile'com.android .support:design:23.4.0'
compile'com.android.support:support-v4:23.4.0'
compile'com.journeyapps:zxing-android-embedded:3.2.0@aar '
compile'com.google.zxing:core:3.2.1'
compile'org.jgrapht:jgrapht-core:1.0.0 '
}
当我尝试构建APK时,它显示我:错误:发生了问题配置项目':app'。
$ b
java.lang.NullPointerException(无错误消息)
版本有问题吗?或与lamdas?有人可以帮我吗?
解决方案
将此添加到您的应用模块的 build.gradle 文件中:
lintOptions {
checkReleaseBuilds false
}
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
jcenter()
}
dependencies {
classpath "gradle.plugin.me.tatarka:gradle-retrolambda:3.3.0"
classpath 'com.android.tools.build:gradle:2.2.1'
}
}
allprojects {
repositories {
jcenter()
mavenCentral()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
The :app file
apply plugin: 'me.tatarka.retrolambda'
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "24.0.3"
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
defaultConfig {
applicationId "it.univpm.gruppoids.iotforemergencyandnavigation"
minSdkVersion 16
targetSdkVersion 23
versionCode 1
versionName "1.0"
jackOptions {
enabled true
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.android.support:design:23.4.0'
compile 'com.android.support:support-v4:23.4.0'
compile 'com.journeyapps:zxing-android-embedded:3.2.0@aar'
compile 'com.google.zxing:core:3.2.1'
compile 'org.jgrapht:jgrapht-core:1.0.0'
}
When i try to build APK it shows me: Error:A problem occurred configuring project ':app'.
java.lang.NullPointerException (no error message)
Is it a problem with versions? or with lamdas?? someone can help me?
解决方案
Add this to your app module's build.gradle file:
lintOptions {
checkReleaseBuilds false
}
这篇关于java.lang.NullPointerException(无错误消息)APK构建的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文