Skip to content

for this libandroidlame.so 16kb page support required #373

Closed

Description

@sandeep14

for this libandroidlame.so 16kb page support required

Activity

  1. github-actions commented on Sep 27, 2025

    @github-actions

    👋 @sandeep14
    Thanks for opening your issue here! If you find this package useful hit the star🌟!

  2. mGallee commented on Sep 28, 2025

    @mGallee

    We are experiencing the same issue in our app since we added this package.

  3. Volps-deliverThat commented on Sep 30, 2025

    @Volps-deliverThat

    Same problem here

  4. nik098 commented on Sep 30, 2025

    @nik098

    Waiting for this too.

  5. jimmywu-boxworks commented on Oct 1, 2025

    @jimmywu-boxworks

    +1

  6. karanMoontechnolabs commented on Oct 3, 2025

    @karanMoontechnolabs

    same problem , Waiting for this too.

  7. AndMorMat commented on Oct 3, 2025

    @AndMorMat

    Same problem here, waiting for this

  8. C0rren commented on Oct 6, 2025

    @C0rren

    +1

  9. YashCreole commented on Oct 7, 2025

    @YashCreole

    I'm also facing the same issue for this libandroidlame.so (16KB warning).
    Waiting for the solution.

  10. LCseniordev commented on Oct 8, 2025

    @LCseniordev

    +1

  11. hashhirr commented on Oct 8, 2025

    @hashhirr

    +1

  12. YashCreole commented on Oct 8, 2025

    @YashCreole

    Hey, Guys

    I found the solution of this.
    Go to the below path.

    node_modules/react-native-compressor/android/build.gradle

    And Search for the line implementation 'com.github.banketree:AndroidLame-kotlin:v0.0.1'

    And Replace it with the line implementation 'com.github.kaushik-naik:TAndroidLame:277c2ab4b0'

    after this save the file and apply patch of that file with below command.

    npx patch-package react-native-compressor

  13. gkasireddy202 commented on Oct 13, 2025

    @gkasireddy202

    @YashCreole - Can I replace the implementation 'com.github.banketree:AndroidLame-kotlin:v0.0.1' with implementation 'com.github.kaushik-naik:TAndroidLame:277c2ab4b0'. in node_modules>react-native-compressor>android>build.gradle?

    Can I skip installing the npx patch-package react-native-compressor because I am a single developer working on my app?

    Or I need to install the npx patch-package react-native-compressor?

  14. YashCreole commented on Oct 13, 2025

    @YashCreole

    Hi, @gkasireddy202

    Yes you're right. You need to change that implementation ... line and after that check in your package.json file that you've the patch-package installed or not. If not then first install the patch package from npm and then apply the patch like this in you project's root foder's terminal with below command.

    npx patch-package react-native-compressor

    Thank you.

  15. gkasireddy202 commented on Oct 13, 2025

    @gkasireddy202

    @YashCreole - Thanks for your reply.

    I have already installed version v1.13.0 in my project.

    Can I proceed with this step in my project?

    1. Replace the implementation 'com.github.banketree:AndroidLame-kotlin:v0.0.1' with implementation 'com.github.kaushik-naik:TAndroidLame:277c2ab4b0'. in node_modules>react-native-compressor>android>build.gradle.

    2. Can I skip installing the npx patch-package react-native-compressor (no need to install this), right?

  16. 15 remaining items

  17. PhucDamMinh commented on Oct 24, 2025

    @PhucDamMinh

    Any updates on this issue, i've ran into the same problem.

  18. mahesh7325 commented on Oct 24, 2025

    @mahesh7325

    Hey, Guys

    I found the solution of this. Go to the below path.

    node_modules/react-native-compressor/android/build.gradle

    And Search for the line implementation 'com.github.banketree:AndroidLame-kotlin:v0.0.1'

    And Replace it with the line implementation 'com.github.kaushik-naik:TAndroidLame:277c2ab4b0'

    after this save the file and apply patch of that file with below command.

    npx patch-package react-native-compressor

    This solution worked for us. With this solution we had to add tools:replace="android:allowBackup" to the AndroidManifest.xml
    After applying this patch, now google play console is showing my app as 16KB compatible.

  19. codetelo commented on Oct 24, 2025

    @codetelo

    I'm using pnpm and was struggling with some of the other solutions I saw. This is what worked for me.

    I made a postinstall bash script to make the necessary adjustments.

    #!/bin/bash
    
    # Script to fix the 16KB page size issue in react-native-compressor
    # This replaces AndroidLame-kotlin with TAndroidLame to avoid the 16KB page size limit
    
    set -e
    
    echo "Applying 16KB page size fix for react-native-compressor..."
    
    # Path to the build.gradle file
    BUILD_GRADLE_PATH="node_modules/react-native-compressor/android/build.gradle"
    
    # Check if the file exists
    if [ ! -f "$BUILD_GRADLE_PATH" ]; then
        echo "Error: $BUILD_GRADLE_PATH not found"
        echo "Make sure react-native-compressor is installed"
        exit 1
    fi
    
    # Check if the fix is already applied
    if grep -q "com.github.kaushik-naik:TAndroidLame:a485052f28" "$BUILD_GRADLE_PATH"; then
        echo "Fix already applied - TAndroidLame is already being used"
        exit 0
    fi
    
    # Check if the problematic dependency exists
    if ! grep -q "com.github.banketree:AndroidLame-kotlin:v0.0.1" "$BUILD_GRADLE_PATH"; then
        echo "Warning: Expected AndroidLame-kotlin dependency not found"
        echo "The file might have been modified or the version changed"
        echo "Current content around Lame dependencies:"
        grep -A 2 -B 2 "Lame" "$BUILD_GRADLE_PATH" || echo "No Lame dependencies found"
        exit 1
    fi
    
    # Apply the fix
    echo "Replacing AndroidLame-kotlin with TAndroidLame..."
    
    # Use sed to replace the dependency (works on both macOS and Linux)
    if [[ "$OSTYPE" == "darwin"* ]]; then
        # macOS
        sed -i '' 's/com.github.banketree:AndroidLame-kotlin:v0.0.1/com.github.kaushik-naik:TAndroidLame:a485052f28/' "$BUILD_GRADLE_PATH"
    else
        # Linux
        sed -i 's/com.github.banketree:AndroidLame-kotlin:v0.0.1/com.github.kaushik-naik:TAndroidLame:a485052f28/' "$BUILD_GRADLE_PATH"
    fi
    
    # Verify the fix was applied
    if grep -q "com.github.kaushik-naik:TAndroidLame:a485052f28" "$BUILD_GRADLE_PATH"; then
        echo "Fix applied successfully!"
        echo "Updated dependency:"
        grep -A 2 -B 2 "TAndroidLame" "$BUILD_GRADLE_PATH"
    else
        echo "Error: Fix failed to apply"
        exit 1
    fi
    
    echo "16KB page size fix completed!"
    
    

    Then in my package.json, I just added:

     "postinstall": "./scripts/fix-16kb-page-size.sh",
    
  20. Pugavkomm commented on Oct 27, 2025

    @Pugavkomm

    I'm using pnpm and was struggling with some of the other solutions I saw. This is what worked for me.

    I made a postinstall bash script to make the necessary adjustments.

    #!/bin/bash
    
    # Script to fix the 16KB page size issue in react-native-compressor
    # This replaces AndroidLame-kotlin with TAndroidLame to avoid the 16KB page size limit
    
    set -e
    
    echo "Applying 16KB page size fix for react-native-compressor..."
    
    # Path to the build.gradle file
    BUILD_GRADLE_PATH="node_modules/react-native-compressor/android/build.gradle"
    
    # Check if the file exists
    if [ ! -f "$BUILD_GRADLE_PATH" ]; then
        echo "Error: $BUILD_GRADLE_PATH not found"
        echo "Make sure react-native-compressor is installed"
        exit 1
    fi
    
    # Check if the fix is already applied
    if grep -q "com.github.kaushik-naik:TAndroidLame:a485052f28" "$BUILD_GRADLE_PATH"; then
        echo "Fix already applied - TAndroidLame is already being used"
        exit 0
    fi
    
    # Check if the problematic dependency exists
    if ! grep -q "com.github.banketree:AndroidLame-kotlin:v0.0.1" "$BUILD_GRADLE_PATH"; then
        echo "Warning: Expected AndroidLame-kotlin dependency not found"
        echo "The file might have been modified or the version changed"
        echo "Current content around Lame dependencies:"
        grep -A 2 -B 2 "Lame" "$BUILD_GRADLE_PATH" || echo "No Lame dependencies found"
        exit 1
    fi
    
    # Apply the fix
    echo "Replacing AndroidLame-kotlin with TAndroidLame..."
    
    # Use sed to replace the dependency (works on both macOS and Linux)
    if [[ "$OSTYPE" == "darwin"* ]]; then
        # macOS
        sed -i '' 's/com.github.banketree:AndroidLame-kotlin:v0.0.1/com.github.kaushik-naik:TAndroidLame:a485052f28/' "$BUILD_GRADLE_PATH"
    else
        # Linux
        sed -i 's/com.github.banketree:AndroidLame-kotlin:v0.0.1/com.github.kaushik-naik:TAndroidLame:a485052f28/' "$BUILD_GRADLE_PATH"
    fi
    
    # Verify the fix was applied
    if grep -q "com.github.kaushik-naik:TAndroidLame:a485052f28" "$BUILD_GRADLE_PATH"; then
        echo "Fix applied successfully!"
        echo "Updated dependency:"
        grep -A 2 -B 2 "TAndroidLame" "$BUILD_GRADLE_PATH"
    else
        echo "Error: Fix failed to apply"
        exit 1
    fi
    
    echo "16KB page size fix completed!"
    

    Then in my package.json, I just added:

     "postinstall": "./scripts/fix-16kb-page-size.sh",
    

    Why not use patch-package?

  21. codetelo commented on Oct 27, 2025

    @codetelo

    Why not use patch-package?

    I did attempt using patch-package and also pnpm's patch, but neither worked for me. This was the only one that worked and it's a pretty easy add.

  22. nik098 commented on Oct 29, 2025

    @nik098

    Any permanent fix for this? Deadline is a day away for Google play to stop accepting the app.

  23. abhishek-auw commented on Oct 29, 2025

    @abhishek-auw

    Any permanent fix for this? Deadline is a day away for Google play to stop accepting the app.

    Send request for extension.

  24. AndrianarivoAlpha commented on Oct 29, 2025

    @AndrianarivoAlpha

    Any permanent fix for this? Deadline is a day away for Google play to stop accepting the app.

    Send request for extension.

    For Expo project add this into app.json/plugins

    [ "expo-build-properties", { "android": { "buildArchs": ["arm64-v8a", "armeabi-v7a"], } ],

    Thank me later!

  25. AliQureshi24 commented on Nov 5, 2025

    @AliQureshi24

    Hey Guys
    For Expo project I add this into app.json/plugins

     [
        "expo-build-properties",
        {
          "android": {
            "compileSdkVersion": 35,
            "targetSdkVersion": 35,
            "minSdkVersion": 24,
            "ndkVersion": "28.0.12674087",
            "splits": {
              "abi": {
                "enable": true,
                "reset": true,
                "include": ["armeabi-v7a", "arm64-v8a"],
                "universalApk": false
              }
            }
          }
        }
      ]
    

    This helped me resolve the issue

  26. Santhosh-Umapathi commented on Nov 11, 2025

    @Santhosh-Umapathi

    For expo projects

        'expo-build-properties',
          {
            android: {
              memoryPageSize16kb: true,
              packagingOptions: {
                exclude: ['lib/x86_64/libandroidlame.so'],
              },
              abiFilters: ['armeabi-v7a', 'arm64-v8a'],
    //...
    
  27. oeddyo commented on Dec 18, 2025

    @oeddyo
    Contributor

    hope the patch can be merged soon...

  28. aravind3566 commented on Dec 19, 2025

    @aravind3566

    +1

  29. danchiche commented on Dec 29, 2025

    @danchiche

    I just added

      "plugins": [
        [
          "expo-build-properties",
          {
            "android": {
              "memoryPageSize16kb": true,
              packagingOptions: {
                exclude: ['lib/x86_64/libandroidlame.so'],
              },
            }
          }
        ],
      ],
    

    in my app.config.js
    and it works

    Claude AI told me this configuration just dissallow to use MP3 compression on x86_64 android device

    Do you know if the they correct the bug on future x86_64 plateform ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions