Hey,
this might be just my lack of understanding of what different setup for 
build variants do, but I would be grateful if anyone could put some light 
on this subject.

Setup:
=====================
Windows 8.1, 64-bit
Android Studio 0.9.2
Gradle 2.1
Android Gradle Plugin 0.14.1

Problem:
=====================
Resources located in "raw" resource folder can't be read at runtime when 
shrinkResources is enabled. When trying to open a resource from that folder 
(namely brush_hair.mp3) I get "FileNotFoundException" exception with 
message "this file cannot be opened as a file descriptor; it is probably 
compressed." Resource is being opened when constructing "MediaPlayer" 
instance with "MediaPlayer#create (Context context, int resid);" call. 
Works fine when shrinkResources is set to false.

Here is the code for build types from gradle build file(release is the type 
that is faulty):
    buildTypes {
        debug {
            testCoverageEnabled true
        }
        release {
            zipAlignEnabled true
            minifyEnabled true
            shrinkResources true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 
'proguard-rules.pro'
            signingConfig signingConfigs.release
            testCoverageEnabled true
        }
    }

Thanks for any help or guidance.

Best,

-- 
You received this message because you are subscribed to the Google Groups 
"adt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to