Why I get this error I try to clean and rebuild application and make application release true and I get same error
Error:Execution failed for task ':app:lintVitalRelease'. java.lang.IllegalStateException: Expected BEGIN_ARRAY but was STRING at line 1 column 1 path $
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion '26.0.2'
useLibrary 'org.apache.http.legacy'
defaultConfig {
applicationId "x.x.x"
minSdkVersion 15
targetSdkVersion 25
versionCode 95
versionName '5'
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
productFlavors {
}
}
To find out why lint fails do this:
You can do it from Gradle window
For me, it was wrong constraint in ConstraintLayout XML.
Based off this Post
Edit: I removed the link because the thread is no longer there
What you need to do is add this chunk of code to your build.gradle file in the android{} section
lintOptions {
checkReleaseBuilds false
}
So like this
android {
...
lintOptions {
checkReleaseBuilds false
}
}
Update:
Here is another post talking about a similar problem. It seems like there are various reasons this error can occur. While disabling the checkReleaseBuilds will work. It's recommended to find what the problem is and fix it. Most common error seems to be missing translations in the strings.xml
file.
I recommend checking out this post for more help
Error when generate signed apk
The error report is saved to [app module]/build/reports/lint-results-yourBuildName-fatal.html
. You can open this file in a browser to read about the errors.
src: https://stackoverflow.com/a/50239165/365229
lintOptions {
checkReleaseBuilds false
abortOnError false
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With