googleads / googleads-mobile-android-native-templates

Apache License 2.0
116 stars 102 forks source link

error: incompatible types: NativeAd cannot be converted to UnifiedNativeAd #18

Closed veby91 closed 10 months ago

veby91 commented 3 years ago

I use latest sdk version 19.7.0 and i got this error when build:

error: incompatible types: NativeAd cannot be converted to UnifiedNativeAd

msiejak commented 3 years ago

I resolved this issue in resolved in #17

ash-vaish commented 3 years ago

Issue not resolved yet.

FonzTech commented 3 years ago

Issue not resolved yet.

Follow these steps to clone the #17 : git clone https://github.com/googleads/googleads-mobile-android-native-templates.git cd googleads-mobile-android-native-templates git remote add msiejak https://github.com/googleads/googleads-mobile-android-native-templates.git git fetch origin pull/17/head:pull_17 git checkout pull_17

ameerhamza6733 commented 3 years ago

i am getting this error after pulling this #17

:layout/gnt_medium_template_view: Can't convert value at index 4 to dimension: type=0x4 Caused by: java.lang.UnsupportedOperationException: Can't convert value at index 4 to dimension: type=0x4 at android.content.res.TypedArray.getDimensionPixelSize(TypedArray.java:788) at android.view.ViewGroup$MarginLayoutParams.<init>(ViewGroup.java:8336) at androidx.constraintlayout.widget.ConstraintLayout$LayoutParams.<init>(ConstraintLayout.java:2691) at androidx.constraintlayout.widget.ConstraintLayout.generateLayoutParams(ConstraintLayout.java:1916) 2021-04-29 10:48:39.969 30709-30709/com.ameerhamza6733.directmessagesaveandrepost E/AndroidRuntime: at androidx.constraintlayout.widget.ConstraintLayout.generateLayoutParams(ConstraintLayout.java:482) at android.view.LayoutInflater.rInflate(LayoutInflater.java:1146) at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1105) at android.view.LayoutInflater.rInflate(LayoutInflater.java:1147) at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1105) at android.view.LayoutInflater.rInflate(LayoutInflater.java:1147) at android.view.LayoutInflater.inflate(LayoutInflater.java:660) at android.view.LayoutInflater.inflate(LayoutInflater.java:538) at android.view.LayoutInflater.inflate(LayoutInflater.java:481) at com.google.android.ads.nativetemplates.TemplateView.initView(TemplateView.java:281) at com.google.android.ads.nativetemplates.TemplateView.<init>(TemplateView.java:63) at java.lang.reflect.Constructor.newInstance0(Native Method) at java.lang.reflect.Constructor.newInstance(Constructor.java:343) at android.view.LayoutInflater.createView(LayoutInflater.java:858) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:1014) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:965) at android.view.LayoutInflater.rInflate(LayoutInflater.java:1144) at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1105) at android.view.LayoutInflater.rInflate(LayoutInflater.java:1147) at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1105) at android.view.LayoutInflater.rInflate(LayoutInflater.java:1147) at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1105) at android.view.LayoutInflater.rInflate(LayoutInflater.java:1147) at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1105) at android.view.LayoutInflater.rInflate(LayoutInflater.java:1147) at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1105) at android.view.LayoutInflater.inflate(LayoutInflater.java:686) at android.view.LayoutInflater.inflate(LayoutInflater.java:538)

brokenheart2020 commented 2 years ago

incompatible types: UnifiedNativeAd cannot be converted to NativeAd

JillSong commented 10 months ago

Obsolete. UnifiedNativeAd was deprecated and deleted. Please update to the lastest GMA SDK.