Troubleshooting | Appodeal Intelligent Ad Mediation

Integration process in eclipse

1. Integration process in eclipse

Eclipse adroid native 1

2. In context menu select Import...

Eclipse adroid native 2

3. In the window that opens, select General/File System and click Next

Eclipse adroid native 3

4. Click Browse ... button and specify path of jar files. Place a checkmark next to all libraries (applovin-sdk, appodeal, chartboost, my-target, unity-ads). Click Finish button.

Eclipse adroid native 4

5. Right-click on your project, in context menu select choose Build Path -> Configure Build Path

Eclipse adroid native 5

6. In the window that opens, select the Libraries tab, then click button Add JARs...

Eclipse adroid native 6

7. Expand structure of your project, navigate to the folder libs and select all necessary jar files. Click Ok button.

Eclipse adroid native 7


If you do not want to specify in your application

<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />

then you must call the following method before initializing:


But these two are to be used:

<uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

as they are used by many networks.

If you receive an error message:

then maybe you have the old Google Play Services

Try updating the android SDK and Google Play Services through the SDK Manager.

Ads are not displaying after integration

The problem may be in case if you try to show an ad immediately after initialization. Please note, that it takes some time to load an advertisment.

To show ads right after loading use this approach:

Appodeal.setAutoCache(Appodeal.INTERSTITIAL, false); Appodeal.initialize(this, appKey, Appodeal.INTERSTITIAL); Appodeal.cache(this, Appodeal.INTERSTITIAL); Appodeal.setInterstitialCallbacks(new InterstitialCallbacks() { public void onInterstitialLoaded(boolean isPrecache) {, Appodeal.INTERSTITIAL); } public void onInterstitialFailedToLoad() { } public void onInterstitialShown() { } public void onInterstitialClicked() { } public void onInterstitialClosed() { } });

And use

Message "dontskipnonpubliclibraryclassmembers"

If you see a message "dontskipnonpubliclibraryclassmembers" it may indicate that not all settings were made in the Proguard.

Add the following to your Proguard config file:

-keep class com.appodeal.** { *; } -keep class** { *; } -keep class com.mopub.** { *; } -keep class com.facebook.** { *; } -keep class org.nexage.** { *; } -keep class com.applovin.** { *; } -keep class com.chartboost.** { *; } -keep class** { *; } -keep class com.applifier.** { *; } -keep class** { *; } -keep class com.inmobi.** { *; } -keep class** { *; } -keep class** { *; } -keep class net.pubnative.** { *; } -keep class org.droidparts.** { *; } -keep class** { *; } -keep class { *; } -keepattributes Signature -keep class * extends java.util.ListResourceBundle { protected Object[][] getContents(); } -keep public class { public static final *** NULL; } -keepnames class * -keepclassmembernames class * { *; } -keepnames class * implements android.os.Parcelable { public static final ** CREATOR; } -dontwarn com.facebook.** -dontwarn com.jirbo.adcolony.** -dontwarn com.vungle.** -dontwarn com.startapp.** -dontwarn** -dontwarn com.inmobi.** -dontwarn com.chartboost.** -dontwarn com.avocarrot.** -dontwarn com.flurry.** -dontwarn net.pubnative.** -dontwarn org.droidparts.** -keep class { *; } -keep class { *; } -keep class { *; } -keep class { *; } -keep class { *; } -keep class { *; } -keep class { *; } -keep class { *; } -keep class { *; } -keep class { *; }
Runtime Classes Loading/ Dex 65536 Problem Resolving Android Native

Important Note: Minimum Android API level for this method is 14.

Dex Preparation

Copy all libraries (classes) that you want include to *.dex to some folder, name it as you want, place it in some folder.

Run console

Important note: %ANDROID_SDK_PATH%\build-tools\%VERSION% must be added to system path variable in other case please use full path to dx/dx.bat file.

For Windows run following commands in cmd/Cygwin:

$ cd “path/to/your/folder” $ dx.bat --dex --output=classes.dex .

For OS X run following commands in console:

$ cd “path/to/your/folder” $ dx --dex --output=classes.dex .

This will generate classes.dex in the same folder.

Android Native Usage

Download AppodealDinamicDex.jar library, add it to your project libs folder.

Connect usual libraries to project as provided:

Android Studio: open module settings go to dependensies and change scope to provided.

Eclipse: You could do this by going to Project > Properties > Java Build Path > Libraries and then add that jar as an external jar.

Copy your generated *.dex file or files to assets folder. (generated Appodeal.dex)

Add following code to your activities onCreate:

String[] DEX_FILES = {"classes.dex"}; LoadDex.instance().loadDex(this, DEX_FILES);

Note that you can put there multiple dex files, for example:

String[] DEX_FILES = {"classes1.dex", "classes2.dex"}; LoadDex.instance().loadDex(this, DEX_FILES);

Now you can call your code as do it before.

Eclipse Sample Project with Appodeal.dex