android.view.InflateException: Binary XML file line #2: Error inflating class <unknown>

华为P8上运行无碍(5.0以上系统),别的手机上报错

错误代码:
/AndroidRuntime: FATAL EXCEPTION: main
Process: com.caicai.net.myapplication, PID: 21121
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.caicai.net.myapplication/com.caicai.net.myapplication.PlayingMethodActivity}: android.view.InflateException: Binary XML file line #2: Error inflating class
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2201)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2250)
at android.app.ActivityThread.access$900(ActivityThread.java:141)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1213)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5072)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:609)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.view.InflateException: Binary XML file line #2: Error inflating class
at android.view.LayoutInflater.createView(LayoutInflater.java:623)
at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
at android.view.LayoutInflater.onCreateView(LayoutInflater.java:672)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:697)
at android.view.LayoutInflater.inflate(LayoutInflater.java:472)
at android.view.LayoutInflater.inflate(LayoutInflater.java:400)
at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:290)
at android.app.Activity.setContentView(Activity.java:1947)
at com.caicai.net.myapplication.PlayingMethodActivity.onCreate(PlayingMethodActivity.java:99)
at android.app.Activity.performCreate(Activity.java:5249)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2165)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2250) 
at android.app.ActivityThread.access$900(ActivityThread.java:141) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1213) 
at android.os.Handler.dispatchMessage(Handler.java:102) 
at android.os.Looper.loop(Looper.java:136) 
at android.app.ActivityThread.main(ActivityThread.java:5072) 
at java.lang.reflect.Method.invokeNative(Native Method) 
at java.lang.reflect.Method.invoke(Method.java:515) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:609) 
at dalvik.system.NativeStart.main(Native Method) 

5个回答

cause by中指出你的布局文件里面有一个视图类应用不对啊,你还是好好检查下是不是你其他的错误引起的那个类找不见了

gys19921114
gys19921114 这个我看过了的,没解决问题
接近 4 年之前 回复

错误指向布局文件,建议贴出布局文件

你可以把布局文件贴出来让我们看看吗?

最近在做安卓程序的引导页问题,每次当加载引导页的时候总是报错,说未知的填充错误,很是郁闷啊。
从stackoverflow找到的解决方案:
   当运行的时候,安卓会改变图片的大小(基于屏幕的尺寸和分辨率),安卓使用bitmap去重新改变图片的尺寸。所以,这个是内存非常敏感的行为。一个快速的解决方法是,将比较大的图片复制到drawable-ldpi, mdpi, hdpi 文件夹中。安卓会自动......
答案就在这里:android.view.InflateException: Binary XML file line#2: Error inflating class
----------------------Hi,地球人,我是问答机器人小S,上面的内容就是我狂拽酷炫叼炸天的答案,除了赞同,你还有别的选择吗?

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
报错view.InflateException: Binary XML file line

比较老的项目,主界页面使用的TabActivity切换,在首页的viewpager中的fragment的布局文件中报错,布局文件报错为一个TextView,样式很简单,但是报错,尝试将该TextView注释后,依然报错,显示为首页的另一个控件,感觉和项目配置有关,目前仍然找不到错误,在华为Mate10上打开直接关闭,在荣耀v8和mate9pro上可以正常打开,以下是报错日志,求大神指点 android.view.InflateException: Binary XML file line #22: Binary XML file line #22: Error inflating class android.widget.TextView Caused by: android.view.InflateException: Binary XML file line #22: Error inflating class android.widget.TextView Caused by: java.lang.reflect.InvocationTargetException at java.lang.reflect.Constructor.newInstance0(Native Method) at java.lang.reflect.Constructor.newInstance(Constructor.java:334) at android.view.LayoutInflater.createView(LayoutInflater.java:647) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:790) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:730) at android.view.LayoutInflater.rInflate(LayoutInflater.java:863) at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:824) at android.view.LayoutInflater.rInflate(LayoutInflater.java:866) at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:824) at android.view.LayoutInflater.rInflate(LayoutInflater.java:866) at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:824) at android.view.LayoutInflater.inflate(LayoutInflater.java:515) at android.view.LayoutInflater.inflate(LayoutInflater.java:423) at com.tidemedia.nntv.sliding.fragment.TuijianFragment.onCreateView(TuijianFragment.java:134) at android.support.v4.app.Fragment.performCreateView(Fragment.java:2192) at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1299) at android.support.v4.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1528) at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1595) at android.support.v4.app.BackStackRecord.executeOps(BackStackRecord.java:758) at android.support.v4.app.FragmentManagerImpl.executeOps(FragmentManager.java:2363) at android.support.v4.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2149) at android.support.v4.app.FragmentManagerImpl.optimizeAndExecuteOps(FragmentManager.java:2103) at android.support.v4.app.FragmentManagerImpl.execSingleAction(FragmentManager.java:1984) at android.support.v4.app.BackStackRecord.commitNowAllowingStateLoss(BackStackRecord.java:626) at android.support.v4.app.FragmentPagerAdapter.finishUpdate(FragmentPagerAdapter.java:143) at android.support.v4.view.ViewPager.populate(ViewPager.java:1268) at android.support.v4.view.ViewPager.populate(ViewPager.java:1116) at android.support.v4.view.ViewPager.onMeasure(ViewPager.java:1642) at android.view.View.measure(View.java:21998) at android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:715) at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:461) at android.view.View.measure(View.java:21998) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6580) at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1514) at android.widget.LinearLayout.measureVertical(LinearLayout.java:806) at android.widget.LinearLayout.onMeasure(LinearLayout.java:685) at android.view.View.measure(View.java:21998) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6580) at android.widget.FrameLayout.onMeasure(FrameLayout.java:185) at android.view.View.measure(View.java:21998) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6580) at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1514) at android.widget.LinearLayout.measureVertical(LinearLayout.java:806) at android.widget.LinearLayout.onMeasure(LinearLayout.java:685) at android.view.View.measure(View.java:21998) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6580) at android.widget.FrameLayout.onMeasure(FrameLayout.java:185) at com.android.internal.policy.DecorView.onMeasure(DecorView.java:721) at android.view.View.measure(View.java:21998) at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6580) 以下是xml布局 <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <RelativeLayout android:layout_width="match_parent" android:layout_height="180dp"> <android.support.v4.view.ViewPager android:id="@+id/newsGallery" android:layout_width="match_parent" android:layout_height="180dp" /> <RelativeLayout android:layout_width="match_parent" android:layout_height="30dp" android:layout_alignParentBottom="true" android:background="#64000000"> <android.widget.TextView android:id="@+id/viewpager_text" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_centerVertical="true" android:layout_marginLeft="5dp" android:layout_marginRight="5dp" android:lines="1" android:textColor="@color/white" android:textSize="15sp" /> </RelativeLayout>

InflateException:: Binary XML file line

android.view.InflateException: Binary XML file line #171: Binary XML file line #9: Binary XML file line #9: Error inflating class com.facebook.drawee.view.SimpleDraweeView com.facebook.drawee.view.SimpleDraweeView 这里的类是jar中的文件 没有对应的XML文件 求告知怎么改啊 不知道怎么回事就出了这个毛病

Android 报错 android.view.InflateException: Binary XML file line #7: Binary XML file line #7: Error inflating class com.coolweather.android.fragment

话不多说 日志如下: ![图片说明](https://img-ask.csdn.net/upload/201912/19/1576765328_880017.png) 然后 找到MainActivity 代码如下 ![图片说明](https://img-ask.csdn.net/upload/201912/19/1576765446_106309.png) 对应的xml如下: ![图片说明](https://img-ask.csdn.net/upload/201912/19/1576765466_653875.png) 之前看过帖子说在组件前面加包名 也没什么用 不知道各位大佬怎么解决这个问题呢?

android 第一次做自定义控件 java.lang.RuntimeException异常

package com.example.q9722.biancheng; import android.content.Context; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; import android.graphics.Rect; import android.util.AttributeSet; import android.widget.TextView; /** * Created by q9722 on 2018/1/1. */ public class test_text extends TextView { private String mText = "111",mNumber = "222"; private Paint mPaint; private Rect mNumberRect; public test_text(Context context, String mText, String mNumber) { this(context, null, mText, mNumber); } public test_text(Context context, AttributeSet attrs, String mText, String mNumber) { this(context, attrs, 0, mText, mNumber); } public test_text(Context context, AttributeSet attrs, int defStyleAttr, String mText, String mNumber) { super(context, attrs, defStyleAttr); this.mText = mText; this.mNumber = mNumber; init(); } private void init() { mPaint = new Paint(); } @Override protected void onDraw(Canvas canvas) { super.onDraw(canvas); mPaint.setColor(Color.BLACK); mPaint.setStyle(Paint.Style.STROKE); canvas.drawRect(0, 0, getWidth(), getHeight(), mPaint); canvas.drawCircle(getWidth()/6*4, getHeight()/4*3,getHeight()/4,mPaint); mPaint.setTextSize(18); mPaint.getTextBounds(mNumber, 0, mNumber.length(), mNumberRect); canvas.drawText(mText, 2 ,getHeight()/5,mPaint); canvas.drawText(mNumber, (getWidth()/6*4)-(mNumberRect.width()/2), (getHeight()/4*3)-(mNumberRect.hashCode()/2), mPaint); } } 01/01 18:58:49: Launching app $ adb push C:\Users\q9722\AndroidStudioProjects\BianCheng\app\build\outputs\apk\app-debug.apk /data/local/tmp/com.example.q9722.biancheng $ adb shell pm install -r "/data/local/tmp/com.example.q9722.biancheng" Success $ adb shell am start -n "com.example.q9722.biancheng/com.example.q9722.biancheng.SplashActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER Client not ready yet..Waiting for process to come online Connected to process 30129 on device xiaomi-mi_5-43ac216f W/System: ClassLoader referenced unknown path: /data/app/com.example.q9722.biancheng-1/lib/arm64 I/InstantRun: Instant Run Runtime started. Android package is com.example.q9722.biancheng, real application class is null. W/System: ClassLoader referenced unknown path: /data/app/com.example.q9722.biancheng-1/lib/arm64 W/MIUI-BLOCK-MONITOR: The msg { when=-72ms what=110 obj=AppBindData{appInfo=ApplicationInfo{7c1e14a com.example.q9722.biancheng}} target=android.app.ActivityThread$H planTime=1514804333143 dispatchTime=1514804333215 finishTime=0 } took 3826ms and took 3754ms after dispatch. W/art: Before Android 4.1, method android.graphics.PorterDuffColorFilter android.support.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable W/System: ClassLoader referenced unknown path: /system/app/MiuiContentCatcher/lib/arm64 D/AccessibilityManager: current package=com.example.q9722.biancheng, accessibility manager mIsFinalEnabled=false, mOptimizeEnabled=true, mIsUiAutomationEnabled=false, mIsInterestedPackage=false V/BoostFramework: BoostFramework() : mPerf = com.qualcomm.qti.Performance@717395 V/BoostFramework: BoostFramework() : mPerf = com.qualcomm.qti.Performance@bc3ccaa V/BoostFramework: BoostFramework() : mPerf = com.qualcomm.qti.Performance@664d14e D/ActivityThreadInjector: clearCachedDrawables. I/Adreno: QUALCOMM build : 620c068, I09d312ff84 Build Date : 08/07/17 OpenGL ES Shader Compiler Version: XE031.09.00.04 Local Branch : Remote Branch : Remote Branch : Reconstruct Branch : I/Choreographer: Skipped 33 frames! The application may be doing too much work on its main thread. I/OpenGLRenderer: Initialized EGL, version 1.4 D/OpenGLRenderer: Swap behavior 1 V/BoostFramework: BoostFramework() : mPerf = com.qualcomm.qti.Performance@c8e9e47 I/Timeline: Timeline: Activity_launch_request time:84494803 V/BoostFramework: BoostFramework() : mPerf = com.qualcomm.qti.Performance@cd359d1 V/BoostFramework: BoostFramework() : mPerf = com.qualcomm.qti.Performance@4011c36 D/AndroidRuntime: Shutting down VM E/AndroidRuntime: FATAL EXCEPTION: main Process: com.example.q9722.biancheng, PID: 30129 java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.q9722.biancheng/com.example.q9722.biancheng.MainActivity}: android.view.InflateException: Binary XML file line #15: Binary XML file line #15: Error inflating class com.example.q9722.biancheng.test_text at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2724) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2785) at android.app.ActivityThread.-wrap12(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1532) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:163) at android.app.ActivityThread.main(ActivityThread.java:6321) 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: android.view.InflateException: Binary XML file line #15: Binary XML file line #15: Error inflating class com.example.q9722.biancheng.test_text Caused by: android.view.InflateException: Binary XML file line #15: Error inflating class com.example.q9722.biancheng.test_text Caused by: java.lang.NoSuchMethodException: <init> [class android.content.Context, interface android.util.AttributeSet] at java.lang.Class.getConstructor0(Class.java:2204) at java.lang.Class.getConstructor(Class.java:1683) at android.view.LayoutInflater.createView(LayoutInflater.java:622) 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 android.view.LayoutInflater.inflate(LayoutInflater.java:377) at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:284) at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140) at com.example.q9722.biancheng.MainActivity.onCreate(MainActivity.java:17) at android.app.Activity.performCreate(Activity.java:6847) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1119) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2677) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2785) at android.app.ActivityThread.-wrap12(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1532) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:163) at android.app.ActivityThread.main(ActivityThread.java:6321) 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) Application terminated.

Android Linearlayout异常

代码如下: android.view.InflateException: Binary XML file line #1: Error inflating class Linearlayout <Linearlayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="fill_parent" android:layout_height="fill_parent" android:orientation="horizontal" > <Linearlayout android:id="@+id/left" android:layout_width="0dp" android:layout_height="match_parent" android:background="#CCCCCC" android:orientation="vertical"> <Button android:id="@+id/button" android:layout_width="match_parent" android:layout_height="match_parent" android:text="show" android:minHeight="20dp" android:minWidth="20dp" > </Button> <Linearlayout android:id="@+id/center" android:layout_width="0dp" android:layout_height="match_parent" android:background="#CCDDFF" android:orientation="vertical"> </Linearlayout> <Linearlayout android:id="@+id/right" android:layout_width="0dp" android:layout_height="match_parent" android:background="#CCFFDD" android:orientation="vertical"> </Linearlayout> </Linearlayout> </Linearlayout>

Android 8.0使用webview加载html崩溃

低于8.0版本则正常使用,错误log如下 ``` Process: com.dhcc.csr, PID: 10366 java.lang.RuntimeException: Unable to start activity ComponentInfo{com.dhcc.csr/com.dhcc.csr.news.detail.PartyDynamicDetailActivity}: android.view.InflateException: Binary XML file line #0: Binary XML file line #0: Error inflating class android.webkit.WebView at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2817) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2892) at android.app.ActivityThread.-wrap11(Unknown Source:0) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1593) at android.os.Handler.dispatchMessage(Handler.java:105) at android.os.Looper.loop(Looper.java:164) at android.app.ActivityThread.main(ActivityThread.java:6541) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767) Caused by: android.view.InflateException: Binary XML file line #0: Binary XML file line #0: Error inflating class android.webkit.WebView Caused by: android.view.InflateException: Binary XML file line #0: Error inflating class android.webkit.WebView Caused by: java.lang.reflect.InvocationTargetException at java.lang.reflect.Constructor.newInstance0(Native Method) at java.lang.reflect.Constructor.newInstance(Constructor.java:334) at android.view.LayoutInflater.createView(LayoutInflater.java:647) at com.android.internal.policy.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:58) at android.view.LayoutInflater.onCreateView(LayoutInflater.java:720) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:788) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:730) at android.view.LayoutInflater.rInflate(LayoutInflater.java:863) at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:824) at android.view.LayoutInflater.rInflate(LayoutInflater.java:866) at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:824) at android.view.LayoutInflater.rInflate(LayoutInflater.java:866) at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:824) at android.view.LayoutInflater.rInflate(LayoutInflater.java:866) at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:824) at android.view.LayoutInflater.inflate(LayoutInflater.java:515) at android.view.LayoutInflater.inflate(LayoutInflater.java:423) at android.view.LayoutInflater.inflate(LayoutInflater.java:374) at com.android.internal.policy.PhoneWindow.setContentView(PhoneWindow.java:418) at android.app.Activity.setContentView(Activity.java:2654) at com.dhcc.csr.news.detail.PartyDynamicDetailActivity.onCreate(PartyDynamicDetailActivity.java:94) at android.app.Activity.performCreate(Activity.java:6975) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1213) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2770) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2892) at android.app.ActivityThread.-wrap11(Unknown Source:0) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1593) at android.os.Handler.dispatchMessage(Handler.java:105) at android.os.Looper.loop(Looper.java:164) at android.app.ActivityThread.main(ActivityThread.java:6541) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767) Caused by: java.lang.NullPointerException at android.content.res.AssetManager.addAssetPathNative(Native Method) at android.content.res.AssetManager.addAssetPathInternal(AssetManager.java:689) at android.content.res.AssetManager.addAssetPathAsSharedLibrary(AssetManager.java:684) at android.webkit.WebViewFactory.getProviderClass(WebViewFactory.java:407) at android.webkit.WebViewFactory.getProvider(WebViewFactory.java:211) 11-13 16:50:39.410 10366-10366/com.dhcc.csr E/AndroidRuntime: at android.webkit.WebView.getFactory(WebView.java:2467) at android.webkit.WebView.ensureProviderCreated(WebView.java:2462) at android.webkit.WebView.setOverScrollMode(WebView.java:2527) at android.view.View.<init>(View.java:4536) at android.view.View.<init>(View.java:4668) at android.view.ViewGroup.<init>(ViewGroup.java:597) at android.widget.AbsoluteLayout.<init>(AbsoluteLayout.java:55) at android.webkit.WebView.<init>(WebView.java:636) at android.webkit.WebView.<init>(WebView.java:581) at android.webkit.WebView.<init>(WebView.java:564) at android.webkit.WebView.<init>(WebView.java:551) ... 33 more ```

webview访问https7.0系统兼容问题dlopen failed

先描述下:我这里是一个弹框,弹框里面是webview, 问题点:自从上了https,解析webview就开始报错了, 报错重点信息如下: Caused by: android.view.InflateException: Binary XML file line #31: Error inflating class android.webkit.WebView Caused by: android.util.AndroidRuntimeException: java.lang.reflect.InvocationTargetException Caused by: java.lang.UnsatisfiedLinkError: dlopen failed: "/data/app/com.google.android.webview-2/lib/arm/libwebviewchromium.so" is 32-bit instead of 64-bit 在友盟统计里看到的报错信息如下: android.view.InflateException: Binary XML file line #31: Binary XML file line #31: Error inflating class android.webkit.WebView at Android.MODEL(VKY-AL00) at Android.OS.VERSION(7.0) at Android.FINGERPRINT(HUAWEI/VKY-AL00/HWVKY:7.0/HUAWEIVKY-AL00/C00B172:user/release-keys) at Android.WHERE() Caused by: android.view.InflateException: Binary XML file line #31: Error inflating class android.webkit.WebView 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:656) at com.android.internal.policy.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:64) at com.android.internal.policy.HwPhoneLayoutInflater.onCreateView(HwPhoneLayoutInflater.java:107) at android.view.LayoutInflater.onCreateView(LayoutInflater.java:728) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:796) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:738) at android.view.LayoutInflater.rInflate(LayoutInflater.java:869) at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:832) at android.view.LayoutInflater.rInflate(LayoutInflater.java:872) at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:832) at android.view.LayoutInflater.inflate(LayoutInflater.java:518) at android.view.LayoutInflater.inflate(LayoutInflater.java:426) at android.view.LayoutInflater.inflate(LayoutInflater.java:377) at com.qwkj.wwlotery.view.dialog.H5PayDialog.init(H5PayDialog.java:106) at com.qwkj.wwlotery.view.dialog.H5PayDialog.<init>(H5PayDialog.java:101) at com.qwkj.wwlotery.asynctask.PublicPayRequest$1.onSuccess(PublicPayRequest.java:45) at com.app.real.util.net.HttpVolley$3.onResponse(HttpVolley.java:159) at comapp.real.util.net.HttpVolley$3.onResponse(HttpVolley.java:143) at com.app.real.util.net.BaseRequest.deliverResponse(BaseRequest.java:39) at com.app.real.ExecutorDelivery$ResponseDeliveryRunnable.run(ExecutorDelivery.java:99) at android.os.Handler.handleCallback(Handler.java:761) at android.os.Handler.dispatchMessage(Handler.java:98) at android.os.Looper.loop(Looper.java:156) at android.app.ActivityThread.main(ActivityThread.java:6577) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:942) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:832) Caused by: android.util.AndroidRuntimeException: java.lang.reflect.InvocationTargetException at android.webkit.WebViewFactory.getProvider(WebViewFactory.java:204) at android.webkit.WebView.getFactory(WebView.java:2325) at android.webkit.WebView.ensureProviderCreated(WebView.java:2320) at android.webkit.WebView.setOverScrollMode(WebView.java:2379) at android.view.View.<init>(View.java:4020) at android.view.View.<init>(View.java:4137) at android.view.ViewGroup.<init>(ViewGroup.java:578) at android.widget.AbsoluteLayout.<init>(AbsoluteLayout.java:55) at android.webkit.WebView.<init>(WebView.java:627) at android.webkit.WebView.<init>(WebView.java:572) at android.webkit.WebView.<init>(WebView.java:555) at android.webkit.WebView.<init>(WebView.java:542) ... 29 more 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.webkit.WebViewFactory.getProvider(WebViewFactory.java:198) ... 40 more Caused by: java.lang.RuntimeException: Cannot load WebView at com.android.webview.chromium.WebViewChromiumFactoryProvider.initialize(WebViewChromiumFactoryProvider.java:75) at com.android.webview.chromium.WebViewChromiumFactoryProvider.<init>(WebViewChromiumFactoryProvider.java:31) ... 43 more Caused by: org.chromium.base.library_loader.ProcessInitException at org.chromium.base.library_loader.LibraryLoader.loadAlreadyLocked(LibraryLoader.java:71) at org.chromium.base.library_loader.LibraryLoader.loadNowOverrideApplicationContext(LibraryLoader.java:25) at com.android.webview.chromium.WebViewChromiumFactoryProvider.initialize(WebViewChromiumFactoryProvider.java:69) ... 44 more Caused by: java.lang.UnsatisfiedLinkError: dlopen failed: "/data/app/com.google.android.webview-2/lib/arm/libwebviewchromium.so" is 32-bit instead of 64-bit at java.lang.Runtime.loadLibrary0(Runtime.java:994) at java.lang.System.loadLibrary(System.java:1533) at org.chromium.base.library_loader.LibraryLoader.loadAlreadyLocked(LibraryLoader.java:55) ... 46 more xml代码如下: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" > <LinearLayout android:id="@+id/h5_pay_top_linear_top" android:layout_width="fill_parent" android:layout_height="0dip" android:layout_weight="2" android:background="#00000000" android:orientation="vertical"> </LinearLayout> <RelativeLayout android:id="@+id/h5_pay_relative_bottom" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="3" android:background="#ffffff"> <View android:id="@+id/h5_pay_line" android:layout_width="fill_parent" android:layout_height="1px" android:layout_alignParentTop="true" android:background="@color/public_dark_divide_line_bg"/> <WebView android:id="@+id/h5_pay_webview" android:layout_width="fill_parent" android:layout_height="wrap_content" android:minHeight="300dip" android:layout_below="@id/h5_pay_line" android:background="#ffffff" /> <ImageView android:id="@+id/h5_pay_progressbar" android:layout_width="20dip" android:layout_height="20dip" android:layout_centerInParent="true" android:scaleType="centerInside" android:background="@anim/loading_animation" android:visibility="visible" /> </RelativeLayout> </LinearLayout> 跪求高手帮忙解答,或者指点,感激不尽。

webview在源码中使用报错?

我在AS上编写的webview,能够成功使用,然后移植进源码,能够编译成功,但是总是报 webview,xml解析不正常,不知道是不是webview需要什么库,还是怎么回事,求大神解惑。 01-01 18:17:37.046 8595 8595 E AndroidRuntime: FATAL EXCEPTION: main 01-01 18:17:37.046 8595 8595 E AndroidRuntime: Process: com.example.timestatistics, PID: 8595 01-01 18:17:37.046 8595 8595 E AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.timestatistics/com.example.timestatistics.WebViewActivity}: android.view.InflateException: Binary XML file line #7: Binary XML file line #7: Error inflating class android.webkit.WebView 01-01 18:17:37.046 8595 8595 E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2669) 01-01 18:17:37.046 8595 8595 E AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2730) 01-01 18:17:37.046 8595 8595 E AndroidRuntime: at android.app.ActivityThread.-wrap12(ActivityThread.java) 01-01 18:17:37.046 8595 8595 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1481) 01-01 18:17:37.046 8595 8595 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:102) 01-01 18:17:37.046 8595 8595 E AndroidRuntime: at android.os.Looper.loop(Looper.java:154) 01-01 18:17:37.046 8595 8595 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6135) 01-01 18:17:37.046 8595 8595 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method) 01-01 18:17:37.046 8595 8595 E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:929) 01-01 18:17:37.046 8595 8595 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:819) 01-01 18:17:37.046 8595 8595 E AndroidRuntime: Caused by: android.view.InflateException: Binary XML file line #7: Binary XML file line #7: Error inflating class android.webkit.WebView 01-01 18:17:37.046 8595 8595 E AndroidRuntime: Caused by: android.view.InflateException: Binary XML file line #7: Error inflating class android.webkit.WebView 01-01 18:17:37.046 8595 8595 E AndroidRuntime: Caused by: java.lang.reflect.InvocationTargetException

Error inflating class fragment

android.view.InflateException: Binary XML file line #8: Error inflating class fragment at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:808) at android.view.LayoutInflater.rInflate(LayoutInflater.java:851) at android.view.LayoutInflater.inflate(LayoutInflater.java:510) at android.view.LayoutInflater.inflate(LayoutInflater.java:420) at com.example.administrator.baba.Fragments.HomeFragment.getView(HomeFragment.java:96) at android.support.v4.app.BackStackRecord.setFirstOut(BackStackRecord.java:813) at android.support.v4.app.BackStackRecord.calculateFragments(BackStackRecord.java:885) at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:719) at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1677) at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:536) at android.os.Handler.handleCallback(Handler.java:815) at android.os.Handler.dispatchMessage(Handler.java:104) at android.os.Looper.loop(Looper.java:194) at android.app.ActivityThread.main(ActivityThread.java:5743) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1077) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:843) Caused by: java.lang.IllegalArgumentException: Binary XML file line #8: Duplicate id 0x7f0b0078, tag null, or parent id 0xffffffff with another fragment for com.example.administrator.baba.CycleViews.CycleViewPager at android.app.FragmentManagerImpl.onCreateView(FragmentManager.java:2146) at android.app.Activity.onCreateView(Activity.java:5460) at android.support.v4.app.BaseFragmentActivityHoneycomb.onCreateView(BaseFragmentActivityHoneycomb.java:36) at android.support.v4.app.FragmentActivity.onCreateView(FragmentActivity.java:75) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:778) at android.view.LayoutInflater.rInflate(LayoutInflater.java:851)  at android.view.LayoutInflater.inflate(LayoutInflater.java:510)  at android.view.LayoutInflater.inflate(LayoutInflater.java:420)  at com.example.administrator.baba.Fragments.HomeFragment.getView(HomeFragment.java:96)  at android.support.v4.app.BackStackRecord.setFirstOut(BackStackRecord.java:813)  at android.support.v4.app.BackStackRecord.calculateFragments(BackStackRecord.java:885)

只要在xml布局中加入FloathingActionButton导致app运行崩溃

我的运行环境compileSdkVersion 24 buildToolsVersion "24.0.2" 我导入的是compile 'com.android.support:design:24.2.0'。 布局中是这样写的 <android.support.design.widget.FloatingActionButton android:src="@drawable/btn_bottom_back" android:alpha="0.9" android:layout_margin="20dp" android:backgroundTint="#111" android:layout_width="45dp" android:layout_height="45dp" /> 我觉得没有任何问题。 一跳转到activity就崩溃。 注册:<activity android:name=".activity.JingXuanArticleActivity"/> 报错内容为: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.wenny.themost/com.wenny.themost.activity.JingXuanArticleActivity}: android.view.InflateException: Binary XML file line #98: Binary XML file line #98: Error inflating class android.support.design.widget.FloatingActionButton Caused by: android.view.InflateException: Binary XML file line #98: Binary XML file line #98: Error inflating class android.support.design.widget.FloatingActionButton Caused by: android.view.InflateException: Binary XML file line #98: Error inflating class android.support.design.widget.FloatingActionButton Caused by: java.lang.reflect.InvocationTargetException at java.lang.reflect.Constructor.newInstance(Native Method) Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'android.graphics.drawable.Drawable android.graphics.drawable.Drawable$ConstantState.newDrawable()' on a null object reference

坐等解答:Unable to start activity ComponentInfo

程序手机运行OK,模拟器运行报错,求解答,贴出Logcat: 04-12 23:48:22.968: E/AndroidRuntime(1509): FATAL EXCEPTION: main 04-12 23:48:22.968: E/AndroidRuntime(1509): Process: com.gh.lighting, PID: 1509 04-12 23:48:22.968: E/AndroidRuntime(1509): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.gh.lighting/com.gh.lighting.ui.MainActivity}: android.view.InflateException: Binary XML file line #36: Error inflating class com.gh.lighting.widget.GhViewPager 04-12 23:48:22.968: E/AndroidRuntime(1509): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2195) 04-12 23:48:22.968: E/AndroidRuntime(1509): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245) 04-12 23:48:22.968: E/AndroidRuntime(1509): at android.app.ActivityThread.access$800(ActivityThread.java:135) 04-12 23:48:22.968: E/AndroidRuntime(1509): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196) 04-12 23:48:22.968: E/AndroidRuntime(1509): at android.os.Handler.dispatchMessage(Handler.java:102) 04-12 23:48:22.968: E/AndroidRuntime(1509): at android.os.Looper.loop(Looper.java:136) 04-12 23:48:22.968: E/AndroidRuntime(1509): at android.app.ActivityThread.main(ActivityThread.java:5017) 04-12 23:48:22.968: E/AndroidRuntime(1509): at java.lang.reflect.Method.invokeNative(Native Method) 04-12 23:48:22.968: E/AndroidRuntime(1509): at java.lang.reflect.Method.invoke(Method.java:515) 04-12 23:48:22.968: E/AndroidRuntime(1509): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779) 04-12 23:48:22.968: E/AndroidRuntime(1509): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595) 04-12 23:48:22.968: E/AndroidRuntime(1509): at dalvik.system.NativeStart.main(Native Method) 04-12 23:48:22.968: E/AndroidRuntime(1509): Caused by: android.view.InflateException: Binary XML file line #36: Error inflating class com.gh.lighting.widget.GhViewPager 04-12 23:48:22.968: E/AndroidRuntime(1509): at android.view.LayoutInflater.createView(LayoutInflater.java:620) 04-12 23:48:22.968: E/AndroidRuntime(1509): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:696) 04-12 23:48:22.968: E/AndroidRuntime(1509): at android.view.LayoutInflater.rInflate(LayoutInflater.java:755) 04-12 23:48:22.968: E/AndroidRuntime(1509): at android.view.LayoutInflater.rInflate(LayoutInflater.java:758) 04-12 23:48:22.968: E/AndroidRuntime(1509): at android.view.LayoutInflater.inflate(LayoutInflater.java:492) 04-12 23:48:22.968: E/AndroidRuntime(1509): at android.view.LayoutInflater.inflate(LayoutInflater.java:397) 04-12 23:48:22.968: E/AndroidRuntime(1509): at android.view.LayoutInflater.inflate(LayoutInflater.java:353) 04-12 23:48:22.968: E/AndroidRuntime(1509): at com.gh.lighting.widget.MainScreenFragment.onCreateView(MainScreenFragment.java:207) 04-12 23:48:22.968: E/AndroidRuntime(1509): at android.support.v4.app.Fragment.performCreateView(Fragment.java:1460) 04-12 23:48:22.968: E/AndroidRuntime(1509): at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:911) 04-12 23:48:22.968: E/AndroidRuntime(1509): at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1088) 04-12 23:48:22.968: E/AndroidRuntime(1509): at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:682) 04-12 23:48:22.968: E/AndroidRuntime(1509): at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1444) 04-12 23:48:22.968: E/AndroidRuntime(1509): at android.support.v4.app.FragmentActivity.onStart(FragmentActivity.java:551) 04-12 23:48:22.968: E/AndroidRuntime(1509): at com.gh.lighting.ui.MainActivity.onStart(MainActivity.java:466) 04-12 23:48:22.968: E/AndroidRuntime(1509): at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1171) 04-12 23:48:22.968: E/AndroidRuntime(1509): at android.app.Activity.performStart(Activity.java:5241) 04-12 23:48:22.968: E/AndroidRuntime(1509): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2168) 04-12 23:48:22.968: E/AndroidRuntime(1509): ... 11 more 04-12 23:48:22.968: E/AndroidRuntime(1509): Caused by: java.lang.reflect.InvocationTargetException 04-12 23:48:22.968: E/AndroidRuntime(1509): at java.lang.reflect.Constructor.constructNative(Native Method) 04-12 23:48:22.968: E/AndroidRuntime(1509): at java.lang.reflect.Constructor.newInstance(Constructor.java:423) 04-12 23:48:22.968: E/AndroidRuntime(1509): at android.view.LayoutInflater.createView(LayoutInflater.java:594) 04-12 23:48:22.968: E/AndroidRuntime(1509): ... 28 more 04-12 23:48:22.968: E/AndroidRuntime(1509): Caused by: android.content.res.Resources$NotFoundException: String resource ID #0x7f090104 04-12 23:48:22.968: E/AndroidRuntime(1509): at android.content.res.Resources.getText(Resources.java:244) 04-12 23:48:22.968: E/AndroidRuntime(1509): at android.content.res.Resources.getString(Resources.java:330) 04-12 23:48:22.968: E/AndroidRuntime(1509): at android.content.Context.getString(Context.java:343) 04-12 23:48:22.968: E/AndroidRuntime(1509): at com.gh.lighting.widget.GhViewPager.init(GhViewPager.java:95) 04-12 23:48:22.968: E/AndroidRuntime(1509): at com.gh.lighting.widget.GhViewPager.<init>(GhViewPager.java:88) 04-12 23:48:22.968: E/AndroidRuntime(1509): ... 31 more

android studio真机运行没问题,genymotion运行报错

配置android studio+genymotion导入自己的项目,编译没有问题,在自己的真机环境也可以运行,用genymotion启动运行后就报错 报错如下: ![图片说明](https://img-ask.csdn.net/upload/201607/15/1468547526_916969.png) 07-14 21:48:51.428 7839-7839/com.painter.bdcircle D/AndroidRuntime: Shutting down VM 07-14 21:48:51.428 7839-7839/com.painter.bdcircle W/dalvikvm: threadid=1: thread exiting with uncaught exception (group=0xa4c9bb20) 07-14 21:48:51.428 7839-7839/com.painter.bdcircle E/AndroidRuntime: FATAL EXCEPTION: main Process: com.painter.bdcircle, PID: 7839 java.lang.RuntimeException: Unable to start activity ComponentInfo{com.painter.bdcircle/com.painter.bdcircle.activity.SplashActivity}: android.view.InflateException: Binary XML file line #7: Error inflating class android.widget.ImageView at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2184) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2233) at android.app.ActivityThread.access$800(ActivityThread.java:135) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:136) at android.app.ActivityThread.main(ActivityThread.java:5001) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:515) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601) at dalvik.system.NativeStart.main(Native Method) Caused by: android.view.InflateException: Binary XML file line #7: Error inflating class android.widget.ImageView at android.view.LayoutInflater.createView(LayoutInflater.java:620) at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56) 网上有一篇和我类似文章:http://bbs.csdn.net/topics/391921707 说gradle2.0+ 配置 android { defaultConfig { vectorDrawables.useSupportLibrary = true } } 但我加上后编译运行还是一样的错误

java.lang.reflect.InvocationTargetException

java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.myprogress/com.example.myprogress.MainActivity}: android.view.InflateException: Binary XML file line #62: Error inflating class com.example.myprogress.MaskProgressView at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2219) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2269) at android.app.ActivityThread.access$800(ActivityThread.java:135) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:136) at android.app.ActivityThread.main(ActivityThread.java:5045) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:515) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595) at dalvik.system.NativeStart.main(Native Method) Caused by: android.view.InflateException: Binary XML file line #62: Error inflating class com.example.myprogress.MaskProgressView at android.view.LayoutInflater.createView(LayoutInflater.java:620) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:696) at android.view.LayoutInflater.rInflate(LayoutInflater.java:755) at android.view.LayoutInflater.inflate(LayoutInflater.java:492) at android.view.LayoutInflater.inflate(LayoutInflater.java:397) at android.view.LayoutInflater.inflate(LayoutInflater.java:353) at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:289) at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:139) at com.example.myprogress.MainActivity.onCreate(MainActivity.java:28) at android.app.Activity.performCreate(Activity.java:5231) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1104) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2163) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2269)  at android.app.ActivityThread.access$800(ActivityThread.java:135)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)  at android.os.Handler.dispatchMessage(Handler.java:102)  at android.os.Looper.loop(Looper.java:136)  at android.app.ActivityThread.main(ActivityThread.java:5045)  at java.lang.reflect.Method.invokeNative(Native Method)  at java.lang.reflect.Method.invoke(Method.java:515)  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)  at dalvik.system.NativeStart.main(Native Method)  Caused by: java.lang.reflect.InvocationTargetException at java.lang.reflect.Constructor.constructNative(Native Method) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at android.view.LayoutInflater.createView(LayoutInflater.java:594) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:696)  at android.view.LayoutInflater.rInflate(LayoutInflater.java:755)  at android.view.LayoutInflater.inflate(LayoutInflater.java:492)  at android.view.LayoutInflater.inflate(LayoutInflater.java:397)  at android.view.LayoutInflater.inflate(LayoutInflater.java:353)  at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:289)  at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:139)  at com.example.myprogress.MainActivity.onCreate(MainActivity.java:28)  at android.app.Activity.performCreate(Activity.java:5231)  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1104)  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2163)  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2269)  at android.app.ActivityThread.access$800(ActivityThread.java:135)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)  at android.os.Handler.dispatchMessage(Handler.java:102)  at android.os.Looper.loop(Looper.java:136)  at android.app.ActivityThread.main(ActivityThread.java:5045)  at java.lang.reflect.Method.invokeNative(Native Method)  at java.lang.reflect.Method.invoke(Method.java:515)  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)  at dalvik.system.NativeStart.main(Native Method)  Caused by: java.lang.RuntimeException: native typeface cannot be made at android.graphics.Typeface.<init>(Typeface.java:175) at android.graphics.Typeface.createFromAsset(Typeface.java:149) at com.example.myprogress.MaskProgressView.init(MaskProgressView.java:229) at com.example.myprogress.MaskProgressView.<init>(MaskProgressView.java:181) at java.lang.reflect.Constructor.constructNative(Native Method)  at java.lang.reflect.Constructor.newInstance(Constructor.java:423)  at android.view.LayoutInflater.createView(LayoutInflater.java:594)  at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:696)  at android.view.LayoutInflater.rInflate(LayoutInflater.java:755)  at android.view.LayoutInflater.inflate(LayoutInflater.java:492)  at android.view.LayoutInflater.inflate(LayoutInflater.java:397)  at android.view.LayoutInflater.inflate(LayoutInflater.java:353)  at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:289)  at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:139)  at com.example.myprogress.MainActivity.onCreate(MainActivity.java:28)  at android.app.Activity.performCreate(Activity.java:5231)  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1104)  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2163)  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2269)  at android.app.ActivityThread.access$800(ActivityThread.java:135)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)  at android.os.Handler.dispatchMessage(Handler.java:102)  at android.os.Looper.loop(Looper.java:136)  at android.app.ActivityThread.main(ActivityThread.java:5045)  at java.lang.reflect.Method.invokeNative(Native Method)  at java.lang.reflect.Method.invoke(Method.java:515)  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)  at dalvik.system.NativeStart.main(Native Method) 

新建了一个安卓项目,什么代码都没改动运行后就报错,请问是什么原因呢

05-06 23:54:39.382 26163-26163/test.an.myapplication E/AndroidRuntime: FATAL EXCEPTION: main Process: test.an.myapplication, PID: 26163 java.lang.RuntimeException: Unable to start activity ComponentInfo{test.an.myapplication/test.an.myapplication.MainActivity}: android.view.InflateException: Binary XML file line #0: Binary XML file line #0: Error inflating class android.support.v7.widget.Toolbar at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2757) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2818) at android.app.ActivityThread.-wrap12(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1557) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:163) at android.app.ActivityThread.main(ActivityThread.java:6395) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:794) Caused by: android.view.InflateException: Binary XML file line #0: Binary XML file line #0: Error inflating class android.support.v7.widget.Toolbar Caused by: android.view.InflateException: Binary XML file line #0: Error inflating class android.support.v7.widget.Toolbar 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.rInflate(LayoutInflater.java:886) 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 android.view.LayoutInflater.inflate(LayoutInflater.java:377) at android.support.v7.app.AppCompatDelegateImplV9.createSubDecor(AppCompatDelegateImplV9.java:406) at android.support.v7.app.AppCompatDelegateImplV9.ensureSubDecor(AppCompatDelegateImplV9.java:323) at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:284) at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:139) at test.an.myapplication.MainActivity.onCreate(MainActivity.java:11) at android.app.Activity.performCreate(Activity.java:6868) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1119) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2710) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2818) at android.app.ActivityThread.-wrap12(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1557) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:163) at android.app.ActivityThread.main(ActivityThread.java:6395) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:794) Caused by: java.lang.UnsupportedOperationException: Can't convert value at index 10 to dimension: type=0x1 at android.content.res.TypedArray.getDimensionPixelOffset(TypedArray.java:672) at android.support.v7.widget.TintTypedArray.getDimensionPixelOffset(TintTypedArray.java:188) at android.support.v7.widget.Toolbar.<init>(Toolbar.java:293) at android.support.v7.widget.Toolbar.<init>(Toolbar.java:228) 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.rInflate(LayoutInflater.java:886)  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 android.view.LayoutInflater.inflate(LayoutInflater.java:377)  at android.support.v7.app.AppCompatDelegateImplV9.createSubDecor(AppCompatDelegateImplV9.java:406)  at android.support.v7.app.AppCompatDelegateImplV9.ensureSubDecor(AppCompatDelegateImplV9.java:323)  at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:284)  at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:139)  at test.an.myapplication.MainActivity.onCreate(MainActivity.java:11)  at android.app.Activity.performCreate(Activity.java:6868)  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1119)  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2710)  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2818)  at android.app.ActivityThread.-wrap12(ActivityThread.java)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1557)  at android.os.Handler.dispatchMessage(Handler.java:102)  at android.os.Looper.loop(Looper.java:163)  at android.app.ActivityThread.main(ActivityThread.java:6395)  at java.lang.reflect.Method.invoke(Native Method)  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:794)  ![图片说明](https://img-ask.csdn.net/upload/201905/07/1557158479_82650.png)

使用viewpager报这个错是怎么回事

这个是包的什么问题。。。。 ``` 03-22 03:49:15.368: E/AndroidRuntime(1612): FATAL EXCEPTION: main 03-22 03:49:15.368: E/AndroidRuntime(1612): Process: com.example.hospitalmain, PID: 1612 03-22 03:49:15.368: E/AndroidRuntime(1612): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.hospitalmain/com.example.hospitalmain.MainActivity}: android.view.InflateException: Binary XML file line #8: Error inflating class android.support.v4.View.ViewPager 03-22 03:49:15.368: E/AndroidRuntime(1612): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2184) 03-22 03:49:15.368: E/AndroidRuntime(1612): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2233) 03-22 03:49:15.368: E/AndroidRuntime(1612): at android.app.ActivityThread.access$800(ActivityThread.java:135) 03-22 03:49:15.368: E/AndroidRuntime(1612): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196) 03-22 03:49:15.368: E/AndroidRuntime(1612): at android.os.Handler.dispatchMessage(Handler.java:102) 03-22 03:49:15.368: E/AndroidRuntime(1612): at android.os.Looper.loop(Looper.java:136) 03-22 03:49:15.368: E/AndroidRuntime(1612): at android.app.ActivityThread.main(ActivityThread.java:5001) 03-22 03:49:15.368: E/AndroidRuntime(1612): at java.lang.reflect.Method.invokeNative(Native Method) 03-22 03:49:15.368: E/AndroidRuntime(1612): at java.lang.reflect.Method.invoke(Method.java:515) 03-22 03:49:15.368: E/AndroidRuntime(1612): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785) 03-22 03:49:15.368: E/AndroidRuntime(1612): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601) 03-22 03:49:15.368: E/AndroidRuntime(1612): at dalvik.system.NativeStart.main(Native Method) 03-22 03:49:15.368: E/AndroidRuntime(1612): Caused by: android.view.InflateException: Binary XML file line #8: Error inflating class android.support.v4.View.ViewPager 03-22 03:49:15.368: E/AndroidRuntime(1612): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:707) 03-22 03:49:15.368: E/AndroidRuntime(1612): at android.view.LayoutInflater.rInflate(LayoutInflater.java:755) 03-22 03:49:15.368: E/AndroidRuntime(1612): at android.view.LayoutInflater.inflate(LayoutInflater.java:492) 03-22 03:49:15.368: E/AndroidRuntime(1612): at android.view.LayoutInflater.inflate(LayoutInflater.java:397) 03-22 03:49:15.368: E/AndroidRuntime(1612): at android.view.LayoutInflater.inflate(LayoutInflater.java:353) 03-22 03:49:15.368: E/AndroidRuntime(1612): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:290) 03-22 03:49:15.368: E/AndroidRuntime(1612): at android.app.Activity.setContentView(Activity.java:1929) 03-22 03:49:15.368: E/AndroidRuntime(1612): at com.example.hospitalmain.MainActivity.onCreate(MainActivity.java:13) 03-22 03:49:15.368: E/AndroidRuntime(1612): at android.app.Activity.performCreate(Activity.java:5231) 03-22 03:49:15.368: E/AndroidRuntime(1612): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087) 03-22 03:49:15.368: E/AndroidRuntime(1612): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2148) 03-22 03:49:15.368: E/AndroidRuntime(1612): ... 11 more 03-22 03:49:15.368: E/AndroidRuntime(1612): Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.v4.View.ViewPager" on path: DexPathList[[zip file "/data/app/com.example.hospitalmain-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.example.hospitalmain-1, /system/lib]] 03-22 03:49:15.368: E/AndroidRuntime(1612): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56) 03-22 03:49:15.368: E/AndroidRuntime(1612): at java.lang.ClassLoader.loadClass(ClassLoader.java:497) 03-22 03:49:15.368: E/AndroidRuntime(1612): at java.lang.ClassLoader.loadClass(ClassLoader.java:457) 03-22 03:49:15.368: E/AndroidRuntime(1612): at android.view.LayoutInflater.createView(LayoutInflater.java:559) 03-22 03:49:15.368: E/AndroidRuntime(1612): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:696) 03-22 03:49:15.368: E/AndroidRuntime(1612): ... 21 more ```

android打开activity报错崩溃

今天腾讯bugly给我反馈的问题 在oppo4.0的手机上 打开我项目的直播界面报错并崩溃  super.onCreate(savedInstanceState); 这句代码崩溃的~ 网上的大神说的都是引用第三份的问题 实在无法解决 求帮助 Caused by: 5 java.lang.ClassNotFoundException:Didn't find class "android.media.projection.MediaProjection" on path: DexPathList[[dex file "dalvik.system.DexFile@4362e4a0", dex file "dalvik.system.DexFile@43651f50", dex file "dalvik.system.DexFile@43665af8", zip file "/data/app/cn.dlc.Baimi-1.apk"],nativeLibraryDirectories=[/data/app-lib/cn.dlc.Baimi-1, /vendor/lib, /system/lib]] 6 dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56) 7 java.lang.ClassLoader.loadClass(ClassLoader.java:497) 8 java.lang.ClassLoader.loadClass(ClassLoader.java:457) 9 java.lang.Class.getDeclaredMethods(Native Method) 10 java.lang.Class.getPublicMethodsRecursive(Class.java:894) 11 java.lang.Class.getMethods(Class.java:877) 12 org.greenrobot.eventbus.SubscriberMethodFinder.findUsingReflectionInSingleClass(SubscriberMethodFinder.java:157) 13 org.greenrobot.eventbus.SubscriberMethodFinder.findUsingInfo(SubscriberMethodFinder.java:88) 14 org.greenrobot.eventbus.SubscriberMethodFinder.findSubscriberMethods(SubscriberMethodFinder.java:64) 15 org.greenrobot.eventbus.EventBus.register(EventBus.java:140) 16 cn.dlc.commonlibrary.ui.activity.BaseCommonActivity.onCreate(BaseCommonActivity.java:92) 17 cn.dlc.Baimi.base.activity.BaseActivity.onCreate(BaseActivity.java:99) 18 cn.dlc.Baimi.base.activity.BaseShareActivity.onCreate(BaseShareActivity.java:47) 19 cn.dlc.Baimi.game.activity.GameActivity.onCreate(GameActivity.java:229)

android中fragment的使用问题。

程序在打开的时候就报错。 这是Android Monitor上的信息: 12-05 01:51:58.359 21231-21231/com.thefat.lingjunqi.enricher E/AndroidRuntime: FATAL EXCEPTION: main 12-05 01:51:58.359 21231-21231/com.thefat.lingjunqi.enricher E/AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.thefat.lingjunqi.enricher/com.thefat.lingjunqi.enricher.MainActivity}: android.view.InflateException: Binary XML file line #6: Error inflating class fragment ## 问题已经解决,谢谢大家 ##

android 压力测试测出的bug

自定义控件MyButton,已经实现了三个构造函数,希望哪位大神帮帮忙查看下,给些意见,感激不尽 FATAL EXCEPTION: main 01-02 00:32:39.600 E/AndroidRuntime( 6275): Process: com.simple.zjx.main, PID: 6275 01-02 00:32:39.600 E/AndroidRuntime( 6275): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.simple.zjx.main/com.simple.zjx.main.MysimpleMain}: android.view.InflateException: Binary XML file line #25: Error inflating class com.simple.zjx.main.custom.button.MyButton 01-02 00:32:39.600 E/AndroidRuntime( 6275): Caused by: android.view.InflateException: Binary XML file line #25: Error inflating class com.simple.zjx.main.custom.button.MyButton 01-02 00:32:39.600 E/AndroidRuntime( 6275): Caused by: java.lang.reflect.InvocationTargetException: 01-02 00:32:39.600 E/AndroidRuntime( 6275): at java.lang.reflect.Constructor.constructNative(Native Method) 01-02 00:32:39.600 E/AndroidRuntime( 6275): at java.lang.reflect.Constructor.newInstance(Constructor.java:423) 01-02 00:32:39.600 E/AndroidRuntime( 6275): at android.view.LayoutInflater.createView(LayoutInflater.java:594) 01-02 00:32:39.600 E/AndroidRuntime( 6275): ... 21 more

自定义ViewGroup,调试抛出Error inflating class,求构造函数以外的原因?

照着https://blog.csdn.net/lmj623565791/article/details/43131133这个网址想实现一个圆形旋转菜单,调试时发现在主页面的setContentView一步抛出 Error inflating class......异常,即自己的自定义ViewGroup无法被初始化,度娘说是构造函数的原因,但我确实把所有能找到的不同参数情况都加上去了,经测也不是未引用完整包名的原因;请问诸位,还可能是什么原因? 先抛异常: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.asus.newsapplication/com.example.asus.newsapplication.MainPage}: android.view.InflateException: Binary XML file line #12: Error inflating class com.example.asus.newsapplication.CircleMenuLayout at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2325) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387) at android.app.ActivityThread.access$800(ActivityThread.java:151) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5254) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:905) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:700) Caused by: android.view.InflateException: Binary XML file line #12: Error inflating class com.example.asus.newsapplication.CircleMenuLayout at android.view.LayoutInflater.createView(LayoutInflater.java:633) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:743) at android.view.LayoutInflater.rInflate(LayoutInflater.java:806) at android.view.LayoutInflater.inflate(LayoutInflater.java:504) at android.view.LayoutInflater.inflate(LayoutInflater.java:414) at android.view.LayoutInflater.inflate(LayoutInflater.java:365) at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:287) at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:139) at com.example.asus.newsapplication.MainPage.onCreate(MainPage.java:16) at android.app.Activity.performCreate(Activity.java:5990) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2278) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387)  at android.app.ActivityThread.access$800(ActivityThread.java:151)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303)  at android.os.Handler.dispatchMessage(Handler.java:102)  at android.os.Looper.loop(Looper.java:135)  at android.app.ActivityThread.main(ActivityThread.java:5254)  at java.lang.reflect.Method.invoke(Native Method)  at java.lang.reflect.Method.invoke(Method.java:372)  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:905)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:700)  Caused by: java.lang.InstantiationException: Can't instantiate abstract class com.example.asus.newsapplication.CircleMenuLayout at java.lang.reflect.Constructor.newInstance(Native Method) at java.lang.reflect.Constructor.newInstance(Constructor.java:288) at android.view.LayoutInflater.createView(LayoutInflater.java:607) at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:743)  at android.view.LayoutInflater.rInflate(LayoutInflater.java:806)  at android.view.LayoutInflater.inflate(LayoutInflater.java:504)  at android.view.LayoutInflater.inflate(LayoutInflater.java:414)  at android.view.LayoutInflater.inflate(LayoutInflater.java:365)  at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:287)  at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:139)  at com.example.asus.newsapplication.MainPage.onCreate(MainPage.java:16)  at android.app.Activity.performCreate(Activity.java:5990)  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2278)  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387)  at android.app.ActivityThread.access$800(ActivityThread.java:151)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303)  at android.os.Handler.dispatchMessage(Handler.java:102)  at android.os.Looper.loop(Looper.java:135)  at android.app.ActivityThread.main(ActivityThread.java:5254)  at java.lang.reflect.Method.invoke(Native Method)  at java.lang.reflect.Method.invoke(Method.java:372)  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:905)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:700)  再贴图片: ![图片说明](https://img-ask.csdn.net/upload/201806/05/1528204867_673557.png) ![图片说明](https://img-ask.csdn.net/upload/201806/05/1528204937_810371.png) ![图片说明](https://img-ask.csdn.net/upload/201806/05/1528204988_880336.png)

大学四年自学走来,这些私藏的实用工具/学习网站我贡献出来了

大学四年,看课本是不可能一直看课本的了,对于学习,特别是自学,善于搜索网上的一些资源来辅助,还是非常有必要的,下面我就把这几年私藏的各种资源,网站贡献出来给你们。主要有:电子书搜索、实用工具、在线视频学习网站、非视频学习网站、软件下载、面试/求职必备网站。 注意:文中提到的所有资源,文末我都给你整理好了,你们只管拿去,如果觉得不错,转发、分享就是最大的支持了。 一、电子书搜索 对于大部分程序员...

在中国程序员是青春饭吗?

今年,我也32了 ,为了不给大家误导,咨询了猎头、圈内好友,以及年过35岁的几位老程序员……舍了老脸去揭人家伤疤……希望能给大家以帮助,记得帮我点赞哦。 目录: 你以为的人生 一次又一次的伤害 猎头界的真相 如何应对互联网行业的「中年危机」 一、你以为的人生 刚入行时,拿着傲人的工资,想着好好干,以为我们的人生是这样的: 等真到了那一天,你会发现,你的人生很可能是这样的: ...

Java基础知识面试题(2020最新版)

文章目录Java概述何为编程什么是Javajdk1.5之后的三大版本JVM、JRE和JDK的关系什么是跨平台性?原理是什么Java语言有哪些特点什么是字节码?采用字节码的最大好处是什么什么是Java程序的主类?应用程序和小程序的主类有何不同?Java应用程序与小程序之间有那些差别?Java和C++的区别Oracle JDK 和 OpenJDK 的对比基础语法数据类型Java有哪些数据类型switc...

我以为我学懂了数据结构,直到看了这个导图才发现,我错了

数据结构与算法思维导图

String s = new String(" a ") 到底产生几个对象?

老生常谈的一个梗,到2020了还在争论,你们一天天的,哎哎哎,我不是针对你一个,我是说在座的各位都是人才! 上图红色的这3个箭头,对于通过new产生一个字符串(”宜春”)时,会先去常量池中查找是否已经有了”宜春”对象,如果没有则在常量池中创建一个此字符串对象,然后堆中再创建一个常量池中此”宜春”对象的拷贝对象。 也就是说准确答案是产生了一个或两个对象,如果常量池中原来没有 ”宜春” ,就是两个。...

技术大佬:我去,你写的 switch 语句也太老土了吧

昨天早上通过远程的方式 review 了两名新来同事的代码,大部分代码都写得很漂亮,严谨的同时注释也很到位,这令我非常满意。但当我看到他们当中有一个人写的 switch 语句时,还是忍不住破口大骂:“我擦,小王,你丫写的 switch 语句也太老土了吧!” 来看看小王写的代码吧,看完不要骂我装逼啊。 private static String createPlayer(PlayerTypes p...

Linux面试题(2020最新版)

文章目录Linux 概述什么是LinuxUnix和Linux有什么区别?什么是 Linux 内核?Linux的基本组件是什么?Linux 的体系结构BASH和DOS之间的基本区别是什么?Linux 开机启动过程?Linux系统缺省的运行级别?Linux 使用的进程间通信方式?Linux 有哪些系统日志文件?Linux系统安装多个桌面环境有帮助吗?什么是交换空间?什么是root帐户什么是LILO?什...

Linux命令学习神器!命令看不懂直接给你解释!

大家都知道,Linux 系统有非常多的命令,而且每个命令又有非常多的用法,想要全部记住所有命令的所有用法,恐怕是一件不可能完成的任务。 一般情况下,我们学习一个命令时,要么直接百度去搜索它的用法,要么就直接用 man 命令去查看守冗长的帮助手册。这两个都可以实现我们的目标,但有没有更简便的方式呢? 答案是必须有的!今天给大家推荐一款有趣而实用学习神器 — kmdr,让你解锁 Linux 学习新姿势...

和黑客斗争的 6 天!

互联网公司工作,很难避免不和黑客们打交道,我呆过的两家互联网公司,几乎每月每天每分钟都有黑客在公司网站上扫描。有的是寻找 Sql 注入的缺口,有的是寻找线上服务器可能存在的漏洞,大部分都...

史上最全的 python 基础知识汇总篇,没有比这再全面的了,建议收藏

网友们有福了,小编终于把基础篇的内容全部涉略了一遍,这是一篇关于基础知识的汇总的文章,请朋友们收下,不用客气,不过文章篇幅肯能会有点长,耐心阅读吧爬虫(七十)多进程multiproces...

讲一个程序员如何副业月赚三万的真实故事

loonggg读完需要3分钟速读仅需 1 分钟大家好,我是你们的校长。我之前讲过,这年头,只要肯动脑,肯行动,程序员凭借自己的技术,赚钱的方式还是有很多种的。仅仅靠在公司出卖自己的劳动时...

女程序员,为什么比男程序员少???

昨天看到一档综艺节目,讨论了两个话题:(1)中国学生的数学成绩,平均下来看,会比国外好?为什么?(2)男生的数学成绩,平均下来看,会比女生好?为什么?同时,我又联想到了一个技术圈经常讨...

85后蒋凡:28岁实现财务自由、34岁成为阿里万亿电商帝国双掌门,他的人生底层逻辑是什么?...

蒋凡是何许人也? 2017年12月27日,在入职4年时间里,蒋凡开挂般坐上了淘宝总裁位置。 为此,时任阿里CEO张勇在任命书中力赞: 蒋凡加入阿里,始终保持创业者的冲劲,有敏锐的...

总结了 150 余个神奇网站,你不来瞅瞅吗?

原博客再更新,可能就没了,之后将持续更新本篇博客。

副业收入是我做程序媛的3倍,工作外的B面人生是怎样的?

提到“程序员”,多数人脑海里首先想到的大约是:为人木讷、薪水超高、工作枯燥…… 然而,当离开工作岗位,撕去层层标签,脱下“程序员”这身外套,有的人生动又有趣,马上展现出了完全不同的A/B面人生! 不论是简单的爱好,还是正经的副业,他们都干得同样出色。偶尔,还能和程序员的特质结合,产生奇妙的“化学反应”。 @Charlotte:平日素颜示人,周末美妆博主 大家都以为程序媛也个个不修边幅,但我们也许...

MySQL数据库面试题(2020最新版)

文章目录数据库基础知识为什么要使用数据库什么是SQL?什么是MySQL?数据库三大范式是什么mysql有关权限的表都有哪几个MySQL的binlog有有几种录入格式?分别有什么区别?数据类型mysql有哪些数据类型引擎MySQL存储引擎MyISAM与InnoDB区别MyISAM索引与InnoDB索引的区别?InnoDB引擎的4大特性存储引擎选择索引什么是索引?索引有哪些优缺点?索引使用场景(重点)...

新一代神器STM32CubeMonitor介绍、下载、安装和使用教程

关注、星标公众号,不错过精彩内容作者:黄工公众号:strongerHuang最近ST官网悄悄新上线了一款比较强大的工具:STM32CubeMonitor V1.0.0。经过我研究和使用之...

如果你是老板,你会不会踢了这样的员工?

有个好朋友ZS,是技术总监,昨天问我:“有一个老下属,跟了我很多年,做事勤勤恳恳,主动性也很好。但随着公司的发展,他的进步速度,跟不上团队的步伐了,有点...

我入职阿里后,才知道原来简历这么写

私下里,有不少读者问我:“二哥,如何才能写出一份专业的技术简历呢?我总感觉自己写的简历太烂了,所以投了无数份,都石沉大海了。”说实话,我自己好多年没有写过简历了,但我认识的一个同行,他在阿里,给我说了一些他当年写简历的方法论,我感觉太牛逼了,实在是忍不住,就分享了出来,希望能够帮助到你。 01、简历的本质 作为简历的撰写者,你必须要搞清楚一点,简历的本质是什么,它就是为了来销售你的价值主张的。往深...

大学一路走来,学习互联网全靠这几个网站,最终拿下了一把offer

大佬原来都是这样炼成的

离职半年了,老东家又发 offer,回不回?

有小伙伴问松哥这个问题,他在上海某公司,在离职了几个月后,前公司的领导联系到他,希望他能够返聘回去,他很纠结要不要回去? 俗话说好马不吃回头草,但是这个小伙伴既然感到纠结了,我觉得至少说明了两个问题:1.曾经的公司还不错;2.现在的日子也不是很如意。否则应该就不会纠结了。 老实说,松哥之前也有过类似的经历,今天就来和小伙伴们聊聊回头草到底吃不吃。 首先一个基本观点,就是离职了也没必要和老东家弄的苦...

为什么你不想学习?只想玩?人是如何一步一步废掉的

不知道是不是只有我这样子,还是你们也有过类似的经历。 上学的时候总有很多光辉历史,学年名列前茅,或者单科目大佬,但是虽然慢慢地长大了,你开始懈怠了,开始废掉了。。。 什么?你说不知道具体的情况是怎么样的? 我来告诉你: 你常常潜意识里或者心理觉得,自己真正的生活或者奋斗还没有开始。总是幻想着自己还拥有大把时间,还有无限的可能,自己还能逆风翻盘,只不是自己还没开始罢了,自己以后肯定会变得特别厉害...

什么时候跳槽,为什么离职,你想好了么?

都是出来打工的,多为自己着想

为什么程序员做外包会被瞧不起?

二哥,有个事想询问下您的意见,您觉得应届生值得去外包吗?公司虽然挺大的,中xx,但待遇感觉挺低,马上要报到,挺纠结的。

当HR压你价,说你只值7K,你该怎么回答?

当HR压你价,说你只值7K时,你可以流畅地回答,记住,是流畅,不能犹豫。 礼貌地说:“7K是吗?了解了。嗯~其实我对贵司的面试官印象很好。只不过,现在我的手头上已经有一份11K的offer。来面试,主要也是自己对贵司挺有兴趣的,所以过来看看……”(未完) 这段话主要是陪HR互诈的同时,从公司兴趣,公司职员印象上,都给予对方正面的肯定,既能提升HR的好感度,又能让谈判气氛融洽,为后面的发挥留足空间。...

面试阿里p7,被按在地上摩擦,鬼知道我经历了什么?

面试阿里p7被问到的问题(当时我只知道第一个):@Conditional是做什么的?@Conditional多个条件是什么逻辑关系?条件判断在什么时候执...

你期望月薪4万,出门右拐,不送,这几个点,你也就是个初级的水平

先来看几个问题通过注解的方式注入依赖对象,介绍一下你知道的几种方式@Autowired和@Resource有何区别说一下@Autowired查找候选者的...

面试了一个 31 岁程序员,让我有所触动,30岁以上的程序员该何去何从?

最近面试了一个31岁8年经验的程序猿,让我有点感慨,大龄程序猿该何去何从。

大三实习生,字节跳动面经分享,已拿Offer

说实话,自己的算法,我一个不会,太难了吧

程序员垃圾简历长什么样?

已经连续五年参加大厂校招、社招的技术面试工作,简历看的不下于万份 这篇文章会用实例告诉你,什么是差的程序员简历! 疫情快要结束了,各个公司也都开始春招了,作为即将红遍大江南北的新晋UP主,那当然要为小伙伴们做点事(手动狗头)。 就在公众号里公开征简历,义务帮大家看,并一一点评。《启舰:春招在即,义务帮大家看看简历吧》 一石激起千层浪,三天收到两百多封简历。 花光了两个星期的所有空闲时...

立即提问
相关内容推荐