自定义View 拓展view 没有全部实现夫view中的构造方法 ApplicationContext is null in ApplicationStatus
来源:互联网 发布:图形矢量化软件 编辑:程序博客网 时间:2024/05/17 17:46
报以下的错误:
01-08 17:22:33.223: E/AndroidProtocolHandler(17352): Unable to open asset URL: file:///android_asset/pggmall/css2/style2.css01-08 17:22:33.223: E/AndroidProtocolHandler(17352): Unable to open asset URL: file:///android_asset/pggmall/css2/4_my2.css01-08 17:23:24.393: E/SMACK-Voe(17708): enter JNI_OnLoad01-08 17:23:26.703: E/SysUtils(17708): ApplicationContext is null in ApplicationStatus01-08 17:23:26.793: E/ActivityThread(17708): Failed to find provider info for com.google.settings01-08 17:23:27.083: E/AndroidProtocolHandler(17708): Unable to open asset URL: file:///android_asset/pggmall/css2/style2.css01-08 17:23:27.083: E/AndroidProtocolHandler(17708): Unable to open asset URL: file:///android_asset/pggmall/css2/1_home2.css01-08 17:23:27.113: E/AndroidProtocolHandler(17708): Unable to open asset URL: file:///android_asset/pggmall/pic/ad_1.jpg01-08 17:23:27.113: E/AndroidProtocolHandler(17708): Unable to open asset URL: file:///android_asset/pggmall/pic/ad_2.jpg01-08 17:23:27.113: E/AndroidProtocolHandler(17708): Unable to open asset URL: file:///android_asset/pggmall/pic/ad_3.jpg01-08 17:25:17.533: E/AndroidProtocolHandler(17708): Unable to open asset URL: file:///android_asset/pggmall/css2/4_my2.css01-08 17:25:17.533: E/AndroidProtocolHandler(17708): Unable to open asset URL: file:///android_asset/pggmall/css2/style2.css01-08 17:26:05.263: E/SMACK-Voe(18249): enter JNI_OnLoad01-08 17:26:07.543: E/SysUtils(18249): ApplicationContext is null in ApplicationStatus01-08 17:26:07.633: E/ActivityThread(18249): Failed to find provider info for com.google.settings01-08 17:26:07.943: E/AndroidProtocolHandler(18249): Unable to open asset URL: file:///android_asset/pggmall/css2/style2.css01-08 17:26:07.943: E/AndroidProtocolHandler(18249): Unable to open asset URL: file:///android_asset/pggmall/css2/1_home2.css01-08 17:26:07.943: E/AndroidProtocolHandler(18249): Unable to open asset URL: file:///android_asset/pggmall/pic/ad_2.jpg01-08 17:26:07.943: E/AndroidProtocolHandler(18249): Unable to open asset URL: file:///android_asset/pggmall/pic/ad_1.jpg01-08 17:26:07.943: E/AndroidProtocolHandler(18249): Unable to open asset URL: file:///android_asset/pggmall/pic/ad_3.jpg01-08 17:26:57.223: E/AndroidProtocolHandler(18249): Unable to open asset URL: file:///android_asset/pggmall/css2/style2.css01-08 17:26:57.223: E/AndroidProtocolHandler(18249): Unable to open asset URL: file:///android_asset/pggmall/css2/4_my2.css01-08 17:27:00.043: E/AndroidRuntime(18249): FATAL EXCEPTION: main01-08 17:27:00.043: E/AndroidRuntime(18249): Process: com.lvche.chatuidemo, PID: 1824901-08 17:27:00.043: E/AndroidRuntime(18249): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.lvche.chatuidemo/com.lvche.origin.activity.TestActivity}: android.view.InflateException: Binary XML file line #22: Error inflating class com.lvche.origin.activity.slide_imgs.SlideViewPager01-08 17:27:00.043: E/AndroidRuntime(18249): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3168)01-08 17:27:00.043: E/AndroidRuntime(18249): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3278)01-08 17:27:00.043: E/AndroidRuntime(18249): at android.app.ActivityThread.access$1000(ActivityThread.java:211)01-08 17:27:00.043: E/AndroidRuntime(18249): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1705)01-08 17:27:00.043: E/AndroidRuntime(18249): at android.os.Handler.dispatchMessage(Handler.java:102)01-08 17:27:00.043: E/AndroidRuntime(18249): at android.os.Looper.loop(Looper.java:145)01-08 17:27:00.043: E/AndroidRuntime(18249): at android.app.ActivityThread.main(ActivityThread.java:6918)01-08 17:27:00.043: E/AndroidRuntime(18249): at java.lang.reflect.Method.invoke(Native Method)01-08 17:27:00.043: E/AndroidRuntime(18249): at java.lang.reflect.Method.invoke(Method.java:372)01-08 17:27:00.043: E/AndroidRuntime(18249): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404)01-08 17:27:00.043: E/AndroidRuntime(18249): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199)01-08 17:27:00.043: E/AndroidRuntime(18249): Caused by: android.view.InflateException: Binary XML file line #22: Error inflating class com.lvche.origin.activity.slide_imgs.SlideViewPager01-08 17:27:00.043: E/AndroidRuntime(18249): at android.view.LayoutInflater.createView(LayoutInflater.java:623)01-08 17:27:00.043: E/AndroidRuntime(18249): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:750)01-08 17:27:00.043: E/AndroidRuntime(18249): at android.view.LayoutInflater.rInflate(LayoutInflater.java:813)01-08 17:27:00.043: E/AndroidRuntime(18249): at android.view.LayoutInflater.rInflate(LayoutInflater.java:821)01-08 17:27:00.043: E/AndroidRuntime(18249): at android.view.LayoutInflater.inflate(LayoutInflater.java:511)01-08 17:27:00.043: E/AndroidRuntime(18249): at android.view.LayoutInflater.inflate(LayoutInflater.java:415)01-08 17:27:00.043: E/AndroidRuntime(18249): at android.view.LayoutInflater.inflate(LayoutInflater.java:366)01-08 17:27:00.043: E/AndroidRuntime(18249): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:450)01-08 17:27:00.043: E/AndroidRuntime(18249): at android.app.Activity.setContentView(Activity.java:2366)01-08 17:27:00.043: E/AndroidRuntime(18249): at com.lvche.origin.activity.TestActivity.onCreate(TestActivity.java:32)01-08 17:27:00.043: E/AndroidRuntime(18249): at android.app.Activity.performCreate(Activity.java:6575)01-08 17:27:00.043: E/AndroidRuntime(18249): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1134)01-08 17:27:00.043: E/AndroidRuntime(18249): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3121)01-08 17:27:00.043: E/AndroidRuntime(18249): ... 10 more01-08 17:27:00.043: E/AndroidRuntime(18249): Caused by: java.lang.NoSuchMethodException: <init> [class android.content.Context, interface android.util.AttributeSet]01-08 17:27:00.043: E/AndroidRuntime(18249): at java.lang.Class.getConstructor(Class.java:531)01-08 17:27:00.043: E/AndroidRuntime(18249): at java.lang.Class.getConstructor(Class.java:495)01-08 17:27:00.043: E/AndroidRuntime(18249): at android.view.LayoutInflater.createView(LayoutInflater.java:587)01-08 17:27:00.043: E/AndroidRuntime(18249): ... 22 more
解决方法:实现父类中的所有构造方法
0 0
- 自定义View 拓展view 没有全部实现夫view中的构造方法 ApplicationContext is null in ApplicationStatus
- 自定义view构造方法
- 自定义View的构造方法
- 自定义view之构造方法
- 自定义view的构造方法
- 自定义view-构造方法和自定义属性
- 自定义ArcView-构造拓展性高的view
- 自定义view中的onmessure方法
- 自定义的VIEW没有执行onDraw方法
- 自定义View构造方法的推荐写法
- 自定义View的三个构造方法
- 关于自定义View的四个构造方法
- 自定义View之构造方法和用法
- 关于自定义view 以及view中的动画实现
- 自定义View的实现方法,View工作原理(四)
- Android自定义View的实现方法,深入了解View(四)
- View (五)自定义View的实现方法
- 自定义View中的Mesure
- iOS模拟器键盘输入中文解决方案
- java生成图片
- *Hbase命令
- sql 随机取一条数据
- Sublime Text Snippets(代码片段)功能
- 自定义View 拓展view 没有全部实现夫view中的构造方法 ApplicationContext is null in ApplicationStatus
- AngularJS学习笔记(二)
- 分治算法
- ios实现长时间后台运行
- Redis学习记录之配置文件(四)
- Rapid Json 可视化 rapidjson.natvis In VS2013
- Android上传文件到服务器
- Swift字典
- php开发中简单的引入编辑器的方法