Google Play требует, чтобы все приложения, ориентированные на Android 15+, поддерживали размеры страниц памяти 16 КБ: биAndroid

Форум для тех, кто программирует под Android
Ответить
Anonymous
 Google Play требует, чтобы все приложения, ориентированные на Android 15+, поддерживали размеры страниц памяти 16 КБ: би

Сообщение Anonymous »

Чтобы собрать информацию о следующем:

Чтобы обеспечить правильную работу вашего приложения в последних версиях Android, Google Play требует, чтобы все приложения, предназначенные для Android 15 и более поздних версий, поддерживали размеры страниц памяти 16 КБ.
С 1 ноября 2025 г., если обновления вашего приложения не поддерживают размеры страниц памяти 16 КБ, вы не сможете выпускать эти обновления.
Ваш последний рабочий выпуск не поддерживает поддерживают размеры страниц памяти 16 КБ.

Примечание: приведенное выше уведомление пришло из консоли Google Play.

Я уже читал этот форум:

Блог разработчиков Android: подготовьте свои приложения к требованиям совместимости размера страницы Google Play 16 КБ

Часть на форуме мое внимание привлек этот комментарий:

Может кто-нибудь объяснить мне, что, черт возьми, они имеют в виду под размером страницы?


RE: Это довольно низкоуровневые вещи. Виртуальная память, используемая операционной системой, разделена на блоки, называемые страницами, которые представляют собой наименьшую единицу памяти, которую вы можете выделить. Чаще всего размер страницы составлял 4 КБ, но теперь он переходит на 16 КБ.
Это имеет значение только при написании собственного кода и, таким образом, выделении памяти вручную.

По мере того, как я получаю более подробную информацию об этой проблеме, я нашел эти сведения в консоли Google Play > Последние выпуски и пакеты > (пакет моего конкретного выпуска приложения) > Размер страницы памяти (
Не поддерживает 16 КБ):

Библиотеки, которые не поддерживают 16 КБ:
  • base/lib/arm64-v8a/libbarhopper_v3.so
  • base/lib/arm64-v8a/libface_detector_v2_jni.so
  • base/lib/arm64-v8a/libimage_processing_util_jni.so
  • base/lib/arm64-v8a/libmlkit_google_ocr_pipeline.so
  • base/lib/arm64-v8a/libmlkitcommonpipeline.so
  • base/lib/arm64-v8a/libxeno_native.so
  • base/lib/x86_64/libbarhopper_v3.so
  • base/lib/x86_64/libface_detector_v2_jni.so
  • base/lib/x86_64/libimage_processing_util_jni.so
  • base/lib/x86_64/libmlkit_google_ocr_pipeline.so
  • base/lib/x86_64/libmlkitcommonpipeline.so
  • base/lib/x86_64/libxeno_native.so
Для дальнейшего расследования этого случая я попытался создать файл .aab в Android Studio выполнив следующие действия:
  • Сборка > Создать подписанный пакет приложений или APK > Android App Bundle > () Хранилище ключей > Далее > Выпуск (опция) > затем Создать.
Сразу после создания файла .aab я проанализировал пакет приложения и увидел следующие предупреждения:
Изображение

Примечание что кодовая база этого проекта написана на Java. У меня нет четкого представления о том, как решить эту проблему без внесения ненужных модификаций или корректировок.
Я добавил тег android-studio, потому что думал, что сама IDE может иметь какое-то отношение к этому случаю.
Вот мои конфигурации app/build.gradle:

Код: Выделить всё

apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
apply plugin:  'com.google.firebase.crashlytics'

android {
compileSdk 36

defaultConfig {
applicationId "com.app.myapp"
minSdkVersion 26
multiDexEnabled true
targetSdk 36
versionCode 25
versionName "1.4.1"
vectorDrawables.useSupportLibrary = true
setProperty("archivesBaseName", "MyApp")

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

buildTypes {
proguard {
debuggable false
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro', 'proguard.cfg'
}
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.debug
}
debug {
isDefault true
minifyEnabled false
proguardFiles 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
// {IMPORTANT NOTE} Do NOT compress tflite model files (need to call out to developers!)
namespace 'com.app.myapp'
androidResources {
noCompress 'tflite'
}
}

repositories {
// Depending on AndroidX Snapshot Builds to get the latest CameraX libs.
maven { url 'https://androidx.dev/snapshots/builds/6787662/artifacts/repository/' }
}

dependencies {

/*SharedPreferences implementation*/
implementation 'androidx.preference:preference:1.2.1'

implementation 'com.facebook.shimmer:shimmer:0.5.0@aar'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.drawerlayout:drawerlayout:1.2.0'
implementation 'androidx.navigation:navigation-fragment-ktx:2.7.6'
implementation 'androidx.navigation:navigation-ui-ktx:2.7.6'
implementation 'androidx.recyclerview:recyclerview:1.3.2'
implementation 'androidx.viewpager2:viewpager2:1.1.0-beta02'
implementation 'me.relex:circleindicator:2.1.6'
implementation 'androidx.core:core-ktx:1.12.0'
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0"
implementation 'com.google.android.material:material:1.11.0'
implementation 'net.sourceforge.jtds:jtds:1.3.1'
implementation files('libs/activation.jar')
implementation files('libs/additionnal.jar')
implementation files('libs/mail.jar')
implementation files('libs/commons-dbutils-1.7.jar')

implementation 'com.airbnb.android:lottie:6.1.0'
implementation 'androidx.compose.ui:ui-graphics-android:1.5.4'
implementation 'androidx.compose.ui:ui-desktop:1.6.0-beta03'

testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'

implementation 'com.makeramen:roundedimageview:2.3.0'
implementation 'com.android.volley:volley:1.2.1'

implementation 'com.google.mlkit:face-mesh-detection:16.0.0-beta1'

implementation 'androidx.multidex:multidex:2.0.1'
implementation 'com.google.android.gms:play-services-auth:20.7.0'

implementation 'com.nex3z:notification-badge:1.0.2'

// Import the BoM for the Firebase platform
implementation(platform("com.google.firebase:firebase-bom:32.3.1"))

// Add the dependencies for the In-App Messaging and Analytics libraries
implementation("com.google.firebase:firebase-inappmessaging-display")

// Add the dependencies for the Firebase Cloud Messaging and Analytics libraries
// When using the BoM,  you don't specify versions in Firebase library dependencies
implementation("com.google.firebase:firebase-messaging")
implementation("com.google.firebase:firebase-analytics")
implementation("com.google.firebase:firebase-crashlytics")

// Barcode model
implementation 'com.google.mlkit:barcode-scanning:17.2.0'
// Or comment the dependency above and uncomment the dependency below to
// use unbundled model that depends on Google Play Services
// implementation 'com.google.android.gms:play-services-mlkit-barcode-scanning:18.3.0'

// Object detection feature with bundled default classifier
implementation 'com.google.mlkit:object-detection:17.0.0'

// Object detection feature with custom classifier support
implementation 'com.google.mlkit:object-detection-custom:17.0.1'

// Face features
implementation 'com.google.mlkit:face-detection:16.1.5'
// Or comment the dependency above and uncomment the dependency below to
// use unbundled model that depends on Google Play Services
implementation 'com.google.android.gms:play-services-mlkit-face-detection:17.1.0'

// Text features
implementation 'com.google.mlkit:text-recognition:16.0.0'
// Or comment the dependency above and uncomment the dependency below to
// use unbundled model that depends on Google Play Services
// implementation 'com.google.android.gms:play-services-mlkit-text-recognition:19.0.0'
implementation 'com.google.mlkit:text-recognition-chinese:16.0.0'
// Or comment the dependency above and uncomment the dependency below to
// use unbundled model that depends on Google Play Services
// implementation 'com.google.android.gms:play-services-mlkit-text-recognition-chinese:16.0.0'
implementation 'com.google.mlkit:text-recognition-devanagari:16.0.0'
// Or comment the dependency above and uncomment the dependency below to
// use unbundled model that depends on Google Play Services
// implementation 'com.google.android.gms:play-services-mlkit-text-recognition-devanagari:16.0.0'
implementation 'com.google.mlkit:text-recognition-japanese:16.0.0'
// Or comment the dependency above and uncomment the dependency below to
// use unbundled model that depends on Google Play Services
// implementation 'com.google.android.gms:play-services-mlkit-text-recognition-japanese:16.0.0'
implementation 'com.google.mlkit:text-recognition-korean:16.0.0'
// Or comment the dependency above and uncomment the dependency below to
// use unbundled model that depends on Google Play Services
// implementation 'com.google.android.gms:play-services-mlkit-text-recognition-korean:16.0.0'

// Image labeling
implementation 'com.google.mlkit:image-labeling:17.0.7'
// Or comment the dependency above and uncomment the dependency below to
// use unbundled model that depends on Google Play Services
// implementation 'com.google.android.gms:play-services-mlkit-image-labeling:16.0.8'

// Image labeling custom
implementation 'com.google.mlkit:image-labeling-custom:17.0.2'
// Or comment the dependency above and uncomment the dependency below to
// use unbundled model that depends on Google Play Services
// implementation 'com.google.android.gms:play-services-mlkit-image-labeling-custom:16.0.0-beta4'

// Pose detection with default models
implementation 'com.google.mlkit:pose-detection:18.0.0-beta3'
// Pose detection with accurate models
implementation 'com.google.mlkit:pose-detection-accurate:18.0.0-beta3'

// Selfie segmentation
implementation 'com.google.mlkit:segmentation-selfie:16.0.0-beta4'

implementation 'com.google.mlkit:camera:16.0.0-beta3'

// Face Mesh Detection
implementation 'com.google.mlkit:face-mesh-detection:16.0.0-beta1'

// -------------------------------------------------------

implementation 'com.google.code.gson:gson:2.10.1'
implementation 'com.google.guava:guava:32.1.2-jre'

// For how to setup gradle dependencies in Android X,  see:
// https://developer.android.com/training/testing/set-up-project#gradle-dependencies
// Core library
androidTestImplementation 'androidx.test:core:1.5.0'

// AndroidJUnitRunner and JUnit Rules
androidTestImplementation 'androidx.test:runner:1.5.2'
androidTestImplementation 'androidx.test:rules:1.5.0'

// Assertions
androidTestImplementation 'androidx.test.ext:junit:1.2.1'

// ViewModel and LiveData
implementation "androidx.lifecycle:lifecycle-livedata-ktx:2.6.2"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.2"

implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'androidx.annotation:annotation:1.7.1'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'

// CameraX
implementation 'androidx.camera:camera-camera2:1.4.0-alpha03'
implementation 'androidx.camera:camera-lifecycle:1.4.0-alpha03'
implementation 'androidx.camera:camera-view:1.4.0-alpha03'

// CameraX Core library
implementation 'androidx.camera:camera-core:1.4.0-alpha03'

// CameraX Extensions library (for additional features)
implementation 'androidx.camera:camera-extensions:1.4.0-alpha03'

// On Device Machine Learnings
implementation "com.google.android.odml:image:1.0.0-beta1"
}
Кроме того, с помощью ответа Башу и статьи tomerpacific. Я зашел в app/build.gradle. Затем я навел курсор на зависимость, у которой было предупреждение, предлагающее новую версию. Например:
Изображение

Поскольку я использую Android Studio, предупреждение о ворсе мне очень помогло.
Однако после того, как я создал файл .aab и затем проанализировал его снова, я получил следующий статус выравнивания:
Изображение


Кто-нибудь знает, как правильно решить эту проблему?

Изменить: следующее примечание исключено из тела вопроса

Я загрузил патч в консоль Google Play и получил это уведомление:
Изображение

Показывает, что раздел Выравнивание содержит предупреждение с таким сообщением:

APK не поддерживает устройства 16 КБ

игнорируется в Google Play политики.

Подробнее здесь: https://stackoverflow.com/questions/797 ... emory-page
Ответить

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

Вернуться в «Android»