Comments (6)
Hello, @dmapr. Thank you create the issue.
It's reproduced on my side as well.
Working on that.
from android-repository.
BTW, could you please send me your stacktrace after crash so we can compare it with mine.
I have the following:
java.lang.NullPointerException: Attempt to invoke virtual method 'void android.view.View.onFinishInflate()' on a null object reference
at android.view.LayoutInflater.rInflate(LayoutInflater.java:826)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:821)
at android.view.LayoutInflater.inflate(LayoutInflater.java:511)
at android.view.LayoutInflater.inflate(LayoutInflater.java:415)
at android.databinding.DataBindingUtil.inflate(DataBindingUtil.java:116)
at com.jivesoftware.rnd.smartlingmdn.databinding.ItemBinding.inflate(ItemBinding.java:127)
at com.jivesoftware.rnd.smartlingmdn.databinding.ItemBinding.inflate(ItemBinding.java:124)
at com.jivesoftware.rnd.smartlingmdn.MainActivity$TextRecyclerAdapter.onCreateViewHolder(MainActivity.java:61)
at com.jivesoftware.rnd.smartlingmdn.MainActivity$TextRecyclerAdapter.onCreateViewHolder(MainActivity.java:56)
at android.support.v7.widget.RecyclerView$Adapter.createViewHolder(RecyclerView.java:6367)
at android.support.v7.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(RecyclerView.java:5555)
...
Thus, it seems the usage of databinding
approach causes this issue. Anyway, I'm working on that. Just want to know how does your stacktrace look like. And also do you still have this issue if you remove these lines from your code:
contents.add(new Content(Content.TextType.Rich,
"<html><body>" +
"<h1>Movies</h1>" +
"<li>A Fistful of Dollars</li>" +
"<li>For a Few Dollars More</li>" +
"<li>The Good, the Bad and The Ugly</li>" +
"</ol>" +
"</body></html>"));
so that WebView
doesn't appear on the screen.
Thanks.
from android-repository.
Okay, now I see - Data Binding doesn't cause this issue itself. Smartling SDK is compatible with Data Binding approach.
The reason is WebView
is presented in the layout file.
from android-repository.
@andriipanasiuk -- you're correct, the databinding has nothing to do with it. In the real app we have a crash with a dynamically created view that inflates its own layout (containing the WebView) from an XML file using LayoutInflater.from(context).inflate(R.layout...) call. Here's the relevant portion of the stack trace in that case:
03-24 11:12:42.610 E/AndroidRuntime(12103): android.view.InflateException: Binary XML file line #6: Attempt to invoke virtual method 'android.content.Context android.view.View.getContext()' on a null object reference
03-24 11:12:42.610 E/AndroidRuntime(12103): Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.Context android.view.View.getContext()' on a null object reference
03-24 11:12:42.610 E/AndroidRuntime(12103): at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:821)
03-24 11:12:42.610 E/AndroidRuntime(12103): at android.view.LayoutInflater.rInflate(LayoutInflater.java:861)
03-24 11:12:42.610 E/AndroidRuntime(12103): at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
03-24 11:12:42.610 E/AndroidRuntime(12103): at android.view.LayoutInflater.inflate(LayoutInflater.java:426)
03-24 11:12:42.610 E/AndroidRuntime(12103): at android.view.LayoutInflater.inflate(LayoutInflater.java:377)
I have also tried to use the fully qualified name of the WebView class (android.webkit.WebView) but that made no difference.
from android-repository.
Please use the latest 2.3.2 version to fix this issue.
from android-repository.
Thank you! 2.3.2 works like a charm.
from android-repository.
Related Issues (18)
- onStringsLoaded is never called, am I missing something? HOT 5
- Element type "meta-data" must be followed by ">" or "/>". HOT 1
- Context capture mode not working (2.5.2). App is crashing HOT 5
- Receiving errors while running instrumentation test
- Account configuration gets overwritten HOT 1
- Manifest Tasks does not support the manifestOutputFile property any more HOT 4
- Manifest Tasks does not support the manifestOutputFile property any more, please use the manifestOutputDirectory instead. HOT 1
- Resource not found.
- Default SearchView style is broken after Smartling SDK integration
- Context capture not working on version 4.0.0
- Repo Url is not working HOT 4
- Connection (disconnection) of the library does not work depending on the build flavors. Version 4.0.0.
- Couldn't get config from application meta data HOT 25
- Question about an error in the logs HOT 1
- Incorrect toolbar title color for collapsing toolbars HOT 3
- Support Android Gradle Plugin 3.0.0 HOT 2
- Context capture crash when pressing "Load strings" HOT 12
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 android-repository.