Generating APK with support for proxying into network traffic
このコンテンツはまだ日本語訳がありません。
The AppLovin team may request a debuggable APK that can proxy into networking traffic by using Android’s Network Security Configuration feature.
These instructions show you how to create such an APK:
- If you have not already done so, create a new XML file:
res/xml/network_security_config.xml. - In your application manifest
AndroidManifest.xml, add the configuration to yourapplicationattribute:<manifest><application android:networkSecurityConfig="@xml/network_security_config">⋮</application></manifest> - In the
res/xml/network_security_config.xmlfile, add the following:<network-security-config><debug-overrides><trust-anchors><certificates src="system" /><certificates src="user" /></trust-anchors></debug-overrides></network-security-config> - Create a debug build.
- Build with a debug configuration.
Unity
Unity deprecated the use of res folders in the Assets/Plugins/Android directory.
These instuctions show you how to create a debuggable APK with proxy support when you use Unity to develop your application:
- Create an Android Library by creating a new folder
Assets/Plugins/Android/«name-of-your-library».androidlib. - Create an
AndroidManifest.xmlfile inAssets/Plugins/Android/«name-of-your-library».androidlib/, and add the following to that file:<?xml version="1.0" encoding="utf-8"?><manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.android.library.network.security"><application android:networkSecurityConfig="@xml/network_security_config" /></manifest> - Create a new
project.propertiesfile inAssets/Plugins/Android/«name-of-your-library».androidlib/with the following contents:target=android-31android.library=true - If you have not already done so, create a new XML file,
network_security_config.xml, with the following contents:<network-security-config><debug-overrides><trust-anchors><certificates src="system" /><certificates src="user" /></trust-anchors></debug-overrides></network-security-config> - Move your
network_security_config.xmlfile into theAssets/Plugins/Android/«name-of-your-library».androidlib/res/xmlfolder. - Create a debug build.
- Select Development Build in Build Settings.
© 2025 AppLovin. All rights reserved.