Comments (9)
Had the same problem on Android 5.1 (maybe others too, did not test). Per @reiterp-avs comment above, I removed:
android:visibility="gone"
from the XML layout of the native ad, and I set the visibility as needed in Java code instead. This fixed the problem.
from audience-network.
Hi @Baobomb can you let us know more details about your problem?
Which SDK version are you using?
What is your inflate process?
If you can provide code snippets that you were able to reproduce the problem that would be great help!
Thanks
from audience-network.
SDK version : 4.25.0
It happend when try to inflate layout which include
MediaView.
from audience-network.
Happening on Android 4.x and 5.x devices using audience-network-sdk:4.26.0
. Not reproduced on v.4.23.0, looks like the issue was introduced in v.4.24.0.
from audience-network.
@Baobomb Do you set the MediaView visibility attribute in your layout? In case you do, maybe you can avoid the NPE by not setting it and set it at runtime, after the view is inflated.
from audience-network.
Hi @Baobomb @vmalykhin unfortunately we weren't able to reproduce the problem. Would you mind provide a sample project so we can try to reproduce the problem? Thanks!
from audience-network.
Hi, I have already reported the bug here https://developers.facebook.com/bugs/2003665309903654/ and the bug report includes sample.
from audience-network.
@phzhou @reiterp-avs Hi guys I'm also facing the same issue, app crashes while using SDK version above v.4.23.0.
The issue is currently experiencing on xiaomi devices that running on MiUi.
Other tested devices are working normally
android.view.InflateException: Binary XML file line #59: Binary XML file line #59: Error inflating class com.facebook.ads.MediaView
Caused by: android.view.InflateException: Binary XML file line #59: Error inflating class com.facebook.ads.MediaView
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Constructor.newInstance0(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:430)
at android.view.LayoutInflater.createView(LayoutInflater.java:652)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:812)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:752)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:883)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:846)
at android.view.LayoutInflater.inflate(LayoutInflater.java:522)
at android.view.LayoutInflater.inflate(LayoutInflater.java:430)
at me.timos.thuanle.fbnativeadadapter.FBNativeAdAdapterBig.onCreateAdViewHolder(FBNativeAdAdapterBig.java:141)
at me.timos.thuanle.fbnativeadadapter.FBNativeAdAdapterBig.onCreateViewHolder(FBNativeAdAdapterBig.java:149)
at android.support.v7.widget.RecyclerView$Adapter.createViewHolder(RecyclerView.java:6519)
at android.support.v7.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(RecyclerView.java:5706)
at android.support.v7.widget.GapWorker.prefetchPositionWithDeadline(GapWorker.java:285)
at android.support.v7.widget.GapWorker.flushTaskWithDeadline(GapWorker.java:342)
at android.support.v7.widget.GapWorker.flushTasksWithDeadline(GapWorker.java:358)
at android.support.v7.widget.GapWorker.prefetch(GapWorker.java:365)
at android.support.v7.widget.GapWorker.run(GapWorker.java:396)
at android.os.Handler.handleCallback(Handler.java:754)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:163)
at android.app.ActivityThread.main(ActivityThread.java:6326)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:880)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:770)
Caused by: java.lang.UnsupportedOperationException: TextureView doesn't support displaying a background drawable
at android.view.TextureView.setBackgroundDrawable(TextureView.java:302)
at android.view.View.setBackground(View.java:18149)
at android.view.View.(View.java:4582)
at android.view.View.(View.java:4089)
at android.view.View.(View.java:4068)
at android.view.TextureView.(TextureView.java:146)
at com.facebook.ads.internal.view.d.c.b.(Unknown Source)
at com.facebook.ads.internal.view.o.(Unknown Source)
at com.facebook.ads.internal.view.j.(Unknown Source)
at com.facebook.ads.MediaViewVideoRenderer.(Unknown Source)
at com.facebook.ads.internal.view.h.(Unknown Source)
at com.facebook.ads.MediaView.(Unknown Source)
at java.lang.reflect.Constructor.newInstance0(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:430)
at android.view.LayoutInflater.createView(LayoutInflater.java:652)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:812)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:752)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:883)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:846)
at android.view.LayoutInflater.inflate(LayoutInflater.java:522)
at android.view.LayoutInflater.inflate(LayoutInflater.java:430)
at me.timos.thuanle.fbnativeadadapter.FBNativeAdAdapterBig.onCreateAdViewHolder(FBNativeAdAdapterBig.java:141)
at me.timos.thuanle.fbnativeadadapter.FBNativeAdAdapterBig.onCreateViewHolder(FBNativeAdAdapterBig.java:149)
at android.support.v7.widget.RecyclerView$Adapter.createViewHolder(RecyclerView.java:6519)
at android.support.v7.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(RecyclerView.java:5706)
at android.support.v7.widget.GapWorker.prefetchPositionWithDeadline(GapWorker.java:285)
at android.support.v7.widget.GapWorker.flushTaskWithDeadline(GapWorker.java:342)
at android.support.v7.widget.GapWorker.flushTasksWithDeadline(GapWorker.java:358)
at android.support.v7.widget.GapWorker.prefetch(GapWorker.java:365)
at android.support.v7.widget.GapWorker.run(GapWorker.java:396)
at android.os.Handler.handleCallback(Handler.java:754)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:163)
at android.app.ActivityThread.main(ActivityThread.java:6326)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:880)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:770)
from audience-network.
Hi @Baobomb @vmalykhin @reiterp-avs @Sarun1001 have you guys tried the latest SDK and see if it fixes your issue?
Also how are you guys using the SDK? Are you including it from the gradle build dependency, or include the SDK as aar file in the project libs folder?
from audience-network.
Related Issues (20)
- NullPointerException at DynamicLoaderImpl.java HOT 4
- Is there any plans to create a new sdk for flutter mobile apps ( android and IOS) HOT 1
- Advanced Bidding With MoPub HOT 2
- java.lang.NullPointerException: Attempt to read from null array HOT 2
- java.lang.NoClassDefFoundError: Failed resolution of: Lcom/facebook/ads/internal/api/Repairable; HOT 1
- Any plans for Flutter SDK? HOT 1
- Audience-network-sdk crash: signal 7 (SIGBUS), code 2 (BUS_ADRERR) HOT 1
- Do i need any code modification in order to use Bidding? HOT 1
- AdUnitsSample HOT 1
- We haven't received a bid request HOT 1
- Crash in carousel ads HOT 1
- Crash for android version S: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent. HOT 1
- Issue In Pagination Using RecyclerView with NativeAds. HOT 1
- java.lang.NullPointerException(Native Ads) HOT 2
- java.lang.NoSuchMethodError: No virtual method getActivityStack()Ljava/util/Deque; in class Lcom/facebook/ads/internal/util/common/ANActivityLifecycleCallbacksListener; or its super classes (declaration of 'com.facebook.ads.internal.util.common.ANActivityLifecycleCallbacksListener' appears in /data/app/~~7tJmlt81DQZMlKSTo3o2Kg==/com.example.packagename-BZxNJejp3GkrxQKbKECguQ==/base.apk) HOT 1
- Facebook-Admob mediation not working HOT 1
- Exception on native ad sample fro android HOT 1
- no fill + Ad failed to load: Ads loaded too frequently HOT 1
- How to avoid the view type when the ad loading is failed ? HOT 1
- Facebook Ads for Android TV HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from audience-network.