gpt4 book ai didi

android - AGPBI : Error retrieving parent for item: No resource found

转载 作者:行者123 更新时间:2023-11-30 01:11:28 26 4
gpt4 key购买 nike

` 无法访问,它给了我这个 logcat 错误

AGPBI: {"kind":"error","text":"Tag \u003cItem\u003e can not appear inside \u003cstring-array\u003e, only \u003citem\u003e","sources":[{"file":"C:\\Users\\Squirrel\\Documents\\MyCodes\\ClickAwayTechnologies\\app\\src\\main\\res\\values\\strings.xml","position":{"startLine":6,"startColumn":4,"startOffset":298,"endLine":10,"endColumn":19,"endOffset":429}}],"original":"","tool":"AAPT"}
AGPBI: {"kind":"error","text":"Error retrieving parent for item: No resource found that matches the given name \u0027Base.Widget.AppCompat.DrawerArrowToggle.Common\u0027.","sources":[{"file":"C:\\Users\\Squirrel\\Documents\\MyCodes\\ClickAwayTechnologies\\app\\build\\intermediates\\res\\merged\\debug\\values-hdpi-v4\\values-hdpi-v4.xml","position":{"startLine":2}}],"original":"","tool":"AAPT"}
AGPBI: {"kind":"error","text":"No resource found that matches the given name: attr \u0027barLength\u0027.","sources":[{"file":"C:\\Users\\Squirrel\\Documents\\MyCodes\\ClickAwayTechnologies\\app\\build\\intermediates\\exploded-aar\\com.android.support\\appcompat-v7\\23.4.0\\res\\values-hdpi-v4\\values-hdpi-v4.xml","position":{"startLine":2,"startColumn":4,"startOffset":55,"endLine":6,"endColumn":13,"endOffset":327}}],"original":"","tool":"AAPT"}
AGPBI: {"kind":"error","text":"No resource found that matches the given name: attr \u0027drawableSize\u0027.","sources":[{"file":"C:\\Users\\Squirrel\\Documents\\MyCodes\\ClickAwayTechnologies\\app\\build\\intermediates\\exploded-aar\\com.android.support\\appcompat-v7\\23.4.0\\res\\values-hdpi-v4\\values-hdpi-v4.xml","position":{"startLine":2,"startColumn":4,"startOffset":55,"endLine":6,"endColumn":13,"endOffset":327}}],"original":"","tool":"AAPT"}
AGPBI: {"kind":"error","text":"No resource found that matches the given name: attr \u0027gapBetweenBars\u0027.","sources":[{"file":"C:\\Users\\Squirrel\\Documents\\MyCodes\\ClickAwayTechnologies\\app\\build\\intermediates\\exploded-aar\\com.android.support\\appcompat-v7\\23.4.0\\res\\values-hdpi-v4\\values-hdpi-v4.xml","position":{"startLine":2,"startColumn":4,"startOffset":55,"endLine":6,"endColumn":13,"endOffset":327}}],"original":"","tool":"AAPT"}
AGPBI: {"kind":"error","text":"Error retrieving parent for item: No resource found that matches the given name \u0027Base.Widget.Design.TabLayout\u0027.","sources":[{"file":"C:\\Users\\Squirrel\\Documents\\MyCodes\\ClickAwayTechnologies\\app\\build\\intermediates\\res\\merged\\debug\\values-sw600dp-v13\\values-sw600dp-v13.xml","position":{"startLine":22}}],"original":"","tool":"AAPT"}
AGPBI: {"kind":"error","text":"No resource found that matches the given name: attr \u0027tabGravity\u0027.","sources":[{"file":"C:\\Users\\Squirrel\\Documents\\MyCodes\\ClickAwayTechnologies\\app\\build\\intermediates\\exploded-aar\\com.android.support\\design\\23.4.0\\res\\values-sw600dp-v13\\values-sw600dp-v13.xml","position":{"startLine":11,"startColumn":4,"startOffset":677,"endLine":14,"endColumn":12,"endOffset":854}}],"original":"","tool":"AAPT"}
AGPBI: {"kind":"error","text":"No resource found that matches the given name: attr \u0027tabMode\u0027.","sources":[{"file":"C:\\Users\\Squirrel\\Documents\\MyCodes\\ClickAwayTechnologies\\app\\build\\intermediates\\exploded-aar\\com.android.support\\design\\23.4.0\\res\\values-sw600dp-v13\\values-sw600dp-v13.xml","position":{"startLine":11,"startColumn":4,"startOffset":677,"endLine":14,"endColumn":12,"endOffset":854}}],"original":"","tool":"AAPT"}
AGPBI: {"kind":"error","text":"Error retrieving parent for item: No resource found that matches the given name \u0027Base.Widget.Design.TabLayout\u0027.","sources":[{"file":"C:\\Users\\Squirrel\\Documents\\MyCodes\\ClickAwayTechnologies\\app\\build\\intermediates\\res\\merged\\debug\\values-land\\values-land.xml","position":{"startLine":8}}],"original":"","tool":"AAPT"}
AGPBI: {"kind":"error","text":"No resource found that matches the given name: attr \u0027tabGravity\u0027.","sources":[{"file":"C:\\Users\\Squirrel\\Documents\\MyCodes\\ClickAwayTechnologies\\app\\build\\intermediates\\exploded-aar\\com.android.support\\design\\23.4.0\\res\\values-land\\values-land.xml","position":{"startLine":2,"startColumn":4,"startOffset":55,"endLine":5,"endColumn":12,"endOffset":232}}],"original":"","tool":"AAPT"}
AGPBI: {"kind":"error","text":"No resource found that matches the given name: attr \u0027tabMode\u0027.","sources":[{"file":"C:\\Users\\Squirrel\\Documents\\MyCodes\\ClickAwayTechnologies\\app\\build\\intermediates\\exploded-aar\\com.android.support\\design\\23.4.0\\res\\values-land\\values-land.xml","position":{"startLine":2,"startColumn":4,"startOffset":55,"endLine":5,"endColumn":12,"endOffset":232}}],"original":"","tool":"AAPT"}
AGPBI: {"kind":"error","text":"Error retrieving parent for item: No resource found that matches the given name \u0027Base.Theme.AppCompat.Dialog.FixedSize\u0027.","sources":[{"file":"C:\\Users\\Squirrel\\Documents\\MyCodes\\ClickAwayTechnologies\\app\\build\\intermediates\\res\\merged\\debug\\values-large-v4\\values-large-v4.xml","position":{"startLine":13}}],"original":"","tool":"AAPT"}
AGPBI: {"kind":"error","text":"Error retrieving parent for item: No resource found that matches the given name \u0027Base.Theme.AppCompat.Light.Dialog.FixedSize\u0027.","sources":[{"file":"C:\\Users\\Squirrel\\Documents\\MyCodes\\ClickAwayTechnologies\\app\\build\\intermediates\\res\\merged\\debug\\values-large-v4\\values-large-v4.xml","position":{"startLine":14}}],"original":"","tool":"AAPT"}
AGPBI: {"kind":"error","text":"Error retrieving parent for item: No resource found that matches the given name \u0027Theme.AppCompat\u0027.","sources":[{"file":"C:\\Users\\Squirrel\\Documents\\MyCodes\\ClickAwayTechnologies\\app\\build\\intermediates\\res\\merged\\debug\\values-night-v8\\values-night-v8.xml","position":{"startLine":2}}],"original":"","tool":"AAPT"}
AGPBI: {"kind":"error","text":"Error retrieving parent for item: No resource found that matches the given name \u0027Theme.AppCompat\u0027.","sources":[{"file":"C:\\Users\\Squirrel\\Documents\\MyCodes\\ClickAwayTechnologies\\app\\build\\intermediates\\res\\merged\\debug\\values-night-v8\\values-night-v8.xml","position":{"startLine":3}}],"original":"","tool":"AAPT"}
AGPBI: {"kind":"error","text":"Error retrieving parent for item: No resource found that matches the given name \u0027Theme.AppCompat.Dialog\u0027.","sources":[{"file":"C:\\Users\\Squirrel\\Documents\\MyCodes\\ClickAwayTechnologies\\app\\build\\intermediates\\res\\merged\\debug\\values-night-v8\\values-night-v8.xml","position":{"startLine":4}}],"original":"","tool":"AAPT"}
AGPBI: {"kind":"error","text":"Error retrieving parent for item: No resource found that matches the given name \u0027Theme.AppCompat.Dialog.Alert\u0027.","sources":[{"file":"C:\\Users\\Squirrel\\Documents\\MyCodes\\ClickAwayTechnologies\\app\\build\\intermediates\\res\\merged\\debug\\values-night-v8\\values-night-v8.xml","position":{"startLine":5}}],"original":"","tool":"AAPT"}
AGPBI: {"kind":"error","text":"Error retrieving parent for item: No resource found that matches the given name \u0027Theme.AppCompat.Dialog.MinWidth\u0027.","sources":[{"file":"C:\\Users\\Squirrel\\Documents\\MyCodes\\ClickAwayTechnologies\\app\\build\\intermediates\\res\\merged\\debug\\values-night-v8\\values-night-v8.xml","position":{"startLine":6}}],"original":"","tool":"AAPT"}
AGPBI: {"kind":"error","text":"Error retrieving parent for item: No resource found that matches the given name \u0027Theme.AppCompat.DialogWhenLarge\u0027.","sources":[{"file":"C:\\Users\\Squirrel\\Documents\\MyCodes\\ClickAwayTechnologies\\app\\build\\intermediates\\res\\merged\\debug\\values-night-v8\\values-night-v8.xml","position":{"startLine":7}}],"original":"","tool":"AAPT"}
AGPBI: {"kind":"error","text":"Error retrieving parent for item: No resource found that matches the given name \u0027Theme.AppCompat.NoActionBar\u0027.","sources":[{"file":"C:\\Users\\Squirrel\\Documents\\MyCodes\\ClickAwayTechnologies\\app\\build\\intermediates\\res\\merged\\debug\\values-night-v8\\values-night-v8.xml","position":{"startLine":8}}],"original":"","tool":"AAPT"}
AGPBI: {"kind":"error","text":"Error retrieving parent for item: No resource found that matches the given name \u0027Base.V7.Theme.AppCompat.Dialog\u0027.","sources":[{"file":"C:\\Users\\Squirrel\\Documents\\MyCodes\\ClickAwayTechnologies\\app\\build\\intermediates\\res\\merged\\debug\\values-v11\\values-v11.xml","position":{"startLine":40}}],"original":"","tool":"AAPT"}
AGPBI: {"kind":"error","text":"Error retrieving parent for item: No resource found that matches the given name \u0027Base.V7.Theme.AppCompat.Light.Dialog\u0027.","sources":[{"file":"C:\\Users\\Squirrel\\Documents\\MyCodes\\ClickAwayTechnologies\\app\\build\\intermediates\\res\\merged\\debug\\values-v11\\values-v11.xml","position":{"startLine":45}}],"original":"","tool":"AAPT"}

经过简短的研究,我了解到错误的原因是

<string-array name="tabs">
<Item>Tab 1</Item>
<Item>Tab 2</Item>
<Item>Tab 3</Item>
</string-array>

我正在尝试解决它,但我无法找到解决它的最佳方法,有人可以帮忙吗。

我的这部分代码

pager.setAdapter(new viewPagerAdapter(getSupportFragmentManager()));
pager.setOnPageChangeListener(new pager.SimpleOnPageChangeListener() {
public void onPageSelected(int position) {
tabHost.setSelectedNavigationItem(position);
}
});

由于无法识别函数而显示错误

SimpleOnPageChangeListener() 

如果我也能解决这个问题,我将不胜感激

最佳答案

在我的例子中,我必须更改 compileSDKVersion 以匹配支持库版本以消除此错误。

我的支持库版本是 27.1.1compileSDKVersion23。将 compileSDKVersion 更改为 27 以修复错误。

关于android - AGPBI : Error retrieving parent for item: No resource found,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38398614/

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