9
When you install the plugin mopub
in the Android Studio you choose the type of banner ad and it gives you all the code to go pasting in the right place.
You perform works right appears in the test ad, then you go on the site and create the banner picks key and exchange that is in the program , ai testei on physical phone and advertising does not appear, has more configuration to do?
Error appeared in XML:
Rendering Problems The following classes could not be instantiated: - com.mopub.mobileads.Mopubview (Open Class, Show Exception, Clear Cache) Tip: Use View.isInEditMode() in your custom views to Skip code or show sample data when Shown in the IDE Exception Details java.lang.Nullpointerexception at android.webkit.Webviewfactory.getWebViewPackageName(Webviewfactory.java:78) at android.webkit.Webviewfactory.getFactoryClass(Webviewfactory.java:132) at android.webkit.Webviewfactory.getProvider(Webviewfactory.java:101) at android.webkit.Webviewdatabase.getInstance(Webviewdatabase.java:44) com.mopub.mobileads.MoPubView.(Mopubview.java:77) at java.lang.reflect.Constructor.newInstance(Constructor.java:422) at android.view.Layoutinflater.rInflate_Original(Layoutinflater.java:806) at android.view.Layoutinflater_delegate.rInflate(Layoutinflater_delegate.java:64) at android.view.Layoutinflater.rInflate(Layoutinflater.java:782) at android.view.Layoutinflater.rInflate_Original(Layoutinflater.java:809) at android.view.Layoutinflater_delegate.rInflate(Layoutinflater_delegate.java:64) at android.view.Layoutinflater.rInflate(Layoutinflater.java:782) at android.view.Layoutinflater.inflate(Layoutinflater.java:504) at android.view.Layoutinflater.inflate(Layoutinflater.java:385) Copy stack to Clipboard
logcat on mopub:
06-19 14:31:10.973 2319-2319/Nomedapeckage. D/Mopub Failed to Retrieve GPS Location: access appears to be disabled. 06-19 14:31:10.983 2319-2319/Nomedapeckage. D/Mopub Failed to Retrieve network Location: access appears to be disabled. 06-19 14:31:11.023
2319-2319/Namepapeckage. D/Mopub Loading url: http://ads.mopub.com/m/ad?v=6&id=My.Key&nv=3.8.0%2Bkit&Dn=Unknown%2Csdk%2Csdk&Bundle=Peckage name. &z=-0400&o=p&w=480&h=800&sc_a=1.5&mcc=310&mnc=260&iso=us&cn=Android&ct=3&av=1.1&udid=mp_tmpl_advertising_id&dnt=mp_tmpl_do_not_track&mr=1&android_perms_ext_storage=0 06-19 14:31:14.583 2319-2390/Nomedapeckage. D/Mopub Failed to Retrieve GPS Location: access appears to be disabled. 06-19 14:31:14.583 2319-2390/Nomedapeckage. D/Mopub Failed to Retrieve network Location: access appears to be disabled. 06-19 14:31:14.653
2319-2319/Nomedapeckage.lamath I/Mopub Ad failed to load. 06-19 14:31:14.653 2319-2319/Nomedapeckage. I/com.mopub Ad failed to load.
With test key works.
Does this have anything to do, the site seems to test, see the image below.
Androidmanifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="NomeDaPeckage"
android:versionCode="1"
android:versionName="1" >
<uses-sdk
android:minSdkVersion="11"
android:targetSdkVersion="19" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="NomeDaPeckage.Activity"
android:configChanges="orientation"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<meta-data
android:name="io.fabric.ApiKey"
android:value=" " />
<activity
android:name="com.mopub.mobileads.MoPubActivity"
android:configChanges="keyboardHidden|orientation|screenSize" />
<activity
android:name="com.mopub.mobileads.MraidActivity"
android:configChanges="keyboardHidden|orientation|screenSize" />
<activity
android:name="com.mopub.common.MoPubBrowser"
android:configChanges="keyboardHidden|orientation|screenSize" />
<activity
android:name="com.mopub.mobileads.MraidVideoPlayerActivity"
android:configChanges="keyboardHidden|orientation|screenSize" />
</application>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
</manifest>
Hello. Could you please search your logcat for any references with
MoPub
? Probably, some error is appearing while trying to initialize your ad– rsicarelli
If there was an error, it probably appeared on your logcat!
– rsicarelli
This error is a rendering problem in the preview of your layout. With your device connected, go to the tab
Android
in the footer of Android Studio, selectlogcat
and, in the search field, typeMoPub
. See if anything pops up– rsicarelli
is no longer running, this error appears
06-18 16:10:53.919 13727-13727/system_process E/cutils-trace﹕ Error opening trace file: No such file or directory (2)
– Vale
@sicachester of a look at the question put what appears in the logcat, funny change the key for the test key works .
– Vale
@sicachester I edited the question I added one more thing regarding the site, good requests (orders ) changes the value but the rest is 0 print clickis
– Vale
@sicachester can you help me?
– Vale
you can include your
AndroidManifest.xml
? I’m suspecting it’s some configuration missing– rsicarelli
@sicachester already edited the question and
AndroidManifest.xml
is there– Vale
Probably some "step" is missing in the configuration of Mopub. Follow these instructions https://github.com/mopub-android-sdk/wiki/Getting-Started
– rsicarelli
@sicachester I’m using android studio, the link you passed does not have for android studio, I’m kind of lost in this setting, because when I implemented I installed the plugin, it will appear there tab, you choose the type of banner or full screen there it already configures, if you just change the
androidManifest.xml
there are some things that get wrong.– Vale
who are
<activity android:name="com.google.android.gms.ads.AdActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" />
 <activity android:name="com.millennialmedia.android.MMActivity" android:theme="@android:style/Theme.Translucent.NoTitleBar" android:configChanges="keyboardHidden|orientation|keyboard" />
 <activity android:name="com.millennialmedia.android.VideoPlayer" android:configChanges="keyboardHidden|orientation|keyboard" />
– Vale
and more
<meta-data android:name="com.google.android.gms.version"
 android:value="@integer/google_play_services_version" />
– Vale
Try to remove the attribute
screenSize
of all theActivity
from your manifesto and try again– rsicarelli
didn’t work, mopub needs another linked ad network to work.
– Vale
@Rodolfo would like to know if the answer lacked something or did not work. Could you inform me?
– Guilherme Nascimento
I really couldn’t make it work
– Vale
@sicachester could inform me if
moPub
it is necessary to create an advertising network or it has its own advertisement?– Vale