AdMob Ads not showing with MobFox SDK in signed APK
When I run my app from within Eclipse, all works brilliantly. Ads show up and refresh without any issues. (I've integrated the MobFox SDK and am receiving AdMob and MobFox ads via it.
However, when I sign my app with my private keystore and export it, then install the APK onto my device, AdMob ads do not appear to.....well, appear.
Am I missing something? I've re-tested by running it directly from Eclipse, and once again, it works from there.
Is there something in my code that I need to change before exporting or perhaps it's something to do with the keystore (I was previously using the debug keystore to test my Google Play Game Services).
Would appreciate any thoughts as I'm not really sure what I'm missing here.
It was Proguard causing the problem!
If anyone out there is using MobFox as their Ad Network, the following should be added to your proguard-project.txt (This information doesn't seem to appear in their intergration instructions at time of writing).
-keep class com.adsdk.** { *; }
-keep class com.adsdk.sdk.** { *;
-keep class com.adsdk.sdk.video.** { *; }
-keep class com.mobfox.** { *; }
-keep class com.mobfox.adapter.** {*;}
-keep class com.mobfox.sdk.** {*;}
-keep class com.mobfox.sdk.data.** {*;}
-keep class com.mobfox.video.** {*;}
Did you create a new client id for the production version of your app? If you were testing with the debug version then the SHA1 key will be different with your signed application since you used your own keystore.
In the google API console just create a new client id with the SHA1 key from the keystore you used to sign your application.
链接地址: http://www.djcxy.com/p/32292.html上一篇: iAd Admob中介初学者