Failed to read PNG signature: file does not start with PNG signature - android

Gradle build failing with this error:
Error:C:\Users\Roman\.gradle\caches\transforms-1\files-1.1\appcompat-v7-26.0.2.aar\bab547c3f1b8061ef9426f524a823a15\res\drawable-xhdpi-v4\abc_btn_switch_to_on_mtrl_00001.9.png failed to read PNG signature: file does not start with PNG signature
Error:java.lang.RuntimeException: java.lang.RuntimeException: com.android.builder.internal.aapt.AaptException: AAPT2 compile failed:
Error:Execution failed for task ':app:mergeDebugResources'.
Error: java.lang.RuntimeException: java.lang.RuntimeException: com.android.builder.internal.aapt.AaptException: AAPT2 compile failed:
aapt2 compile --legacy -o C:\dev\workspace\android2\MatrixCalculator\app\build\intermediates\res\merged\debug C:\Users\Roman\.gradle\caches\transforms-1\files-1.1\appcompat-v7-26.0.2.aar\bab547c3f1b8061ef9426f524a823a15\res\drawable-xhdpi-v4\abc_btn_switch_to_on_mtrl_00001.9.png
Issues:
- ERROR: C:\Users\Roman\.gradle\caches\transforms-1\files-1.1\appcompat-v7-26.0.2.aar\bab547c3f1b8061ef9426f524a823a15\res\drawable-xhdpi-v4\abc_btn_switch_to_on_mtrl_00001.9.png failed to read PNG signature: file does not start with PNG signature
Some basic things i've tried to solve this issue:
Invalidate caches/restart
Deleting gradle folder

It's likely a JPG renamed to a PNG file, not an actual PNG file
The problem could be because of the wrong extension of images.
In my case, the file was a JPEG image but it was saved as PNG not converted to. In this situation change extension to the real one and convert to PNG then retry.
For instance, you have ic_logo.png but it's actually a JPG image.
You should rename it back to ic_logo.jpg and use something like Photoshop to convert the image to PNG format.

android {
buildTypes {
release {
crunchPngs false // or true
}
}
}
buildTypes {
debug {
signingConfig signingConfigs.debug
}
release {
crunchPngs false // or true
lintOptions {
checkReleaseBuilds false
abortOnError false
}
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}

Steps
In build.gradle
aaptOptions {
cruncherEnabled = false
}
Delete content inside C:\Users\.gradle\caches (or ~/.gradle/caches for Mac and Linux)
Restart Android Studio

Failed to read PNG signature - Just put 1 line in your build.gradle
buildTypes {
release {
minifyEnabled true
shrinkResources true
crunchPngs false // Paste this line
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}

Creating the .apk of an application all the resources are analyzed, if some resource has an incorrect format or is corrup you will get the message:
.png failed to read PNG signature: file does not start with PNG
signature
Be sure to have the correct resources, you can check it by opening your file.

This occurs due to the incorrect extension given to the image. For example, the image is jpg and the extension given is png.
Solutions:
Add { cruncherEnabled = false } in build.gradle
Convert the image into png rather than just changing the extension.

I had the same issue, solved by converting the images to webP from Android studio
right-click on the image -> tap on Convert to WebP
the conversion will handle file formating and also reduce the size of the PNG

This is a result of wrong file type indeed and can be fixed by saving the files in correct format.
I ran into this issue with PhoneGap Build and wanted to leave my 2 cents for any other PhoneGap / Cordova user who might also run into this.
My problem was that I upgraded my old PhoneGap 6.x to 8.0 and it seems behaviour of the default splash has changed. It used to require jpg as a default splash, but on 8.0 it results in this error on production builds.
This worked before:
<splash src="www/splash.jpg" />
Now you have 2 options. Replace the default splash with png like this:
<splash src="www/res/screen/android/screen-xhdpi-portrait.png" />
Other option is to remove default splash entirely.

For a quick fix ,Make shrinkResources to false instead of true in app.gradle
Hope this will help.
if Not then also add this aaptOptions { cruncherEnabled = false }

i have same error for slow i do some step:
open abc_btn_switch_to_on_mtrl_00001.9.png (Image)file in paint
now select png and save as and re-save in drawable and overweight in with old images and its work

If you don't have any transparent pixels, then renaming the file to .jpg worked for me.

You might have used a JPEG file or some other image file format.
Use PNG images to solve the error.
Drawable directory can only have png type of images.

If you are using an online platform to generate App Icon(launcher_icon), then use PNG Format or First convert JPEG to PNG and then used APP ICON GENERATOR

In my case also there was a jpg file instead of png, so I changed my extension and solve my problem.

Open [Root_project]/app/build.gradle and add following lines.
release {
...
crunchPngs false // or true
lintOptions {
checkReleaseBuilds false
abortOnError false
}
...
}

if you are facing this issue in Flutter while buildings apk then add crunchPngs false
android {
buildTypes {
release {
...
crunchPngs false
}
}
into android/app/build.gradle

I'm not sure if it's a valid solution, but deleting only the file mentioned in the error message helped. While deleting the folder, containing it didn't.

I've had the same issue. To solve it just restart your Android Studio and build the gradle file again.

You can add code in node_modules/react-native/react.gradle. After doFirst
doLast {
def moveFunc = { resSuffix ->
File originalDir = file("$buildDir/generated/res/react/release/${resSuffix}");
if (originalDir.exists()) {
File destDir = file("$buildDir/../src/main/res/${resSuffix}");
ant.move(file: originalDir, tofile: destDir);
}
}
moveFunc.curry("drawable-ldpi").call()
moveFunc.curry("drawable-mdpi").call()
moveFunc.curry("drawable-hdpi").call()
moveFunc.curry("drawable-xhdpi").call()
moveFunc.curry("drawable-xxhdpi").call()
moveFunc.curry("drawable-xxxhdpi").call()
moveFunc.curry("raw").call()
}
check it if it not fix issue after remove drawable folder
github enter link description here

I was able to fix it permanently.
I created a new blank expo project, then I added a new app icon (correct png format), then I ejected from expo.
I then copied the mipmap-* folders from the blank project to my real project. It all worked perfectly.

I was getting the same error when signing APK.
This solution fixed the problem:
build.gradle(:app):
...
aaptOptions {
cruncherEnabled = false
}
...
You can check for more: https://developer.android.com/studio/build/optimize-your-build

You can open the images with windows win10 'Paint',
then you can save as .png and overrite it,
It will solve the problem

Related

Error In Build APK Flutter using Android Studios [duplicate]

Gradle build failing with this error:
Error:C:\Users\Roman\.gradle\caches\transforms-1\files-1.1\appcompat-v7-26.0.2.aar\bab547c3f1b8061ef9426f524a823a15\res\drawable-xhdpi-v4\abc_btn_switch_to_on_mtrl_00001.9.png failed to read PNG signature: file does not start with PNG signature
Error:java.lang.RuntimeException: java.lang.RuntimeException: com.android.builder.internal.aapt.AaptException: AAPT2 compile failed:
Error:Execution failed for task ':app:mergeDebugResources'.
Error: java.lang.RuntimeException: java.lang.RuntimeException: com.android.builder.internal.aapt.AaptException: AAPT2 compile failed:
aapt2 compile --legacy -o C:\dev\workspace\android2\MatrixCalculator\app\build\intermediates\res\merged\debug C:\Users\Roman\.gradle\caches\transforms-1\files-1.1\appcompat-v7-26.0.2.aar\bab547c3f1b8061ef9426f524a823a15\res\drawable-xhdpi-v4\abc_btn_switch_to_on_mtrl_00001.9.png
Issues:
- ERROR: C:\Users\Roman\.gradle\caches\transforms-1\files-1.1\appcompat-v7-26.0.2.aar\bab547c3f1b8061ef9426f524a823a15\res\drawable-xhdpi-v4\abc_btn_switch_to_on_mtrl_00001.9.png failed to read PNG signature: file does not start with PNG signature
Some basic things i've tried to solve this issue:
Invalidate caches/restart
Deleting gradle folder
It's likely a JPG renamed to a PNG file, not an actual PNG file
The problem could be because of the wrong extension of images.
In my case, the file was a JPEG image but it was saved as PNG not converted to. In this situation change extension to the real one and convert to PNG then retry.
For instance, you have ic_logo.png but it's actually a JPG image.
You should rename it back to ic_logo.jpg and use something like Photoshop to convert the image to PNG format.
android {
buildTypes {
release {
crunchPngs false // or true
}
}
}
buildTypes {
debug {
signingConfig signingConfigs.debug
}
release {
crunchPngs false // or true
lintOptions {
checkReleaseBuilds false
abortOnError false
}
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
Steps
In build.gradle
aaptOptions {
cruncherEnabled = false
}
Delete content inside C:\Users\.gradle\caches (or ~/.gradle/caches for Mac and Linux)
Restart Android Studio
Failed to read PNG signature - Just put 1 line in your build.gradle
buildTypes {
release {
minifyEnabled true
shrinkResources true
crunchPngs false // Paste this line
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
Creating the .apk of an application all the resources are analyzed, if some resource has an incorrect format or is corrup you will get the message:
.png failed to read PNG signature: file does not start with PNG
signature
Be sure to have the correct resources, you can check it by opening your file.
This occurs due to the incorrect extension given to the image. For example, the image is jpg and the extension given is png.
Solutions:
Add { cruncherEnabled = false } in build.gradle
Convert the image into png rather than just changing the extension.
I had the same issue, solved by converting the images to webP from Android studio
right-click on the image -> tap on Convert to WebP
the conversion will handle file formating and also reduce the size of the PNG
This is a result of wrong file type indeed and can be fixed by saving the files in correct format.
I ran into this issue with PhoneGap Build and wanted to leave my 2 cents for any other PhoneGap / Cordova user who might also run into this.
My problem was that I upgraded my old PhoneGap 6.x to 8.0 and it seems behaviour of the default splash has changed. It used to require jpg as a default splash, but on 8.0 it results in this error on production builds.
This worked before:
<splash src="www/splash.jpg" />
Now you have 2 options. Replace the default splash with png like this:
<splash src="www/res/screen/android/screen-xhdpi-portrait.png" />
Other option is to remove default splash entirely.
For a quick fix ,Make shrinkResources to false instead of true in app.gradle
Hope this will help.
if Not then also add this aaptOptions { cruncherEnabled = false }
i have same error for slow i do some step:
open abc_btn_switch_to_on_mtrl_00001.9.png (Image)file in paint
now select png and save as and re-save in drawable and overweight in with old images and its work
If you don't have any transparent pixels, then renaming the file to .jpg worked for me.
You might have used a JPEG file or some other image file format.
Use PNG images to solve the error.
Drawable directory can only have png type of images.
If you are using an online platform to generate App Icon(launcher_icon), then use PNG Format or First convert JPEG to PNG and then used APP ICON GENERATOR
In my case also there was a jpg file instead of png, so I changed my extension and solve my problem.
Open [Root_project]/app/build.gradle and add following lines.
release {
...
crunchPngs false // or true
lintOptions {
checkReleaseBuilds false
abortOnError false
}
...
}
if you are facing this issue in Flutter while buildings apk then add crunchPngs false
android {
buildTypes {
release {
...
crunchPngs false
}
}
into android/app/build.gradle
I'm not sure if it's a valid solution, but deleting only the file mentioned in the error message helped. While deleting the folder, containing it didn't.
I've had the same issue. To solve it just restart your Android Studio and build the gradle file again.
You can add code in node_modules/react-native/react.gradle. After doFirst
doLast {
def moveFunc = { resSuffix ->
File originalDir = file("$buildDir/generated/res/react/release/${resSuffix}");
if (originalDir.exists()) {
File destDir = file("$buildDir/../src/main/res/${resSuffix}");
ant.move(file: originalDir, tofile: destDir);
}
}
moveFunc.curry("drawable-ldpi").call()
moveFunc.curry("drawable-mdpi").call()
moveFunc.curry("drawable-hdpi").call()
moveFunc.curry("drawable-xhdpi").call()
moveFunc.curry("drawable-xxhdpi").call()
moveFunc.curry("drawable-xxxhdpi").call()
moveFunc.curry("raw").call()
}
check it if it not fix issue after remove drawable folder
github enter link description here
I was able to fix it permanently.
I created a new blank expo project, then I added a new app icon (correct png format), then I ejected from expo.
I then copied the mipmap-* folders from the blank project to my real project. It all worked perfectly.
I was getting the same error when signing APK.
This solution fixed the problem:
build.gradle(:app):
...
aaptOptions {
cruncherEnabled = false
}
...
You can check for more: https://developer.android.com/studio/build/optimize-your-build
You can open the images with windows win10 'Paint',
then you can save as .png and overrite it,
It will solve the problem

Failed to Generate Signed Apk - An organization slug is required (provide with --org)

After setting up the Sentry.io error tracking I get this error when I try to Generate Signed Apk:
Java Compiler
error: An organization slug is required (provide with --org)
Click on this image and open it to see more details:
I cannot understand anything from this one:
Process 'command
'/var/folders/j4/_fzm1rks3tsc2h3j4l2qbq4w0000gn/T/.sentry-cli1369818638611304938.exe'
' finished with non-zero exit value 1
This is the file address that was raised in error:
How can I solve this problem and Generate Signed Apk?
The docs are not a bit clear, though its mentioned but easy to miss it. There are two different sentry.properties required here.
Please note the sentry.properties in your project root that configures sentry-cli is different than the one you include in your application resources to configure the Sentry SDK at runtime (as seen in the configuration documentation).
You need to have another sentry.properties file in the project root with
defaults.project=your-project
defaults.org=your-org
auth.token=YOUR_AUTH_TOKEN
and the runtime sentry.properties with DSN values, etc can be placed in app/src/main/resources directory(create resource directory if required)
Config Docs
You need to upload the Proguard mapping file to the sentry server.
create a file in the root project folder and set name sentry.properties.
defaults.url=https://sentry.io
defaults.org=TEST
defaults.project=TEST_DEV
auth.token=TOKEN
replace TEST, TEST_DEV, and TOKEN.
you can get TOKEN from https://sentry.io/api
if you are use custom sentry server, replace https://sentry.io to your server adddress.
and change file build.gradle
buildscript {
dependencies {
classpath 'com.android.tools.build:gradle:3.5.2'
classpath 'io.sentry:sentry-android-gradle-plugin:1.7.27'
}
}
and
apply plugin: 'com.android.application'
apply plugin: 'io.sentry.android.gradle'
...
sentry {
autoProguardConfig true
autoUpload true
}
android {
...
}
dependencies {
...
implementation 'io.sentry:sentry-android:1.7.27'
implementation 'org.slf4j:slf4j-nop:1.7.25'
...
}
When you enable Proguard minification, symbols are uploaded to Sentry.
This upload is done via the sentry-cli, which is throwing the error. The error says the CLI doesn't know which project within Sentry to associate your symbols with.
You need to make sure to go through the gradle integration in the docs.
Specifically:
defaults.project=airflow
defaults.org=sentry
auth.token=YOUR_AUTH_TOKEN
Alternatively you can use sentry-cli directly to upload symbols, although the gradle integration is advised.
For ReactNative/iOS, if you have such errors check that you put sentry.properties file in iOS folder
I also stranded here whilst trying to figure what was going wrong with my sentry source map uploads (not on android, but for web with a similar error). To debug my events that weren't matched, I was using the sentry-cli like so;
So I was searching how I could add the organization slug to my source map uploads. But this error wasn't about the event, but for using the explain CLI functionality itself!!! Which confused me.
I had to pass additional parameters to the CLI script to get the actual problem with the event;
Maybe this will help someone else who also skipped over the docs πŸ˜…
instead of making
minifyEnabled false
Just add these rules to proguard rules file and keep minifyEnabled true
#sentry
-keepattributes LineNumberTable,SourceFile
-dontwarn org.slf4j.**
-dontwarn javax.**
-keep class io.sentry.event.Event { *; }
That solved my issue without disabling minification
IT IS NOT A REAL ANSWER But it can solve our problem in the short term by setting false value to minifyEnabled.
app/build.gradle:
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
but it added 1.3MB to the size my of Apk file.
Please let me know if anyone has a different better solution.

Reducing the size of final APK before submitting to the play store

My android application file size is huge, I've used Proguard and ImageOptim to reduce the size of images and code which isn't being used.
This is the buildtypes in my gradle:
buildTypes {
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
I will also delete the mockable-android-jar before submitting.
I have also seen that the intermediates folder is big in size, I also cleaned it by deleting the extra png images which were not being used by the application (i.e: g+ png's and so on.)
What can I do which may help me shrink down this apk.
Edit: Made the following edits, which resulted intermediates to become 12.5 MB
android {
defaultConfig {
...
resConfigs "en"
}
Removes resources which are not meant for the english language.
Extract your apk and check which folder is bigger in size.
Or you can use "Android Studio" Also to analyze your apk file :
Reduce your image files size and use vector drawables wherever possible.
Go through the following guides on apk size reduce :
https://medium.com/google-developers/smallerapk-part-1-anatomy-of-an-apk-da83c25e7003#.nlid8yvdb
https://medium.com/google-developers/smallerapk-part-2-minifying-code-554560d2ed40#.bayyfe7zd
https://medium.com/google-developers/smallerapk-part-3-removing-unused-resources-1511f9e3f761#.igywlhtem
https://medium.com/#wkalicinski/smallerapk-part-4-multi-apk-through-abi-and-density-splits-477083989006#.9fgm8mryi
https://medium.com/#wkalicinski/smallerapk-part-5-multi-apk-through-product-flavors-e069759f19cd#.ngg4dfe8i
https://medium.com/#wkalicinski/smallerapk-part-6-image-optimization-zopfli-webp-4c462955647d#.elxsq9tcc
https://medium.com/#wkalicinski/smallerapk-part-7-image-optimization-shape-and-vectordrawables-ed6be3dca3f#.m0p9rrl4t
https://medium.com/#wkalicinski/smallerapk-part-8-native-libraries-open-from-apk-fc22713861ff#.mcytfj9y3

Reduce apk size android

I am facing a problem with app size in android.
The scenario is,
I developed my android app in Android Studio 2.0 and the size of apk was 23 MB.
After that, I upgraded my IDE to android studio 2.2 and with little code modification the size of apk boosted to 51 MB.
I tried with prorogued and Lint but no advantage.
Can Someone help me to tackle the issue.
1) Replace all of Images,Icons with vector drawable
2) Turn on pro guard like following
goto build.gradleapp level
and put these lines
**shrinkResources true
minifyEnabled true**
3) Remove unused classes,drawable and methods and strings
and use LINT's private method analyser which reduces method count
JAVA's Hidden cost
4) In android studio 2.2 and above they have added apk analyser tool in Build menu. Use that to analyse APk
5) if app size goes beyond 100mb use feature called split apk.
there are two methods of spliting apk
ABI and Density Splits
Do this changes in your build.gradle(Module:app) file. It decreases the apk size almost (40-50)%.
android {
// Other settings
buildTypes {
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
It reduces the size of classes.dex files and res folder.
It is recommended to that you should use webp file format instead of BMP, JPG, PNG for better compression.
For reference, you can use: https://developer.android.com/studio/write/convert-webp.html
For more details on apk compression you can refer:
https://developer.android.com/topic/performance/reduce-apk-size.html
https://medium.com/how-you-can-decrease-application-size
Points to reduce APK size:
Make sure to do it
1. Use vector drawable
2. Use xml drawable to create simple view
3. Rotate images using xml drawable to reuse (eg. in case of arrow buttons)
4. Create drawable through code
5. Use aaptOptions { cruncherEnabled = false } to compress images
6. Use webP format for large images
7. Avoid enumerations and use #IntDef annotation
8. Use shrinkResources true in gradle to remove unused resources
9. Use resConfig β€œen” in gradle to remove other localization
android {
// Other settings
buildTypes {
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
shrinkResources true will not include the images from resources which your using in the final apk
hope this will help you!

How to sign APK on Android Studio even with non-translated strings?

Background
I've recently migrated my app to Android-Studio. I had some issues doing so, but I got over them eventually.
The problem
For some reason, on Android Studio, when I try to sign an APK, I get a lot of errors that look like this:
Error:(16) Error: "..." is not translated in "de" (German), "el" (Greek), "iw" (Hebrew) [MissingTranslation]
(where "..." is a string)
At the bottom, after a lot of errors of this kind, I see this:
Error:Execution failed for task ':app:lintVitalRelease'.
> Lint found fatal errors while assembling a release target.
To proceed, either fix the issues identified by lint, or modify your build script as follows:
...
android {
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
}
}
...
The question
I'm not sure what's wrong and how I can fix it. On Eclipse I did it very easily. Missing translations shouldn't stop me from signing an APK...
To me it seems as if Lint is preventing the exporting of the APK, and that the reason is that I didn't translate all of the strings. Is that true?
Can anyone please help me? How can I fix this, so that Lint will show me just warnings instead? or a confirmation dialog if I'm sure I want to do it?
The cleanest way to solve the problem is to disable Lint checks of missing translations for release builds only.
To do so add "disable 'MissingTranslation'" to your build.gradle file as shown below:
android {
buildTypes {
release {
lintOptions {
disable 'MissingTranslation'
}
}
}
}
To me it seems as if Lint is preventing the exporting of the APK, and
that the reason is that I didn't translate all of the strings. Is that
true?
Yes. Default option is lintOptions.abortOnError = true
Can anyone please help me?
You should open the build.gradle file located at the main project module, or the generic folder if you do not have a module. Then add the suggested lines:
android {
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
}
}
Some Lint warnings are by default turned to studio as errors, I don't actually know why, but in terms of translations I guess that is a way to "stop" you publishing an app that the translation is incomplete due to a last minute additions of some texts.
With the lintOptions checkReleaseBuilds abortOnError you set the checking of Lint not to run for release versions and also not stopping if an "error" is found. Below I explain where the Lint errors settings can be found, so if you want to go further you can go one step forward and read them one by one. Some of them provide helpful instructions for code optimizations.
How can I fix this, so that Lint will show me just warnings instead?
or a confirmation dialog if I'm sure I want to do it?
There is also an option at the Android Studio settings to change any Lint error to Lint warning, but I never test that. I usually turn to the gradle solution.
The option is located at Settings > Inspections > Android Lint. For easy find open Settings and at the search (located at the top) type Lint translation there you can change the translation options appear at the left from errors to warnings.
An other option if your error strings never going to be translated is to add at your XML string files tools:ignore="MissingTranslation" either at the root item or at each non-translatable string.
Simple way to solve this Error
Just add following Code To do add "disable 'MissingTranslation'" to your build.gradle file as shown below:
...
android {
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
}
}
...
OR You can also Add this:
android {
buildTypes {
release {
lintOptions {
disable 'MissingTranslation'
}
}
}
}
You could try to open "Translations Editor" and set the string "..." as "Unstranlatable".
You also must remove all translations of this string.
FWIW: If you don't plan on supporting other languages, then you don't need to disable the lint checks at all. Sometimes your project setup (or a library you're importing) may have accidentally - or intentionally - included a config to support additional languages by declaring a values- folder for that language like this for instance:
<your project source folder>/main/res/values-ar
This was the case for me so I simply removed the folder. But if you have no control over the offending library then one choice is to disable lint abortOnError as indicated in the accepted answer, or find a way to exclude 'library-imported' folders somehow. For the latter option you can start here
there is many solution but i tried
<string name="hello" translatable="false">hello</string>
It's the ignore attribute of the tools namespace in your strings file, as follows:
<?xml version="1.0" encoding="utf-8"?>
<resources
xmlns:tools="http://schemas.android.com/tools"
tools:ignore="MissingTranslation" >
<!-- your strings here; no need now for the translatable attribute -->
</resources>
and from the Gradle
release {
lintOptions {
disable 'MissingTranslation'
}
}
and
android {
lintOptions {
disable 'MissingTranslation'
}
}
Working
buildTypes {
release {
lintOptions {
checkReleaseBuilds false
abortOnError false
}
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}

Categories

Resources