The Android development environment requires the use of Gradle and Gradle plugin. There is a corresponding relationship between the two. If they do not correspond, an error will be reported
Banner ads: Make sure that the width-to-height ratio passed in when the ad is loaded is consistent with the ad. The proportion of advertising spaces on the platform is consistent
Native advertising: It is necessary to ensure that the width and height passed in when the ad is loaded and displayed are consistent, and the ratio is close to the advertising platform template. (You can check the width-to-height ratio of the advertising templates in the background of the advertising platform, and remove templates with large width-to-height ratio differences to ensure that the width-to-height ratios of ads issued by the advertising platform are close)
You need to refer to the Android SDK import document to adapt to Android 9 and above systems
(1) New in AndroidManifest Add the following configuration:
<application>
...
<uses-library android:name="org.apache.http.legacy" android:required="false"/>
...
</application>(2)(Required only when using domestic SDK) Compatible with some third-party advertising SDKs, Http requests exist in the application tag of AndroidManifest Added: android:networkSecurityConfig configuration:
<application
...
android:networkSecurityConfig="@xml/network_security_config"
...
>
...
</application>Add network_security_config.xml in the res/xml folder of the project, with the following content:
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<base-config cleartextTrafficPermitted="true" />
</network-security-config>Note: If there are the following configurations in network_security_config.xml, it may cause adaptation failure
<domain-config cleartextTrafficPermitted="true">
<domain includeSubdomains="true">xxxxxx</domain>
</domain-config>1. Check the configuration of the advertising source in the TopOn background (open the log of the SDK, and you can see the advertising source parameters configured in the TopOn background through the networkUnit field, and follow the advertising platform Check whether the background configuration comparison is consistent)
2. Check whether there is logic in the code to initialize the advertising platform SDK separately (initializing two different appids at the same time in the project will There will be problems, just make sure to initialize the same appId)
3. Check whether the test mode of the background advertising space is turned on (because the appId of the test mode is different from the developer The appIds of the advertising sources are different. Problems will occur if two different appIds are initialized at the same time in the project. Close the test mode of the TopOn background and try again)
4. Check Whether the open-screen advertisement uses the ATMediationRequestInfo instance and the wrong application and advertising space parameters are passed in (passing in errors will cause the wrong ID to be used to initialize the SDK of the advertising platform)
Change android in Application in AndroidManifest :taskAffinityConfiguration removal
TopOn SDK error For code and FAQ guidelines, please refer to:
| System platform | Description |
|---|---|
| TopOn iOS SDK | View |
| TopOn Android SDK | View |