I have done Google Play Services Migration tutorial https://developers.google.com/mobile-ads-sdk/docs/admob/play-migration
and all is ok, but when I create Adview it finish.
Here is my code:
import com.google.android.gms.ads.AdListener;
import com.google.android.gms.ads.AdRequest;
import com.google.android.gms.ads.AdSize;
import com.google.android.gms.ads.AdView;
private AdView adView;
RelativeLayout layoutPublicidadHueco;
.
.
.
layoutPublicidadHueco = (RelativeLayout) findViewById(R.id.layoutAdver);
AdView adView = new AdView(this);
adView.setAdUnitId("my number");
adView.setAdSize(AdSize.SMART_BANNER);
adView.setAdListener(new AdListener() {
public void onAdLoaded() {}
public void onAdFailedToLoad(int errorcode) {}
// Only implement methods you need.
});
layoutPublicidadHueco.removeAllViews();
layoutPublicidadHueco.addView(adView);
layoutPublicidadHueco.setVisibility(View.VISIBLE);
AdRequest request = new AdRequest.Builder().build();
adView.loadAd(request);
Thanks in advance.