由我正在测试的其他人制作的应用程序,并从崩溃和logcat中学习这样的错误。你能告诉我它是什么意思,我该怎么办?我认为包名有一些东西。但是,当我检查SquareImageView的包名时,它显示了我的包:com.stek.ca_ltd.memestackupdating但不是在logcat中显示为该类的包名(tabian.com.instagramclone2)
31.863 4690-4690/com.stek.ca_ltd.memestackupdating E/libEGL: call to OpenGL ES API with no current context (logged once per thread)
10-09 15:56:31.883 4690-4690/com.stek.ca_ltd.memestackupdating D/AndroidRuntime: Shutting down VM
10-09 15:56:31.893 4690-4690/com.stek.ca_ltd.memestackupdating E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.stek.ca_ltd.memestackupdating, PID: 4690
android.view.InflateException: Binary XML file line #6: Binary XML file line #6: Error inflating class tabian.com.instagramclone2.Utils.SquareImageView
at android.view.LayoutInflater.inflate(LayoutInflater.java:551)
at android.view.LayoutInflater.inflate(LayoutInflater.java:429)
at com.stek.ca_ltd.memestackupdating.Utils.GridImageAdapter.getView(GridImageAdapter.java:55)
at android.widget.AbsListView.obtainView(AbsListView.java:2929)
at android.widget.GridView.onMeasure(GridView.java:1069)
at android.view.View.measure(View.java:20151)
at android.widget.LinearLayout.measureVertical(LinearLayout.java:900)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:629)
at android.view.View.measure(View.java:20151)
at android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:716)
at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:462)
at android.view.View.measure(View.java:20151)
at android.support.v4.view.ViewPager.onMeasure(ViewPager.java:1658)
at android.view.View.measure(View.java:20151)
at android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:716)
at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:462)
at android.view.View.measure(View.java:20151)
at android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:716)
at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:462)
at android.view.View.measure(View.java:20151)
at android.widget.RelativeLayout.measureChildHorizontal(RelativeLayout.java:716)
at android.widget.RelativeLayout.onMeasure(RelativeLayout.java:462)
at android.view.View.measure(View.java:20151)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6328)
at android.support.design.widget.CoordinatorLayout.onMeasureChild(CoordinatorLayout.java:714)
at android.support.design.widget.CoordinatorLayout.onMeasure(CoordinatorLayout.java:786)
at android.view.View.measure(View.java:20151)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6328)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:194)
at android.support.v7.widget.ContentFrameLayout.onMeasure(ContentFrameLayout.java:139)
at android.view.View.measure(View.java:20151)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6328)
at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1464)
at android.widget.LinearLayout.measureVertical(LinearLayout.java:747)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:629)
at android.view.View.measure(View.java:20151)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6328)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:194)
at android.view.View.measure(View.java:20151)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6328)
at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1464)
at android.widget.LinearLayout.measureVertical(LinearLayout.java:747)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:629)
at android.view.View.measure(View.java:20151)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6328)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:194)
at com.android.internal.policy.PhoneWindow$DecorView.onMeasure(PhoneWindow.java:3158)
at android.view.View.measure(View.java:20151)
at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:2594)
at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1549)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1841)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1437)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7397)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:920)
at android.view.Choreographer.doCallbacks(Choreographer.java:695)
at android.view.Choreographer.doFrame(Choreographer.java:631)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:906)
at a
10-09 15:56:31.903 1574-3988/? W/ActivityManager: Force finishing activity com.stek.ca_ltd.memestackupdating/.Share.ShareActivity
10-09 15:56:31.913 1574-3988/? D/InputDispatcher: Focused application set to: xxxx
10-09 15:56:31.913 1574-3988/? W/ActivityManager: Force finishing activity com.stek.ca_ltd.memestackupdating/.Profile.ProfileActivity
10-09 15:56:31.913 1574-3988/? D/InputDispatcher: Focused application set to: xxxx
答案 0 :(得分:0)
Android运行时在您的视图中找不到df = pd.concat([df['result'],df['student']], axis=1).sort_index(axis=1)
print (df)
A A B B
id
1 1 3 2 4
2 5 7 6 8
。你指的是错误的阶级。为SquareImageView提供正确的包名称。
您可能已将SquareImageView自定义为您自己的类。并且,后来忘了将它在xml中更改为您自己的自定义SquareImageView。
tabian.com.instagramclone2.Utils.SquareImageView
在哪里?
答案 1 :(得分:0)
这意味着您在XML文件中使用的类在您的项目中不存在,这就是为什么在夸大类中的布局时会引发错误,您需要为它提供类
答案 2 :(得分:0)
转到您的layout_view_post.xml,在此重新制作SquareImageView小部件。该错误最有可能是因为您的项目名称不同,即与tabian.com.instagramclone2不同,并且您已经从github复制并粘贴了代码。因此,在“ Utils.SquareImageView”之前,请用您自己的包/项目名称替换“ tabian.com.instagramclone2”,否则重新制作小部件。