Yes the app crashes Op maandag 22 februari 2016 23:44:39 UTC schreef TreKing: > > Did you have a question? > > On Mon, Feb 22, 2016 at 6:43 AM, Krys Penhoat <[email protected] > <javascript:>> wrote: > >> So I've got a problem with Admob in combination with a icon template I'm >> using. >> This is the template in GitHub: >> https://github.com/architjn/MaterialIconPackTemplate >> >> >> I've created a clean app in Android studio to test out if I just did >> something wrong in general with admob, but that wasn't the case. That app >> worked just fine with ads. So the issue lies somewhere with the template >> (which works fine without admob) >> >> So my guess is that it is related to the fact that there is no >> MainActivity.java in this template. Could use all the help >> >> >>> >>> compile 'com.google.android.gms:play-services:8.4.0' >> >> >> **to build.gradle** >> >> <uses-permission android:name="android.permission.INTERNET"/> >>> <uses-permission >>> android:name="android.permission.ACCESS_NETWORK_STATE"/> >>> <meta-data android:name="com.google.android.gms.version" >>> android:value="@integer/google_play_services_version" /> >>> <activity android:name="com.google.android.gms.ads.AdActivity" >>> >>> android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" >>> android:theme="@android:style/Theme.Translucent" /> >> >> >> **to androidmanifest.xml** >> >> >> <com.google.android.gms.ads.AdView >>> android:id="@+id/adView" >>> android:layout_width="wrap_content" >>> android:layout_height="wrap_content" >>> android:layout_centerHorizontal="true" >>> android:layout_alignParentBottom="true" >>> ads:adSize="BANNER" >>> ads:adUnitId="@string/banner_ad_unit_id"> >>> </com.google.android.gms.ads.AdView> >> >> >> xmlns:ads="http://schemas.android.com/apk/res-auto" >> >> >> **to activity_main.xml** >> >> >>> >>> <string name="banner_ad_unit_id">ca-app-pub-00000000000</string> >> >> >> **to my strings file** >> >> And now comes the tricky part. Considering there was no >> mainactivity.java, I added this to HomeActivity.java. However I feel like >> this is where the issue lies, it's not in a similar place in the project >> either, however this is the activity that contains all the other code >> >> AdView mAdView = (AdView) findViewById(R.id.adView); >>> AdRequest adRequest = new AdRequest.Builder().build(); >>> mAdView.loadAd(adRequest); >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Android Developers" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected] <javascript:>. >> To post to this group, send email to [email protected] >> <javascript:>. >> Visit this group at https://groups.google.com/group/android-developers. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/android-developers/166e16a3-3422-4652-981f-39a2bab5d787%40googlegroups.com >> >> <https://groups.google.com/d/msgid/android-developers/166e16a3-3422-4652-981f-39a2bab5d787%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > > > > -- > > > ------------------------------------------------------------------------------------------------- > TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago > transit tracking app for Android-powered devices >
-- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/android-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/android-developers/8a3d4b6d-37ba-42c4-abf7-c85c14070717%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.

