1. Download our Official Android App: Forums for Android!

Apps How to specify the file-name-extension of the asset file to prohibit the compression in APK

Discussion in 'Android Development' started by KFC00725, Aug 30, 2016.

  1. KFC00725

    KFC00725 Lurker
    Thread Starter
    Rank:
    None
    Points:
    15
    Posts:
    1
    Joined:
    Aug 30, 2016

    Aug 30, 2016
    1
    0
    15
    Male
    I'm developing the application that has a large asset file and that uses NDK, with using
    'Android Studio 2.1.2' and 'gradle-experimental:0.7.0'.
    And I want to put the asset file into APK without compression.

    Before using NDK(gradle-experimental), I could do it with "app/build.gradle" like below.
    Code (Text):
    1.  
    2. android {
    3.     :
    4.   aaptOptions {
    5.     noCompress 'myext'
    6.   }
    7. }
    8.  
    But with using "gradle-experimental:0.7.0", the "app/build.gradle" like below causes
    "Error:Cause: com.android.build.gradle.managed.AndroidConfig$Impl".
    Code (Text):
    1.  
    2. model {
    3.   android {
    4.     :
    5.     ndk {
    6.       moduleName = "my-c-code"
    7.       ldLibs.add("android")
    8.       ldLibs.add("log")
    9.     }
    10.     aaptOptions {
    11.       noCompress = 'myext'
    12.     }
    13.   }
    14. }
    15.  
    Please let me know how to specify the file-name-extension of the asset file to prohibit the compression,
    or the URL of the reference of the "app/build.gradle" for gradle-experimental.

    Thank you in advance.
     

    Advertisement

Share This Page

Loading...