12-07 23:27:28.856 1715-1715/? W/dex2oat: Compilation of void com.google.android.ads.zxxz.a.<init>() took 812.350ms
12-07 23:27:28.926 1667-1679/? I/art: Background partial concurrent mark sweep GC freed 2941(143KB) AllocSpace objects, 0(0B) LOS objects, 39% free, 3MB/6MB, paused 12.169ms total 199.192ms
12-07 23:27:28.993 1715-1715/? W/dex2oat: Compilation of int com.google.android.ads.zxxz.a.a(android.content.Context) took 136.555ms
12-07 23:27:29.307 1715-1715/? I/dex2oat: dex2oat took 1.883s (threads: 1) arena alloc=39KB java alloc=12KB native alloc=458KB free=3MB
12-07 23:27:29.772 1667-1679/? I/art: Background sticky concurrent mark sweep GC freed 8564(541KB) AllocSpace objects, 18(560KB) LOS objects, 13% free, 5MB/6MB, paused 5.421ms total 169.146ms
12-07 23:27:29.969 1667-1727/? W/GooglePlayServicesUtil: Google Play services out of date. Requires 8115000 but found 6774430
12-07 23:27:29.981 1667-1727/? E/GooglePlayServicesUtil: GooglePlayServices not available due to error 2
12-07 23:27:30.030 1667-1728/? W/GooglePlayServicesUtil: Google Play services out of date. Requires 8115000 but found 6774430
12-07 23:27:30.046 1667-1728/? E/GooglePlayServicesUtil: GooglePlayServices not available due to error 2
12-07 23:27:31.047 1667-1679/? I/art: Background partial concurrent mark sweep GC freed 3535(296KB) AllocSpace objects, 15(631KB) LOS objects, 39% free, 5MB/9MB, paused 4.880ms total 135.956ms
12-07 23:27:33.099 1667-1731/? I/Ads: Not on service, return
12-07 23:27:33.127 1667-1732/? I/Ads: Not on service, return
12-07 23:27:33.235 1667-1679/? I/art: Background sticky concurrent mark sweep GC freed 10582(805KB) AllocSpace objects, 31(960KB) LOS objects, 15% free, 8MB/9MB, paused 5.704ms total 111.054ms
12-07 23:27:33.540 1667-1667/? W/chromium: [WARNING:data_reduction_proxy_settings.cc(331)] SPDY proxy OFF at startup
12-07 23:27:33.637 1667-1667/? W/art: Attempt to remove local handle scope entry from IRT, ignoring
12-07 23:27:33.687 1667-1667/? W/AwContents: onDetachedFromWindow called when already detached. Ignoring
12-07 23:27:33.759 1667-1667/? W/art: Attempt to remove local handle scope entry from IRT, ignoring
12-07 23:27:33.760 1667-1667/? W/art: Attempt to remove local handle scope entry from IRT, ignoring
12-07 23:27:34.773 1667-1667/? W/art: Attempt to remove local handle scope entry from IRT, ignoring
12-07 23:27:34.798 1667-1667/? W/AwContents: onDetachedFromWindow called when already detached. Ignoring
12-07 23:27:34.863 1667-1667/? W/art: Attempt to remove local handle scope entry from IRT, ignoring
12-07 23:27:34.863 1667-1667/? W/art: Attempt to remove local handle scope entry from IRT, ignoring
12-07 23:27:37.363 1667-1667/? I/chromium: [INFO:CONSOLE(0)] "Document was loaded from Application Cache with manifest https://googleads.g.doubleclick.net/mads/static/mad/sdk/native/sdk-core-v40.appcache", source: https://googleads.g.doubleclick.net/mads/static/mad/sdk/native/sdk-core-v40.html (0)
12-07 23:27:37.386 1667-1667/? I/chromium: [INFO:CONSOLE(0)] "Application Cache Checking event", source: https://googleads.g.doubleclick.net/mads/static/mad/sdk/native/sdk-core-v40.html (0)
12-07 23:27:38.685 1667-1679/? I/art: Background sticky concurrent mark sweep GC freed 11420(701KB) AllocSpace objects, 3(64KB) LOS objects, 6% free, 9MB/9MB, paused 4.324ms total 352.051ms
12-07 23:27:41.639 1667-1667/? I/chromium: [INFO:CONSOLE(0)] "Document was loaded from Application Cache with manifest https://googleads.g.doubleclick.net/mads/static/mad/sdk/native/sdk-core-v40.appcache", source: https://googleads.g.doubleclick.net/mads/static/mad/sdk/native/sdk-core-v40.html (0)
12-07 23:27:41.657 1667-1667/? I/chromium: [INFO:CONSOLE(0)] "Application Cache Checking event", source: https://googleads.g.doubleclick.net/mads/static/mad/sdk/native/sdk-core-v40.html (0)
12-07 23:27:41.837 1667-1667/? I/chromium: [INFO:CONSOLE(0)] "Application Cache NoUpdate event", source: https://googleads.g.doubleclick.net/mads/static/mad/sdk/native/sdk-core-v40.html (0)
12-07 23:27:41.844 1667-1667/? I/chromium: [INFO:CONSOLE(0)] "Application Cache NoUpdate event", source: https://googleads.g.doubleclick.net/mads/static/mad/sdk/native/sdk-core-v40.html (0)
12-07 23:27:42.275 1667-1679/? I/art: Background sticky concurrent mark sweep GC freed 5532(337KB) AllocSpace objects, 1(32KB) LOS objects, 4% free, 9MB/9MB, paused 3.745ms total 140.653ms
12-07 23:27:43.381 1667-1732/? W/Ads: There was a problem getting an ad response. ErrorCode: 0
12-07 23:27:43.387 1667-1667/? W/Ads: Failed to load ad: 0
12-07 23:27:45.625 1667-1679/? W/art: Suspending all threads took: 249.850ms <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="0dp"
android:paddingRight="0dp"
android:paddingTop="0dp"
android:paddingBottom="0dp"
xmlns:ads="http://schemas.android.com/apk/res-auto"
android:orientation="vertical">
<GridView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:ads="http://schemas.android.com/apk/res-auto"
android:id="@+id/grid"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:numColumns="1"
android:padding="8dp"
android:horizontalSpacing="8dp"
android:clipToPadding="true"
android:verticalSpacing="8dp"
android:scrollbarStyle="outsideOverlay"
android:layout_above="@+id/adView" >
</GridView>
<com.google.android.gms.ads.AdView
android:id="@+id/adView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
ads:adSize="BANNER"
ads:adUnitId="@string/banner_ad_unit_id"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true">
</com.google.android.gms.ads.AdView>
</RelativeLayout> <?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:ads="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:textAppearance="?android:attr/textAppearanceLarge"
android:id="@+id/textView"
android:textColor="#304f9f"
android:textColorHighlight="#304f9f"
android:textStyle="bold"
android:textSize="15sp"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"/>
<ViewFlipper
android:id="@+id/viewFlipper"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/textView"
>
<ImageView
android:id="@+id/image1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:adjustViewBounds="true"
>
</ImageView>
<ImageView
android:id="@+id/image2"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:adjustViewBounds="true"
>
</ImageView>
<ImageView
android:id="@+id/image3"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:adjustViewBounds="true"
>
</ImageView>
<ImageView
android:id="@+id/image4"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:adjustViewBounds="true"
>
</ImageView>
<ImageView
android:id="@+id/image5"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:adjustViewBounds="true"
>
</ImageView>
<ImageView
android:id="@+id/image6"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:adjustViewBounds="true"
>
</ImageView>
<ImageView
android:id="@+id/image7"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:adjustViewBounds="true"
>
</ImageView>
<ImageView
android:id="@+id/image8"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:adjustViewBounds="true"
>
</ImageView>
<ImageView
android:id="@+id/image9"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:adjustViewBounds="true"
>
</ImageView>
<ImageView
android:id="@+id/image10"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:adjustViewBounds="true"
>
</ImageView>
<ImageView
android:id="@+id/image11"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:adjustViewBounds="true"
>
</ImageView>
<ImageView
android:id="@+id/image12"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:adjustViewBounds="true"
>
</ImageView>
<ImageView
android:id="@+id/image13"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:adjustViewBounds="true"
>
</ImageView>
<ImageView
android:id="@+id/image14"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:adjustViewBounds="true"
>
</ImageView>
<ImageView
android:id="@+id/image15"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:adjustViewBounds="true"
>
</ImageView>
</ViewFlipper>
</RelativeLayout>
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
position = getArguments().getInt(ARG_POSITION);
super.onViewCreated(view, savedInstanceState);
mGridView = (GridView) view.findViewById( R.id.grid );
mGridView.setOnItemClickListener( this );
mGridView.setDrawSelectorOnTop( true );
AdView mAdView = (AdView) view.findViewById(R.id.adView);
//AdRequest adRequest = new AdRequest.Builder().build();
//AdRequest adRequest = new
AdRequest request = new AdRequest.Builder()
.addTestDevice(AdRequest.DEVICE_ID_EMULATOR)
.build();
mAdView.loadAd(request);
} <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.invensini.newhindisongs" >
<uses-feature
android:glEsVersion="0x00020000"
android:required="true" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<application
android:allowBackup="true"
android:hardwareAccelerated="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme"
android:logo="@drawable/baricon"
tools:replace="icon" >
<activity
android:name=".activities.MainActivity"
android:label="@string/app_name"
android:launchMode="singleTop" >
</activity>
<activity
android:name=".activities.TextTutorials"
android:parentActivityName=".activities.MainActivity"
android:screenOrientation="portrait" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".activities.MainActivity" />
</activity>
<activity
android:name=".activities.GalleryDetailActivity"
android:parentActivityName=".activities.MainActivity" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".activities.MainActivity" />
</activity>
<activity
android:name=".activities.webView"
android:hardwareAccelerated="true"
android:label="@string/title_activity_web_view"
android:parentActivityName=".activities.MainActivity" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".activities.MainActivity" />
</activity>
<activity
android:name=".activities.AboutUs"
android:label="@string/title_activity_about_us"
android:parentActivityName=".activities.MainActivity" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".activities.MainActivity" />
</activity>
<activity
android:name=".activities.RateUs"
android:label="@string/title_activity_rate_us" >
</activity>
<activity
android:name=".activities.PlayListActivity"
android:label="@string/title_activity_play_list"
android:parentActivityName=".activities.MainActivity" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".activities.MainActivity" />
</activity>
<activity
android:name=".activities.SplashScreen"
android:label="@string/title_activity_splash_screen" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".activities.TrendingActivity"
android:label="@string/title_activity_trending"
android:parentActivityName=".activities.MainActivity" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".activities.MainActivity" />
</activity>
<activity
android:name=".activities.PrivacyPolicy"
android:label="@string/title_activity_privacy_policy"
android:parentActivityName=".activities.MainActivity" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".activities.MainActivity" />
</activity>
<activity
android:name=".activities.Terms"
android:label="@string/title_activity_terms"
android:parentActivityName=".activities.MainActivity" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value=".activities.MainActivity" />
</activity>
<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" />
</application>
</manifest compile 'com.android.support:appcompat-v7:21.0.3'
compile 'com.google.android.gms:play-services-ads:8.1.0' compile 'com.google.android.gms:play-services-ads:8.3.0'...
<ViewFlipper
android:id="@+id/viewflipper"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_margin="6dp" >
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="center"
android:orientation="vertical" >
<ImageView
android:id="@+id/imageView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<com.google.android.gms.ads.AdView
android:id="@+id/adView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
ads:adSize="BANNER"
ads:adUnitId="@string/banner_ad_unit_id">
</com.google.android.gms.ads.AdView>
<ImageView
android:id="@+id/imageView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="center"
android:orientation="vertical" >
<ImageView
android:id="@+id/imageView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<com.google.android.gms.ads.AdView
android:id="@+id/adView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
ads:adSize="BANNER"
ads:adUnitId="@string/banner_ad_unit_id">
</com.google.android.gms.ads.AdView>
<ImageView
android:id="@+id/imageView4"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</LinearLayout>
</ViewFlipper>@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
viewFlipper = (ViewFlipper) findViewById(R.id.viewflipper);
AdView mAdView1 = (AdView) findViewById(R.id.adView1);
AdRequest adRequest1 = new AdRequest.Builder().build();
mAdView1.loadAd(adRequest1);
AdView mAdView2 = (AdView) findViewById(R.id.adView2);
AdRequest adRequest2 = new AdRequest.Builder().build();
mAdView2.loadAd(adRequest2);
}...
activity_trending_fragment:-<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:ads="http://schemas.android.com/apk/res-auto"
tools:context="com.invensini.funnyvideos.fragments.TrendingFragment"
>
<GridView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:ads="http://schemas.android.com/apk/res-auto"
android:id="@+id/grid"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:numColumns="1"
android:verticalSpacing="8dp"
android:horizontalSpacing="8dp"
android:padding="8dp"
android:scrollbarStyle="outsideOverlay"
android:clipToPadding="true">
</GridView>
<com.google.android.gms.ads.AdView
android:id="@+id/adView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
ads:adSize="BANNER"
ads:adUnitId="@string/banner_ad_unit_id"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true">
</com.google.android.gms.ads.AdView>
</RelativeLayout>
CommonFragment.java:-
@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
mGridView = (GridView) view.findViewById( R.id.grid );
mGridView.setOnItemClickListener( this );
mGridView.setOnItemLongClickListener(this);
mGridView.setDrawSelectorOnTop( true );
AdView mAdView = (AdView) view.findViewById(R.id.adView);
AdRequest adRequest = new AdRequest.Builder().build();
mAdView.loadAd(adRequest);
}
pager = (ViewPager) findViewById(R.id.viewpager);
slidingTabLayout = (SlidingTabLayout) findViewById(R.id.sliding_tabs);
pager.setAdapter(new ViewPagerAdapter(getSupportFragmentManager(), titles));
pager.addOnPageChangeListener(new ViewPager.OnPageChangeListener() {
@Override
public void onPageSelected(int position) {
if (position == 0) {
getSupportFragmentManager().beginTransaction().replace( R.id.container, GalleryFragment.getInstance(position) ).commit();
}else if (position == 1){
getSupportFragmentManager().beginTransaction().replace( R.id.container, TextTutorialFragment.getInstance(position) ).commit();
}else if (position == 2) {
getSupportFragmentManager().beginTransaction().replace( R.id.container, CommonFragment.getInstance("path_to_json1") ).commit();
} else if (position == 3) {
getSupportFragmentManager().beginTransaction().replace( R.id.container, CommonFragment.getInstance("path_to_json2") ).commit();
} else if (position == 4) {
getSupportFragmentManager().beginTransaction().replace( R.id.container, CommonFragment.getInstance("path_to_json3") ).commit();
}else if (position == 5) {
getSupportFragmentManager().beginTransaction().replace( R.id.container, CommonFragment.getInstance("path_to_json4") ).commit();
}else if (position == 6) {
getSupportFragmentManager().beginTransaction().replace( R.id.container, CommonFragment.getInstance("path_to_json5") ).commit();
}else if (position == 7) {
getSupportFragmentManager().beginTransaction().replace( R.id.container, CommonFragment.getInstance(""path_to_json6") ).commit();
}
else{
getSupportFragmentManager().beginTransaction().replace( R.id.container, GalleryFragment.getInstance(position) ).commit();
}
}
public class CommonAdapter extends ArrayAdapter<CommonData> {
CommonFragment lfg;
public CommonAdapter(Context context, int resource, CommonFragment fg) {
super(context, resource);
lfg = fg;
}
//hover image
private BlurLayout mSampleLayout, mSampleLayout2, mSampleLayout3, mSampleLayout4;
@Override
public View getView(int position, View convertView, ViewGroup parent) {
ViewHolder holder;
if( convertView == null ) {
holder = new ViewHolder();
convertView = LayoutInflater.from( getContext() ).inflate( R.layout.activity_trending_adapter, parent, false );
holder.image = (ImageView) convertView.findViewById( R.id.image );
holder.caption=(TextView) convertView.findViewById(R.id.textView);
convertView.setTag(holder);
} else {
holder = (ViewHolder) convertView.getTag();
}
final ViewHolder tmp = holder;
Picasso.with(getContext()).load(getItem(position).getBgImage())
.placeholder(getContext().getResources().getDrawable(R.drawable.place)).
error(getContext().getResources().getDrawable(R.drawable.place)).
into(holder.image);
return convertView;
}
private class ViewHolder {
ImageView image;
ProgressBar progress;
TextView caption;
}
}
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:ads="http://schemas.android.com/apk/res-auto"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:id="@+id/image"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:adjustViewBounds="true"
android:layout_below="@+id/textView"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true">
</ImageView>
</RelativeLayout>
Here also ad is not displaying with same logcat logs. I am still suspecting the layout file.
Priyanka Roy.
...
Hi Veer,