Boa noite
Estou tentando colocar um banner em meu sistema e ta dando o seguinte erro:
07-28 20:30:51.720: E/Ads(306): The android:configChanges value of the com.google.ads.AdActivity must include uiMode.
07-28 20:30:51.720: E/Ads(306): The android:configChanges value of the com.google.ads.AdActivity must include screenSize.
07-28 20:30:51.720: E/Ads(306): The android:configChanges value of the com.google.ads.AdActivity must include smallestScreenSize.
07-28 20:30:51.720: E/Ads(306): You must have AdActivity declared in AndroidManifest.xml with configChanges.
Declaracao da activity no Manifest.xml:
<activity android:name="com.google.ads.AdActivity" android:configChanges="keyboard|keyboardHidden|orientation"/>
Na activity:
LinearLayout adMobLayout = (LinearLayout)findViewById(R.id.adMob);
AdView adView = new AdView(this, AdSize.BANNER, "XXXX");
adMobLayout.addView(adView);
AdRequest request = new AdRequest();
adView.loadAd(request);
No xml da tela:
<LinearLayout android:id="@+id/adMob" android:layout_width="fill_parent" android:layout_height="wrap_content" />
Quando rodo o programa, acontece o erro acima e onde deveria ficar o banner aparece:
You must have AdActivity declared in AndroidManifest.xml with configChanges.
Pesquisando no google achei que deve ser declarado no Manifest.xml dessa forma
<activity android:name="com.google.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"></activity>
No entanto qdo coloco dessa forma, dá esse erro no Manifest.xml
error: Error: String types not allowed (at 'configChanges' with value 'keyboard|keyboardHidden|orientation|
screenLayout|uiMode|screenSize|smallestScreenSize').
Sobre esse erro no google dizia que deveria alterar o arquivo
project.properties e colocar
target=android-13
Mas isso nao quer dizer android 4?
e qdo faco essa alteracao da erro na activity, ele nao reconhece nada relacionado a api do android
Alguem pode me ajudar?
Paulo Henrique Peres
Oracle Certified Professional, Java Programmer
Oracle Certified Professional, Web Component Developer
0 comentários:
Postar um comentário