Hi I have an awkward error when I implement my own Application class like
public class ApplicationController extends Application{
.....
and put entry in android manifest like
<application
android:name="com.mypackage.ApplicationController"
...
everything working fine except layout with WebView
not working. It throws an exception on setContentView()
:
android.view.InflateException: Binary XML file line #104: Error inflating class android.webkit.WebView
Thanks
You cannot set a content view to a class extending an Application
class. You can do that from an Activity
. Either change this class to extend Activity
or create another one that extends Activity
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.