Skip to content

Support 16 KB page sizes #379

Closed
Closed

Description

@Ridwan226

Memory page size
Not supported 16 KB
Hide details
Learn more
Libraries that do not support 16 KB:
base/lib/x86_64/libandroidlame.so

is this error coming from react native compressor

Activity

  1. ursnj commented on Nov 23, 2025

    @ursnj

    @numandev1 Any luck on this item ?

    till it fixes you can use this expo config plugin should solve the ussue

    const { withAppBuildGradle } = require('@expo/config-plugins');
    
    /**
     * Expo config plugin to add Android dependency substitution for AndroidLame library
     * This substitutes the original AndroidLame-kotlin library with a forked version
     */
    const withAndroidDependencySubstitution = (config) => {
      return withAppBuildGradle(config, (config) => {
        const { modResults } = config;
        let gradleContent = modResults.contents;
    
        // Check if the substitution already exists to avoid duplicates
        if (gradleContent.includes('com.github.banketree:AndroidLame-kotlin')) {
          console.log('⚠️  Android dependency substitution already exists, skipping...');
          return config;
        }
    
        // Find the configurations.all block or create one
        const configurationPattern = /configurations\.all\s*\{[\s\S]*?\n\}/;
        
        const substitutionBlock = `
        resolutionStrategy.dependencySubstitution {
            substitute(module('com.github.banketree:AndroidLame-kotlin'))
                    .using(module('com.github.kaushik-naik:TAndroidLame:a485052f28'))
        }`;
    
        if (configurationPattern.test(gradleContent)) {
          // If configurations.all block exists, add substitution inside it
          gradleContent = gradleContent.replace(
            configurationPattern,
            (match) => {
              // Insert before the closing brace
              return match.replace(/\n\}$/, `${substitutionBlock}\n}`);
            }
          );
          console.log('✅ Added dependency substitution to existing configurations.all block');
        } else {
          // If no configurations.all block exists, create one after dependencies block
          const dependenciesPattern = /(dependencies\s*\{[\s\S]*?\n\})/;
          
          if (dependenciesPattern.test(gradleContent)) {
            gradleContent = gradleContent.replace(
              dependenciesPattern,
              `$1
    
    configurations.all {${substitutionBlock}
    }`
            );
            console.log('✅ Created configurations.all block with dependency substitution');
          } else {
            // Fallback: add at the end of the file
            gradleContent += `
    
    configurations.all {${substitutionBlock}
    }
    `;
            console.log('✅ Added configurations.all block at end of file');
          }
        }
    
        modResults.contents = gradleContent;
        return config;
      });
    };
    
    module.exports = withAndroidDependencySubstitution;
    
  2. kussberg commented on Nov 23, 2025

    @kussberg

    Same problem, can't publish on Play Store.

  3. Doris-belle commented on Nov 24, 2025

    @Doris-belle

    same as here

  4. Jwmffreitas commented on Nov 24, 2025

    @Jwmffreitas

    Same problem with expo

  5. ThomasRibalta commented on Nov 25, 2025

    @ThomasRibalta

    Same problem too, does anyone have a solution?

  6. omarsukarieh commented on Nov 25, 2025

    @omarsukarieh

    Same problem

  7. tomerh2001 commented on Nov 26, 2025

    @tomerh2001

    same here

  8. devAdrish commented on Nov 27, 2025

    @devAdrish

    Use the apk analyzer from android studio to check

    As u can see the it shows 16Kb alignment.


    Image
    Image

    Check your other dependencies as well
    You may need to update your react native version as 16Kb page size support was added in v.0.77.0


  9. Ozaoujal commented on Nov 28, 2025

    @Ozaoujal

    +1, same problem, cannot push to playstore

  10. Ridwan226 commented on Nov 28, 2025

    @Ridwan226
    Author

    react-native-compressor+1.13.0.patch

    patches/react-native-compressor+1.13.0.patch

    While I'm doing this

    Support for images and videos only

    https://pastebin.com/9vykhpPq

  11. ikbalmoh commented on Nov 29, 2025

    @ikbalmoh

    react-native-compressor+1.13.0.patch

    patches/react-native-compressor+1.13.0.patch

    While I'm doing this

    Support for images and videos only

    https://pastebin.com/9vykhpPq

    It worked! thanks

  12. aravind3566 commented on Dec 15, 2025

    @aravind3566

    +1

  13. christian-hess-94 commented on Dec 17, 2025

    @christian-hess-94

    @ikbalmoh if this works give me a buymeacoffee link and i`ll hook you up

  14. christian-hess-94 commented on Dec 18, 2025

    @christian-hess-94

    this made it work thank you very much, i`ll wait for the buymeacoffee link

  15. christian-hess-94 commented on Dec 18, 2025

    @christian-hess-94

    I got a different error when going to RN 0.80.2
    I did a few modifications to the patch file and it fixed the issue for me.

    The main gist (haha, pun) of it is the fact that compressor is using some outdated android SDKs that are no longer available so gradlew fails to compile

    https://gist.github.com/christian-hess-94/6a51b3bc1a5fb388c16bda267bc9b0a0

    Just replace the patch file for this, it`ll still be 16KB compliant

  16. CavalcanteLeo commented on Jan 3, 2026

    @CavalcanteLeo

    +1

  17. XChikuX commented on Jan 8, 2026

    @XChikuX
    Contributor

    Issue is fixed by PR #372 @numandev1 Please close

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