fix(android): 16k issue wip
This commit is contained in:
parent
bdf5c96cb9
commit
b14245cead
5 changed files with 55 additions and 6 deletions
|
@ -185,14 +185,15 @@ configurations.all {
|
|||
exclude group: "com.huawei.hms.LocationLiteSdk", module: "core"
|
||||
// Exclude Fresco native pipeline and webp natives to drop 0x1000 .so files
|
||||
exclude group: "com.facebook.fresco", module: "imagepipeline-native"
|
||||
exclude group: "com.facebook.fresco", module: "static-webp"
|
||||
exclude group: "com.facebook.fresco", module: "nativeimagetranscoder"
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// The version of react-native is set by the React Native Gradle Plugin
|
||||
implementation("com.facebook.react:react-android")
|
||||
|
||||
// Ensure Fresco core API available for app-level initialization (MainApplication)
|
||||
implementation("com.facebook.fresco:fresco:3.6.0")
|
||||
|
||||
def isGifEnabled = (findProperty('expo.gif.enabled') ?: "") == "true";
|
||||
def isWebpEnabled = (findProperty('expo.webp.enabled') ?: "") == "true";
|
||||
def isWebpAnimatedEnabled = (findProperty('expo.webp.animated') ?: "") == "true";
|
||||
|
|
|
@ -78,5 +78,8 @@
|
|||
</intent-filter>
|
||||
</activity>
|
||||
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" android:exported="false"/>
|
||||
<provider
|
||||
android:name="com.facebook.drawee.backends.pipeline.FrescoInitProvider"
|
||||
tools:node="remove" />
|
||||
</application>
|
||||
</manifest>
|
|
@ -12,6 +12,8 @@ import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint.load
|
|||
import com.facebook.react.defaults.DefaultReactNativeHost
|
||||
import com.facebook.react.soloader.OpenSourceMergedSoMapping
|
||||
import com.facebook.soloader.SoLoader
|
||||
import com.facebook.drawee.backends.pipeline.Fresco
|
||||
import com.facebook.imagepipeline.core.ImagePipelineConfig
|
||||
|
||||
import expo.modules.ApplicationLifecycleDispatcher
|
||||
import expo.modules.ReactNativeHostWrapper
|
||||
|
@ -42,6 +44,13 @@ class MainApplication : Application(), ReactApplication {
|
|||
override fun onCreate() {
|
||||
super.onCreate()
|
||||
SoLoader.init(this, OpenSourceMergedSoMapping)
|
||||
|
||||
// Initialize Fresco to avoid native memory chunk (no libimagepipeline.so load)
|
||||
val builder = ImagePipelineConfig.newBuilder(this)
|
||||
builder.experiment().setNativeCodeDisabled(true)
|
||||
val frescoConfig = builder.build()
|
||||
Fresco.initialize(this, frescoConfig)
|
||||
|
||||
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
|
||||
// If you opted-in for the New Architecture, we load the native entry point for this app.
|
||||
load()
|
||||
|
|
|
@ -63,8 +63,9 @@ android.enableProguardInReleaseBuilds=true
|
|||
# fix notifee + expo-update crash, see https://github.com/expo/expo/issues/15298
|
||||
EX_UPDATES_ANDROID_DELAY_LOAD_APP=false
|
||||
|
||||
# Whether the app is configured to use edge-to-edge via the app config or `react-native-edge-to-edge` plugin
|
||||
expo.edgeToEdgeEnabled=false
|
||||
|
||||
# Ensure we always pick the NDK r27 libc++_shared.so we vendor in jniLibs
|
||||
android.packagingOptions.pickFirsts=**/libc++_shared.so
|
||||
|
||||
# Whether the app is configured to use edge-to-edge via the app config or `react-native-edge-to-edge` plugin
|
||||
expo.edgeToEdgeEnabled=false
|
|
@ -178,7 +178,8 @@
|
|||
B743D4A39B4E461798D118B9 /* Fix Xcode 15 Bug */,
|
||||
D8ED2FC173D1461F87CDF597 /* Fix Xcode 15 Bug */,
|
||||
F3F5A8D7A73545D78A4D8467 /* Fix Xcode 15 Bug */,
|
||||
55D701B4073A47A48401F014 /* Remove signature files (Xcode workaround) */,
|
||||
BC7FCBEF8C354C749AB11067 /* Fix Xcode 15 Bug */,
|
||||
FA5F247997BA4DDBB06F01B8 /* Remove signature files (Xcode workaround) */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
|
@ -1101,6 +1102,40 @@ fi";
|
|||
shellScript = "
|
||||
echo \"Remove signature files (Xcode workaround)\";
|
||||
rm -rf \"$CONFIGURATION_BUILD_DIR/MapLibre.xcframework-ios.signature\";
|
||||
";
|
||||
};
|
||||
BC7FCBEF8C354C749AB11067 /* Fix Xcode 15 Bug */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
name = "Fix Xcode 15 Bug";
|
||||
inputPaths = (
|
||||
);
|
||||
outputPaths = (
|
||||
);
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "if [ \"$XCODE_VERSION_MAJOR\" = \"1500\" ]; then
|
||||
echo \"Remove signature files (Xcode 15 workaround)\"
|
||||
find \"$BUILD_DIR/${CONFIGURATION}-iphoneos\" -name \"*.signature\" -type f | xargs -r rm
|
||||
fi";
|
||||
};
|
||||
FA5F247997BA4DDBB06F01B8 /* Remove signature files (Xcode workaround) */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
name = "Remove signature files (Xcode workaround)";
|
||||
inputPaths = (
|
||||
);
|
||||
outputPaths = (
|
||||
);
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "
|
||||
echo \"Remove signature files (Xcode workaround)\";
|
||||
rm -rf \"$CONFIGURATION_BUILD_DIR/MapLibre.xcframework-ios.signature\";
|
||||
";
|
||||
};
|
||||
/* End PBXShellScriptBuildPhase section */
|
||||
|
|
Loading…
Add table
Reference in a new issue