Koleksiyonlar ile düzeninizi koruyun
İçeriği tercihlerinize göre kaydedin ve kategorilere ayırın.
Android 10 (API düzeyi 29) ve sonraki sürümleri çalıştıran cihazlarda platforma, yerleştirilmiş DEX kodunu doğrudan uygulamanızın APK dosyasından çalıştırmasını söyleyebilirsiniz. Bu seçenek, saldırganın cihazdaki yerel olarak derlenmiş kodu kurcalamayı başarması durumunda saldırıyı önlemeye yardımcı olabilir.
Gradle derleme sistemini kullanıyorsanız bu özelliği etkinleştirmek için aşağıdakileri yapın:
Uygulamanızın manifest dosyasının <application> öğesinde android::useEmbeddedDex özelliğini true olarak ayarlayın.
Bazel derleme sistemini kullanıyorsanız bu özelliği etkinleştirmek için uygulamanızın manifest dosyasındaki <application> öğesinde android:useEmbeddedDex özelliğini true olarak ayarlayın ve DEX dosyalarını sıkıştırılmamış şekilde bırakın:
Bu sayfadaki içerik ve kod örnekleri, İçerik Lisansı sayfasında açıklanan lisanslara tabidir. Java ve OpenJDK, Oracle ve/veya satış ortaklarının tescilli ticari markasıdır.
Son güncelleme tarihi: 2025-08-27 UTC.
[null,null,["Son güncelleme tarihi: 2025-08-27 UTC."],[],[],null,["On devices running Android 10 (API level 29) and higher you can tell the platform to run\nembedded DEX code directly from your app's APK file. This option can help\nprevent an attack if an attacker ever managed to tamper with the locally\ncompiled code on the device.\n| **Note:** Enabling this feature could possibly affect your app's performance because ART must use the [JIT compiler](https://source.android.com/devices/tech/dalvik/jit-compiler) when the app is started (instead of reading native code that was compiled ahead of time). We recommend testing your app's performance before you decide whether or not to enable this feature in your published apps.\n\nIf you're using the Gradle build system, to enable this feature do the\nfollowing:\n\n- Set the `android::useEmbeddedDex` attribute to\n `true` in the\n [\u003capplication\u003e](/guide/topics/manifest/application-element)\n element of your app's manifest file.\n\n- Set `useLegacyPackaging` to `false` in the\n module-level `build.gradle.kts` file (`build.gradle`\n file if you're using Groovy).\n\n **Note:** Don't set the `useLegacyPackaging` option if you're using a version of AGP lower than 4.2. \n\n Kotlin \n\n ```kotlin\n packagingOptions {\n dex {\n useLegacyPackaging = false\n }\n }\n \n ```\n\n Groovy \n\n ```groovy\n packagingOptions {\n dex {\n useLegacyPackaging false\n }\n }\n \n ```\n\nIf you're using the Bazel build system, to enable this feature set the\n`android:useEmbeddedDex` attribute to `true` in the `\u003capplication\u003e` element of\nyour app's manifest file and leave DEX files uncompressed: \n\n```\nandroid_binary(\n ...\n nocompress_extensions = [\".dex\"],\n)\n```\n\nRecommended for you\n\n- Note: link text is displayed when JavaScript is off\n- [Tapjacking](/topic/security/risks/tapjacking)\n- [android:exported](/topic/security/risks/android-exported)\n- [# Key management {:#key-management}](/topic/security/data)"]]