我已经编译了android源代码 source ./build/envsetup.sh 午餐aosp_x86_64-eng
当我在终端中运行emulator64-x86时,会发生错误:
emulator64-x86: /usr/lib/x86_64-linux-gnu/libQt5Core.so.5: version `Qt_5.7' not found (required by emulator64-x86)
emulator64-x86: /usr/lib/x86_64-linux-gnu/libQt5Core.so.5: version `Qt_5' not found (required by emulator64-x86)
emulator64-x86: /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5: version `Qt_5' not found (required by emulator64-x86)
emulator64-x86: /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5: version `Qt_5' not found (required by emulator64-x86)
我在
中找到了qt/家庭/万宇/工作/ AOSP / prebuilts /机器人仿真器/ Linux的x86_64的/ lib64下/ QT /
此目录包括libQt5Core.so.5.7,libQt5Widgets.so.5.7等。
但是
中的libQt5Core.so/ usr / lib中/ x86_64的-Linux的GNU /
版本是5.5
我尝试将LD_LIBRARY_PATH设置为:
/家庭/万宇/工作/ AOSP / prebuilts /机器人仿真器/ Linux的x86_64的/ lib64下/
但错误仍然存在。
将libQt5Core.so.5复制到
/ usr / lib中/ x86_64的-Linux的GNU /
将解决此错误,但qt平台插件libqxcb将无法正常工作。
如何将lib路径更改为
/家庭/万宇/工作/ AOSP / prebuilts /机器人仿真器/ Linux的x86_64的/ lib64下
当我运行emulator64-x86时?
答案 0 :(得分:5)
将{
obj1 : {....},
dynamicObj2 : {....}, // it can be object or array
obj3 : {....}
}
留在libQt5Core.so.5
。 Qt不喜欢被移动,它会使插件存储的位置丢失。在你的情况下,它可能最终试图加载Qt 5.5插件。
将/home/wanyu/work/aosp/prebuilts/android-emulator/linux-x86_64/lib64/qt/
设为LD_LIBRARY_PATH
。
使用/home/wanyu/work/aosp/prebuilts/android-emulator/linux-x86_64/lib64/qt/
检查运行时将使用哪个库。
另请注意,qxcb需要X11才能运行。
答案 1 :(得分:0)
对我来说有用的是将所有android内部qt库复制到系统qt libs文件夹cp -a $ANDROID_HOME/emulator/lib64/qt/lib/. /usr/lib/x86_64-linux-gnu/
答案 2 :(得分:0)
我遇到了一些同样的问题。当包含第二个库时,我得到“找不到 qt”。
添加到 .pro 的主要代码
item.id
我解决了更改路径的问题,如 first ribary have 并保存最后一个词“-lcrypto++”
const loanAmountArray = [
{
id: 1,
amount: "5,000",
selected: "yes"
},
{
id: 2,
amount: "10,000",
selected: "no"
},
{
id: 3,
amount: "20,000",
selected: "no"
}
];
const durationArray = [
{
id: 1,
days: "30 days",
rate: "3.3% Interest",
selected: "yes"
},
{
id: 2,
days: "60 days",
rate: "5% Interest",
selected: "no"
},
{
id: 3,
days: "90 days",
rate: "7% Interest",
selected: "no"
}
];
export default function Loans({}) {
const [selectedDurationId, setSelectedDurationId] = useState(1);
const [selectedAmountId, setSelectedAmountId] = useState(1);
const changeSelectedDuration = function (id) {
setSelectedDurationId(id);
};
const changeSelectedAmount = function (id) {
setSelectedAmountId(id);
};
return (
<View style={{ flex: 1 }}>
<ScrollView>
<View style={styles.contain}>
<Text>Chose Loan Amount</Text>
<FlatList
numColumns={6}
data={loanAmountArray}
extraData={selectedAmountId} // <-- prop used to rerender
keyExtractor={(item, index) => {
return index.toString();
}}
renderItem={({ item }) => {
return (
<View>
<TouchableOpacity
onPress={() => {
changeSelectedAmount(item.id);
}}
>
<Text
style={
item.id === selectedAmountId // <-- match id property
? styles.textBoxSelected
: styles.textBox
}
>
{item.amount}
</Text>
</TouchableOpacity>
</View>
);
}}
/>
<Text>Chose Payment Duration</Text>
<FlatList
numColumns={3}
data={durationArray}
extraData={selectedDurationId} // <-- prop used to rerender
keyExtractor={(item, index) => {
return index.toString();
}}
renderItem={({ item }) => {
return (
<View>
<TouchableOpacity
style={
item.id === selectedDurationId // <-- match id property
? styles.durationViewPressed
: styles.durationView
}
onPress={() => {
changeSelectedDuration(item.id);
}}
>
<View>
<Text style={styles.interest}>{item.rate}</Text>
</View>
<View>
<Text style={styles.days}>{item.days}</Text>
</View>
</TouchableOpacity>
</View>
);
}}
/>
</View>
</ScrollView>
</View>
);
}