gpt4 book ai didi

Android 获取条目失败

转载 作者:行者123 更新时间:2023-11-29 20:24:13 24 4
gpt4 key购买 nike

好的,所以我收到了这个错误:

W/ResourceType﹕ Failure getting entry for 0x01080ac1 (t=7 e=2753) (error -75)

每次动态扩充布局然后添加它时都会发生这种情况。使用调试器,我已将位置精确定位到:

    /**
* Create a new ScrollableVerticalListView.
*
* @param context the context to create the LinearLayout in.
* @param fullWidth The width to set on the LinearLayout.
*/
public ScrollableVerticalListView(Context context, final int fullWidth) {
super(context);
setOrientation(LinearLayout.VERTICAL);
innerLinearLayout = new LinearLayout(context);
innerLinearLayout.setOrientation(LinearLayout.VERTICAL);

MainActivity.getInstance().runOnUiThread(
new Runnable() {
@Override
public void run() {
setWidth(fullWidth);
}
});
ScrollView scrollView = new ScrollView(context);//<--No error in logcat
scrollView.addView(innerLinearLayout);//<--Error in logcat
super.addView(scrollView);
}

此类扩展了 LinearLayout。关于如何消除此警告的任何想法?

最佳答案

尝试在项目中的 R.java 中跟踪资源 ID 0x01080ac1。检查资源的路径是否正确。从这篇文章的答案中找到这个 Android Error - Error inflating class

编辑:从提供的链接中引用答案:

This type of error can be fixed by going to the file R.java and search for the error entry e.g 0x7f0201f2 from your log. It would correspond to a variable. And if you look at the containing method of this entry it will tell you whether it is a string, id, dimen etc. Then you can just search for this variable in your project and find if it has been declared in your resource files.

关于Android 获取条目失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32778766/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com