ShrinkResources true can't be used in Instant Apps feature?

When I try to reduce my size APK Feature, I use shrinkResources trueBuild Gradle in my function. However he complainsError:Resource shrinker cannot be used for libraries.

In this article, we ask you to use it https://medium.com/jet-stories/make-your-app-instant-33855ab5d02b

Am I doing something wrong or is it really not supported by Instant Apps?

+6
source share
3 answers

From what I understand from the article (I just read it quickly, still waiting on my reading list), shrinkResources trueit is only necessary to reduce the size of the APK by removing unused resources , but this is not a formal requirement for Instant Apps. I think the toolchain cannot decide whether the resource will not be used in the library, since the final APK has not been created.

So, if there are no unused resources in your project, this should not be a problem and can be deleted.

-, ( Instant Apps , Google IO): , , - APK, . , shrinkResources true APK, . , APK, shrinkResources true .

+3

, AndroidStudio, Gradle. Jenkins Gradle ( com.android.tools.build:gradle:2.2.3, com.android.tools.build: gradle: 3.0.1),

" > .

+1

Google Error Tracker Link

The fix will be in 3.2 canary 1 and after that it will be released.

If any problem persists, inform the Google tracker , which they will open for verification.

0
source

All Articles