Questions tagged [shrinkresources]
28 questions
1
vote
0 answers
Unable to generate signed apk using shrinkResources true in release build
shrinkResources true
minifyEnabled true
The error is given below :
Error:A problem was found with the configuration of task ':app:packageRelease'.
File…

Janardhan R
- 1,541
- 12
- 15
1
vote
0 answers
ShrinkResources minifies drawables specified from styles.xml
I'm having a strange issue with shrinkResources . If I specify background to my drawable directly via attribute it works OK. But If I move it to style, shrinkResources starts to minify them, thinking that they are not used. It's not like I…

deathangel908
- 8,601
- 8
- 47
- 81
1
vote
0 answers
Android Studio minify code of an app with an external library dependency
I'm building an android app (still empty) which is dependent from another android library project that contains al base classes and utils that I've developed during years.
I notice that add that dependency to my new app and try to run it, android…

Androidian
- 1,035
- 1
- 16
- 40
1
vote
1 answer
Clicks not working in release apk after proguard
Clicks not working in release apk after proguard
I can deploy app to emulator or even real android smartphone and everything works fine but when I create a release apk, transfer it to phone, I cannot play because the clicks don't work. Actually, I…

Mohamed Aadhil
- 9
- 4
1
vote
2 answers
shrinkresource ,proguard etc in xamarin doesn't reduce my app size
In android studio's build.gradle file,we can use shrinkresources set to true to shrinkify our app.Also can use minifyenabled and proguard options as well.
But in xamarin, How can I use these options?
I use proguard in my app as it referred in…

Habel Philip
- 205
- 3
- 10
1
vote
1 answer
No resources.txt file created after using shrinkResources with proguard in android?
actually I am trying to use shrinkResources in my android project, now I have added below lines in my gradle file:
minifyEnabled true
shrinkResources true
zipAlignEnabled true
Now when I try to run my app, it does not creates any resources.txt file…

Sudhanshu Gaur
- 113
- 2
- 8
0
votes
1 answer
when I migrate from AndroidStudio version Chipmunk to AndroidStudio version Electric Eel and dolphin my app cannot be released sign
All xml files encoding are utf-8 and have
but when set shrinkResources false in build.gradle app is being built release without any problem but I want shrinkResources to be true
please help me what is the…

AmiiiR
- 1
- 1
0
votes
0 answers
Android resource shrinking removes refs.xml from external library
i have made a library where i am using a refs.xml files in the values folder, which overrides a material resource file using tools:override to be able to rearrange the dialog buttons.
…

Aaron Falk
- 113
- 1
- 4
0
votes
1 answer
Drawable resource not found after minify enabled in android app
buildTypes {
release {
minifyEnabled true
shrinkResources = true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
debug {
debuggable true
testCoverageEnabled true
proguardFiles…

Rangam Ramesh
- 1
- 1
0
votes
1 answer
Generate signed APK build runs forever when minifyEnabled is true
I'm trying to reduce the APK size. So as suggested by Google I used shrinkResources and it requires minifyEnabled to be true in bulid.gradle
buildTypes {
release {
minifyEnabled true
shrinkResources true
proguardFiles…

Roshana Pitigala
- 8,437
- 8
- 49
- 80
0
votes
1 answer
Enabling Gradle minifying for OpenCv library in Android Studio
I almost completed a project in Android Studio that included OpenCV library, I imported the library by creating a new folder "jniLibs" under app/src/main.
Now there is a big problem, the .apk file size is 105 MB.
Using shrinkResources and…
user8744796
0
votes
0 answers
A weird bug about shrinkResources in Android
shrinkResources is configed as true in build.gradle.
Then I found this weird bug:
In a java file of my app, there is one line like this:
String unit = String.format("%%s %s", getResources().getString(R.string.XXXX));
Note that there is a space in…

kyoraku
- 57
- 7
0
votes
2 answers
Avoid shrinking/removing wearable micro app from apk file
I activated the resouce shrinking in my build.gradle but now my embeded wearable app is stripped out. How can I avoid that my micro app is removed, because it is unused?
Skipped unused resource res/raw/android_wear_micro_apk.apk: 382310…

rekire
- 47,260
- 30
- 167
- 264