- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
在我的应用程序的这一部分中,我尝试将从改造 onResponse 方法获取的结果数据保存到 sqlite 数据库中,但我在 android.database 中收到多个
E/SQLiteDatabase: Error inserting
错误。 database.sqlite.SQLiteConstraintException:UNIQUE约束失败:
日志
E/SQLiteDatabase: Error inserting kind=blogger#post etag="iHf3yWDE_geBgZ8U7rgZ_xuTeAQ/dGltZXN0YW1wOiAxNTQ4NTAwNzI5NjI4Cm9mZnNldDogNzIwMDAwMAo" id=2632206540636403989 published=2019-01-26T10:44:00+02:00 updated=2019-01-26T13:05:29+02:00 url=http://www.pro-cs-is.com/2019/01/view-see-saved-wifi-password-android.html content=<div dir="rtl" style="text-align: right;" trbidi="on">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-BgpwbrxNNxo/XEoAkKz4SQI/AAAAAAAAHQI/tNDvQUT1dLI6sb8aAU6xnAg0TK_HsNrmgCLcBGAs/s1600/%25D8%25B5%25D9%2588%25D8%25B1%25D8%25A9%2B%25D8%25A7%25D9%2584%25D9%2585%25D9%2588%25D8%25B6%25D9%2588%25D8%25B9.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="720" data-original-width="1280" height="360" src="https://4.bp.blogspot.com/-BgpwbrxNNxo/XEoAkKz4SQI/AAAAAAAAHQI/tNDvQUT1dLI6sb8aAU6xnAg0TK_HsNrmgCLcBGAs/s640/%25D8%25B5%25D9%2588%25D8%25B1%25D8%25A9%2B%25D8%25A7%25D9%2584%25D9%2585%25D9%2588%25D8%25B6%25D9%2588%25D8%25B9.jpg" width="640" /></a></div>
<br />
<br />
<div class="MsoNormal" dir="RTL">
<span lang="AR-EG" style="font-family: "tahoma" , sans-serif; font-size: 14.0pt; line-height: 107%;">في بعض الأحيان ينسى مستخدمي الهواتف الذكية كلمة مرور شبكة ال WiFi المتصلين بها في الأماكن العامة أو العمل ويحتاجونها لمشاركتها مع الأصدقاء أو لأي أغراض آخرى، في هذا الموضوع سأقوم بشرح طريقتين لإستخراج كلمات مرور شبكات الواي فاي المحفوظة على هواتف الأندرويد.</span></div>
<a name='more'></a><br />
<blockquote class="tr_bq">
<span style="font-family: "tahoma" , sans-serif;"><span style="font-size: 18.6667px;"><b>ملحوظة : جميع الطرق تحتاج إلى صلاحيات مدير النظام (Root)</b></span></span></blockquote>
<span style="font-family: "tahoma" , sans-serif; font-size: 18.6667px;">إذا لم يكن بهاتفك صلاحيات مدير النظام يمكنك الإطلاع على هذا الموضوع <a href="https://www.pro-cs-is.com/2016/08/how-to-root-android.html" target="_blank">أفضل برامج للحصول على صلاحيات مدير النظام (Root) لجهازك الأندرويد</a></span><br />
<br />
<h3 style="text-align: right;">
<span style="font-family: "tahoma" , sans-serif;"><span style="font-size: 18.6667px;">الطريقة الأولى :</span></span></h3>
<div>
<span style="font-family: "tahoma" , sans-serif;"><span style="font-size: 18.6667px;">عن طريق تطبيق <a href="https://play.google.com/store/apps/details?id=htmt.wifipassword" rel="nofollow" target="_blank">WiFi Password, IP, DNS</a></span></span><br />
<span style="font-family: "tahoma" , sans-serif;"><br /></span>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-usMjRJwPBwE/XEr1aoQyhBI/AAAAAAAAHRM/eUj9EDxzrBkSKb6G09P2Y4iYPpzTO7SwACLcBGAs/s1600/WiFi%2BPassword%252C%2BIP%252C%2BDNS.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="632" data-original-width="1063" height="380" src="https://4.bp.blogspot.com/-usMjRJwPBwE/XEr1aoQyhBI/AAAAAAAAHRM/eUj9EDxzrBkSKb6G09P2Y4iYPpzTO7SwACLcBGAs/s640/WiFi%2BPassword%252C%2BIP%252C%2BDNS.jpg" width="640" /></a></div>
<span style="font-family: "tahoma" , sans-serif;"><br /></span></div>
<div>
<br /></div>
<div>
<span style="font-family: "tahoma" , sans-serif;"><span style="font-size: 18.6667px;">بعد تحميل وتنصيب التطبيق قم بفتحه ثم إضغط على <b>Show WiFi Profiles</b> سيطلب التطبيق صلاحيات مدير النظام (root) قم بمنحه أياها</span></span><br />
<span style="font-family: "tahoma" , sans-serif;"><span style="font-size: 18.6667px;"><br /></span><
E/SQLiteDatabase: <a href="https://3.bp.blogspot.com/-R39qwUmqxBU/XEsCIo2NSLI/AAAAAAAAHRY/cLvsxmXKadkqTPrjgH_4JrIGLJvfwiobwCLcBGAs/s1600/Screenshot_%25D9%25A2%25D9%25A0%25D9%25A1%25D9%25A9-%25D9%25A0%25D9%25A1-%25D9%25A2%25D9%25A5-%25D9%25A1%25D9%25A3-%25D9%25A2%25D9%25A5-%25D9%25A4%25D9%25A7.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1280" data-original-width="720" height="640" src="https://3.bp.blogspot.com/-R39qwUmqxBU/XEsCIo2NSLI/AAAAAAAAHRY/cLvsxmXKadkqTPrjgH_4JrIGLJvfwiobwCLcBGAs/s640/Screenshot_%25D9%25A2%25D9%25A0%25D9%25A1%25D9%25A9-%25D9%25A0%25D9%25A1-%25D9%25A2%25D9%25A5-%25D9%25A1%25D9%25A3-%25D9%25A2%25D9%25A5-%25D9%25A4%25D9%25A7.png" width="360" /></a></div>
<span style="font-family: "tahoma" , sans-serif;"><span style="font-size: 18.6667px;"><br /></span></span>
<span style="font-family: "tahoma" , sans-serif;"><span style="font-size: 18.6667px;">بعدها ستجد مباشرة جميع معلومات الشبكات التي قمت بالإتصال بها في هاتفك و كلمة المرور أمام كلمة <b>Password</b></span></span><br />
<span style="font-family: "tahoma" , sans-serif;"><span style="font-size: 18.6667px;"><br /></span></span>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-ikGMUxJyx8A/XEsFxFb3oRI/AAAAAAAAHRw/ByDdHVNO4Qgak5MLF49BnJT1m2q_timbQCLcBGAs/s1600/Screenshot_%25D9%25A2%25D9%25A0%25D9%25A1%25D9%25A9-%25D9%25A0%25D9%25A1-%25D9%25A2%25D9%25A5-%25D9%25A1%25D9%25A3-%25D9%25A4%25D9%25A3-%25D9%25A1%25D9%25A7.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1280" data-original-width="720" height="640" src="https://4.bp.blogspot.com/-ikGMUxJyx8A/XEsFxFb3oRI/AAAAAAAAHRw/ByDdHVNO4Qgak5MLF49BnJT1m2q_timbQCLcBGAs/s640/Screenshot_%25D9%25A2%25D9%25A0%25D9%25A1%25D9%25A9-%25D9%25A0%25D9%25A1-%25D9%25A2%25D9%25A5-%25D9%25A1%25D9%25A3-%25D9%25A4%25D9%25A3-%25D9%25A1%25D9%25A7.png" width="360" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<span style="font-family: "tahoma" , sans-serif;"><span style="font-size: 18.6667px;"><br /></span></span>
<span style="font-family: "tahoma" , sans-serif;"><span style="font-size: 18.6667px;"><br /></span></span>
<span style="font-family: "tahoma" , sans-serif;"><span style="font-size: 18.6667px;"><b>الطريقة الثانية :</b></span></span><br />
<span style="font-family: "tahoma" , sans-serif;"><span style="font-size: 18.6667px;"><br /></span></span></div>
<div>
<span style="font-family: "tahoma" , sans-serif;"><span style="font-size: 18.6667px;">عن طريق تطبيق <b><a href="https://play.google.com/store/apps/details?id=com.estrongs.android.pop" rel="nofollow" target="_blank">Es File Explorer File Manger</a></b></span></span><br />
<span style="font-family: "tahoma" , sans-serif;"><span style="font-size: 18.6667px;"><br /></span></span>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-a4bq9s_j3LI/XEsmj8E6x6I/AAAAAAAAHSM/ZiHDgBUKOMkYMIbMpeHPmmvMKuuXOWbLwCLcBGAs/s1600/Es%2BFile%2BExplorer%2BFile%2BManger.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="632" data-original-width="1110" height="364" src="https://4.bp.blogspot.com/-a4bq9s_j3LI/XEsmj8E6x6I/AAAAAAAAHSM/ZiHDgBUKOMkYMIbMpeHPmmvMKuuXOWbLwCLcBGAs/s640/Es%2BFile%2BExplorer%2BFile%2BManger.jpg" width="640" /></a></div>
<span style="font-family: "tahoma" , sans-serif;"><span style="font-size: 18.6667px;"><br /></span></span><span style="font-family: "tahoma" , sans-serif;"><span style="font-size: 18.6667px;">بعد تحميل وتنصيب التطبيق قم بفتحه ثم قم بالنقر على الثلاثة خطوط المتواجدين بالأعلى لفتح القائمة الجانبية</span></span><br />
<span s
E/SQLiteDatabase: <div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-5J70yswDwPs/XEwRZWO5wkI/AAAAAAAAHSc/LbdMQ7RJOCgzhFT7dnRBeKqOx0gEXuQPACLcBGAs/s1600/Screenshot_%25D9%25A2%25D9%25A0%25D9%25A1%25D9%25A9-%25D9%25A0%25D9%25A1-%25D9%25A2%25D9%25A4-%25D9%25A0%25D9%25A9-%25D9%25A3%25D9%25A3-%25D9%25A0%25D9%25A7.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1280" data-original-width="720" height="640" src="https://4.bp.blogspot.com/-5J70yswDwPs/XEwRZWO5wkI/AAAAAAAAHSc/LbdMQ7RJOCgzhFT7dnRBeKqOx0gEXuQPACLcBGAs/s640/Screenshot_%25D9%25A2%25D9%25A0%25D9%25A1%25D9%25A9-%25D9%25A0%25D9%25A1-%25D9%25A2%25D9%25A4-%25D9%25A0%25D9%25A9-%25D9%25A3%25D9%25A3-%25D9%25A0%25D9%25A7.png" width="360" /></a></div>
<span style="font-family: "tahoma" , sans-serif;"><span style="font-size: 18.6667px;"><br /></span></span>
<span style="font-family: "tahoma" , sans-serif;"><span style="font-size: 18.6667px;">من القائمة الجانبية قم بالنزول حتى تجد خيار <b>متصفح ملفات النظام</b> و إضغط عليه، </span></span><span style="font-family: "tahoma" , sans-serif; font-size: 18.6667px;">سيطلب التطبيق صلاحيات مدير النظام (root) قم بمنحه أياها</span><br />
<span style="font-family: "tahoma" , sans-serif; font-size: 18.6667px;"><br /></span>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-hV9L8BK77Vc/XEwSxR1SabI/AAAAAAAAHSo/9uziSP0y0GsHvaKeAseLi5Coi4zWXmuugCLcBGAs/s1600/Screenshot_%25D9%25A2%25D9%25A0%25D9%25A1%25D9%25A9-%25D9%25A0%25D9%25A1-%25D9%25A2%25D9%25A4-%25D9%25A0%25D9%25A9-%25D9%25A3%25D9%25A3-%25D9%25A5%25D9%25A6.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1280" data-original-width="720" height="640" src="https://4.bp.blogspot.com/-hV9L8BK77Vc/XEwSxR1SabI/AAAAAAAAHSo/9uziSP0y0GsHvaKeAseLi5Coi4zWXmuugCLcBGAs/s640/Screenshot_%25D9%25A2%25D9%25A0%25D9%25A1%25D9%25A9-%25D9%25A0%25D9%25A1-%25D9%25A2%25D9%25A4-%25D9%25A0%25D9%25A9-%25D9%25A3%25D9%25A3-%25D9%25A5%25D9%25A6.png" width="360" /></a></div>
<span style="font-family: "tahoma" , sans-serif; font-size: 18.6667px;"><br /></span>
<span style="font-family: "tahoma" , sans-serif; font-size: 18.6667px;">بعد منح التطبيق الصلاحيات، من نفس القائمة قم بالنزول إلى الأسفل حتى تجد خيار محلي أو Local إذا كانت لغة الهاتف بالإنجليزية</span><br />
<span style="font-family: "tahoma" , sans-serif; font-size: 18.6667px;"><br /></span>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-wTj8cDUCqvE/XEwT_KiYjfI/AAAAAAAAHS0/Fb8gaeNopFg4Cwz9c8rIgNCWX2-mpTdDgCLcBGAs/s1600/Screenshot_%25D9%25A2%25D9%25A0%25D9%25A1%25D9%25A9-%25D9%25A0%25D9%25A1-%25D9%25A2%25D9%25A4-%25D9%25A1%25D9%25A0-%25D9%25A0%25D9%25A9-%25D9%25A0%25D9%25A3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1280" data-original-width="720" height="640" src="https://4.bp.blogspot.com/-wTj8cDUCqvE/XEwT_KiYjfI/AAAAAAAAHS0/Fb8gaeNopFg4Cwz9c8rIgNCWX2-mpTdDgCLcBGAs/s640/Screenshot_%25D9%25A2%25D9%25A0%25D9%25A1%25D9%25A9-%25D9%25A0%25D9%25A1-%25D9%25A2%25D9%25A4-%25D9%25A1%25D9%25A0-%25D9%25A0%25D9%25A9-%25D9%25A0%25D9%25A3.png" width="360" /></a></div>
<span style="font-family: "tahoma" , sans-serif; font-size: 18.6667px;"><br /></span>
<span style="font-family: "tahoma" , sans-serif;"><span style="font-size: 18.6667px;">بعدها اختر الجهاز/Device</span></span><br />
<span style="font-family: "tahoma" , sans-serif;"><span style="font-size: 18.6667px;"><br /></span></span>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-t_nZeL67iqI/XEwUkXGZHRI/AAAAAAAAHS8/CckDMyA7j7kBeqsOqktMDx7hJZ9ATLtDgCLcBGAs/s1600/Screenshot_%25D9%25A2%25D9%25A0%25D9%25A1%25D9%25A9-%25D9%25A0%25D9%25A1-%25D9%25A2%25D9%25A4-%25D9%25A1%25D9%25A0-%25D9%25A0%25D9%25A9-%25D9%25A2%25D9%25A0.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1280" data-original-width="720" height="640" src="https://4.bp.blogspot.com/-t_nZeL67iqI/XEwUkXGZHRI/AAAAAAAAHS8/CckDMyA7j7kBeqsOqktMDx7hJZ9ATLtDgCLcBGAs/s640/Screenshot_%25D9%25A2%25D9%25A0%25D9%25A1%25D9%25A9-%25D9%25A0%25D9%25A1-%25D9%25A2%25D9%25A4-%25D9%25A1%25D9%25A0-%25D9%25A0%25D9%25A9-%25D9%25A2%25D9%25A0.png" width="360" /></a></div>
<span style="font-family: "tahoma" , sans-serif;"><span style="font-size: 18.6667px;"><br /></span></span>
<span style="font-family: "tahoma" , sans-serif;"><span style="font-size: 18.6667px;">سيقوم التطبيق بفتح مجلدات النظام نحتاج إلى الوصول إلى هذا المسار</span></span><br />
<span style="font-family: "tahoma" , sans-serif;"><span style="font-size: 18.6667px;"><br /></span></span>
<br />
<blockquote class="tr_bq">
<span style="font-family: "tahoma" , sans-serif;"><span style="font-size: 18.6667px;"><b>data/misc/wifi/</b></span></span></blockquote>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://3.bp.blogspot.com/-MBtwL3CjvH0/XEwVs2iZSsI/AAAAAAAAHTI/x5OUCa7sPNUW-s6MlAp6D-Qvqolgwm9igCLcBGAs/s1600/Screenshot_%25D9%25A2%25D9%25A0%25D9%25A1%25D9%25A9-%25D9%25A0%25D9%25A1-%25D9%25A2%25D9%25A4-%25D9%25A1%25D9%25A0-%25D9%25A1%25D9%25A0-%25D9%25A5%25D9%25A4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1280" data-original-width="720" height="640" src="https://3.bp.blogspot.com/-MBtwL3CjvH0/XEwVs2iZSsI/AAAAAAAAHTI/x5OUCa7sPNUW-s6MlAp6D-Qvqolgwm9igCLcBGAs/s640/Screenshot_%25D9%25A2%25D9%25A0%25D9%25A1%25D9%25A9-%25D9%25A0%25D9%25A1-%25D9%25A2%25D9%25A4-%25D9%25A1%25D9%25A0-%25D9%25A1%25D9%25A0-%25D9%25A5%25D9%25A4.png" width="360" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://1.bp.blogspot.com/-j1voZIdovWE/XEwV-5uM4II/AAAAAAAAHTQ/HnqSCmMGnWsOEQSMBorDsxaty9NJnXa_ACLcBGAs/s1600/Screenshot_%25D9%25A2%25D9%25A0%25D9%25A1%25D9%25A9-%25D9%25A0%25D9%25A1-%25D9%25A2%25D9%25A4-%25D9%25A1%25D9%25A0-%25D9%25A1%25D9%25A1-%25D9%25A1%25D9%25A8.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1280" data-original-width="720" height="640" src="https://1.bp.blogspot.com/-j1voZIdovWE/XEwV-5uM4II/AAAAAAAAHTQ/HnqSCmMGnWsOEQSMBorDsxaty9NJnXa_ACLcBGAs/s640/Screenshot_%25D9%25A2%25D9%25A0%25D9%25A1%25D9%25A9-%25D9%25A0%25D9%25A1-%25D9%25A2%25D9%25A4-%25D9%25A1%25D9%25A0-%25D9%25A1%25D9%25A1-%25D9%25A1%25D9%25A8.png" width="360" /></a></div>
<span style="font-family: "tahoma" , sans-serif;"><span style="font-size: 18.6667px;"><br /></span></span>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://3.bp.blogspot.com/-36O8nUlF20k/XEwWVO7oJ2I/AAAAAAAAHTY/3Uv4IBwUpeYGiIiArOWmaA7-yFx3bhhIgCLcBGAs/s1600/Screenshot_%25D9%25A2%25D9%25A0%25D9%25A1%25D9%25A9-%25D9%25A0%25D9%25A1-%25D9%25A2%25D9%25A4-%25D9%25A1%25D9%25A0-%25D9%25A1%25D9%25A1-%25D9%25A3%25D9%25A9.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1280" data-original-width="720" height="640" src="https://3.bp.blogspot.com/-36O8nUlF20k/XEwWVO7oJ2I/AAAAAAAAHTY/3Uv4IBwUpeYGiIiArOWmaA7-yFx3bhhIgCLcBGAs/s640/Screenshot_%25D9%25A2%25D9%25A0%25D9%25A1%25D9%25A9-%25D9%25A0%25D9%25A1-%25D9%25A2%25D9%25A4-%25D9%25A1%25D9%25A0-%25D9%25A1%25D9%25A1-%25D9%25A3%25D9%25A9.png" width="360" /></a></div>
<br />
E/SQLiteDatabase: <span style="font-family: "tahoma" , sans-serif;"><span style="font-size: 18.6667px;">وأخيراً ستجد ملف <b>wpa_supplicant.conf</b> والذي يحتوي على معلومات جميع الشبكات التي قمت بالإتصال بها على الهاتف، إضغط عليه لفتحه</span></span><br />
<span style="font-family: "tahoma" , sans-serif;"><span style="font-size: 18.6667px;"><br /></span></span>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://4.bp.blogspot.com/-JSeNFvpHZj0/XEwXcvY_SJI/AAAAAAAAHTk/1eLPEKsQDD8KMSQk0wHjw8Acpnx3NegBgCLcBGAs/s1600/Screenshot_%25D9%25A2%25D9%25A0%25D9%25A1%25D9%25A9-%25D9%25A0%25D9%25A1-%25D9%25A2%25D9%25A4-%25D9%25A1%25D9%25A0-%25D9%25A1%25D9%25A2-%25D9%25A0%25D9%25A6.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1280" data-original-width="720" height="640" src="https://4.bp.blogspot.com/-JSeNFvpHZj0/XEwXcvY_SJI/AAAAAAAAHTk/1eLPEKsQDD8KMSQk0wHjw8Acpnx3NegBgCLcBGAs/s640/Screenshot_%25D9%25A2%25D9%25A0%25D9%25A1%25D9%25A9-%25D9%25A0%25D9%25A1-%25D9%25A2%25D9%25A4-%25D9%25A1%25D9%25A0-%25D9%25A1%25D9%25A2-%25D9%25A0%25D9%25A6.png" width="360" /></a></div>
<span style="font-family: "tahoma" , sans-serif;"><span style="font-size: 18.6667px;"><br /></span></span>
<span style="font-family: "tahoma" , sans-serif;"><span style="font-size: 18.6667px;">قم بإختيار محرر النصوص الخاص بالتطبيق ES ، <b>لن يفتح بأي محرر نصوص آخر</b></span></span><br />
<span style="font-family: "tahoma" , sans-serif;"><span style="font-size: 18.6667px;"><b><br /></b></span></span>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://3.bp.blogspot.com/-s26DQfuJHbg/XEwX91ju0oI/AAAAAAAAHTs/SkTVzX6MjJ8AxxrO-uWvhXPRPfuYSgb7QCLcBGAs/s1600/Screenshot_%25D9%25A2%25D9%25A0%25D9%25A1%25D9%25A9-%25D9%25A0%25D9%25A1-%25D9%25A2%25D9%25A4-%25D9%25A1%25D9%25A0-%25D9%25A1%25D9%25A3-%25D9%25A1%25D9%25A0.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1280" data-original-width="720" height="640" src="https://3.bp.blogspot.com/-s26DQfuJHbg/XEwX91ju0oI/AAAAAAAAHTs/SkTVzX6MjJ8AxxrO-uWvhXPRPfuYSgb7QCLcBGAs/s640/Screenshot_%25D9%25A2%25D9%25A0%25D9%25A1%25D9%25A9-%25D9%25A0%25D9%25A1-%25D9%25A2%25D9%25A4-%25D9%25A1%25D9%25A0-%25D9%25A1%25D9%25A3-%25D9%25A1%25D9%25A0.png" width="360" /></a></div>
<span style="font-family: "tahoma" , sans-serif;"><span style="font-size: 18.6667px;"><b><br /></b></span></span>
<span style="font-family: "tahoma" , sans-serif;"><span style="font-size: 18.6667px;">ستجد مباشرة جميع معلومات الشبكات في هذا الملف من ضمنها كلمات المرور أمام كلمة <b>"psk"</b></span></span><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://2.bp.blogspot.com/-oS5PZl4rnX4/XEwYfFUUFBI/AAAAAAAAHT4/NS8GVEFg2mwqTkVbwUYT9iSyhChdyLVfgCLcBGAs/s1600/Screenshot_%25D9%25A2%25D9%25A0%25D9%25A1%25D9%25A9-%25D9%25A0%25D9%25A1-%25D9%25A2%25D9%25A4-%25D9%25A1%25D9%25A0-%25D9%25A1%25D9%25A9-%25D9%25A1%25D9%25A0.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" data-original-height="1280" data-original-width="720" height="640" src="https://2.bp.blogspot.com/-oS5PZl4rnX4/XEwYfFUUFBI/AAAAAAAAHT4/NS8GVEFg2mwqTkVbwUYT9iSyhChdyLVfgCLcBGAs/s640/Screenshot_%25D9%25A2%25D9%25A0%25D9%25A1%25D9%25A9-%25D9%25A0%25D9%25A1-%25D9%25A2%25D9%25A4-%25D9%25A1%25D9%25A0-%25D9%25A1%25D9%25A9-%25D9%25A1%25D9%25A0.png" width="360" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<blockquote class="tr_bq">
<span style="font-family: "tahoma" , sans-serif;"><span style="font-size: 18.6667px;"><b>بعض الشبكات لن تجد هذا السطر و هذا معناه إنها شبكة مفتوحة "بدون ك�
E/SQLiteDatabase: android.database.sqlite.SQLiteConstraintException: UNIQUE constraint failed: items.id (code 1555)
at android.database.sqlite.SQLiteConnection.nativeExecuteForLastInsertedRowId(Native Method)
at android.database.sqlite.SQLiteConnection.executeForLastInsertedRowId(SQLiteConnection.java:783)
at android.database.sqlite.SQLiteSession.executeForLastInsertedRowId(SQLiteSession.java:788)
at android.database.sqlite.SQLiteStatement.executeInsert(SQLiteStatement.java:86)
at android.database.sqlite.SQLiteDatabase.insertWithOnConflict(SQLiteDatabase.java:1548)
at android.database.sqlite.SQLiteDatabase.insert(SQLiteDatabase.java:1417)
at www.pro_cs_is.com.ItemsDBHelper.addItem(ItemsDBHelper.java:72)
at www.pro_cs_is.com.MainActivity$2.onResponse(MainActivity.java:198)
at retrofit2.ExecutorCallAdapterFactory$ExecutorCallbackCall$1$1.run(ExecutorCallAdapterFactory.java:70)
at android.os.Handler.handleCallback(Handler.java:794)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:173)
at android.app.ActivityThread.main(ActivityThread.java:6653)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:821)
Which I understood from the log that there was a mistake in writing the Syntax for creating the ITEMS_TABLE but I reviewed it several times and everything seems to be fine
Note: I trying to replace KEY_ID primary key index to the second and make KEY_KIND first in the sql clause such as its location in the defined class but the same result!
ItemsDBHelper 类
public class ItemsDBHelper extends SQLiteOpenHelper {
private static final int DATABASE_VERSION = 1;
private static final String DATABASE_NAME = "itemsInfo";
private static final String TABLE_NAME = "items";
private static final String KEY_KIND = "kind";
private static final String KEY_ID = "id";
private static final String KEY_PUBLISHED = "published";
private static final String KEY_UPDATED = "updated";
private static final String KEY_ETAG = "etag";
private static final String KEY_URL = "url";
private static final String KEY_SELFLINK = "selfLink";
private static final String KEY_CONTENT = "content";
private static final String KEY_LABELS = "labels";
public ItemsDBHelper(Context context){
super(context,DATABASE_NAME,null,DATABASE_VERSION);
}
@Override
public void onCreate(SQLiteDatabase db) {
Log.e("oncreate","oncreate");
String CREATE_ITEMS_TABLE = "CREATE TABLE "+ TABLE_NAME + " ("+KEY_ID+" INTEGER PRIMARY KEY, "+KEY_KIND+" TEXT, "+KEY_PUBLISHED+" TEXT, "
+KEY_UPDATED+" TEXT, "+KEY_ETAG+" TEXT, "+KEY_URL+" TEXT, "
+KEY_SELFLINK+" TEXT, "+KEY_CONTENT+" TEXT, "+KEY_LABELS+" TEXT)";
db.execSQL(CREATE_ITEMS_TABLE);
}
@Override
public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
Log.e("onupgrade","onupgrade");
db.execSQL("DROP TABLE IF EXISTS "+TABLE_NAME);
onCreate(db);
}
public void addItem(Item item){
SQLiteDatabase db = this.getWritableDatabase();
ContentValues values = new ContentValues();
values.put(KEY_ID,item.getId());
values.put(KEY_KIND,item.getKind());
values.put(KEY_PUBLISHED,item.getPublished());
values.put(KEY_UPDATED,item.getUpdated());
values.put(KEY_ETAG,item.getEtag());
values.put(KEY_URL,item.getUrl());
values.put(KEY_SELFLINK,item.getSelfLink());
values.put(KEY_CONTENT,item.getContent());
values.put(KEY_LABELS,convertListToString(item.getLabels()));
db.insert(TABLE_NAME,null,values);
db.close();
}
public Item getItem(int id){
SQLiteDatabase db = this.getReadableDatabase();
Cursor cursor = db.query(TABLE_NAME,
new String[]{KEY_ID,KEY_KIND,KEY_PUBLISHED,
KEY_UPDATED,KEY_ETAG,KEY_URL,KEY_SELFLINK,KEY_CONTENT},KEY_ID+"=?",
new String[]{String.valueOf(id)},null,null,null,null);
Item item=null;
if(cursor!=null){
cursor.moveToFirst();
item = new Item();
}
return item;
}
public List<Item> getAllShops(){
List<Item> items = new ArrayList<>();
SQLiteDatabase dp = this.getReadableDatabase();
String selectQuery = "SELECT * FROM "+TABLE_NAME;
Cursor cursor = dp.rawQuery(selectQuery,null);
if(cursor!=null){
if(cursor.moveToFirst()){
do{
Item item = new Item();
item.setId(cursor.getString(0));
item.setKind(cursor.getString(1));
item.setPublished(cursor.getString(2));
item.setUpdated(cursor.getString(3));
item.setEtag(cursor.getString(4));
item.setUrl(cursor.getString(5));
item.setSelfLink(cursor.getString(5));
item.setContent(cursor.getString(6));
item.setLabels(convertStringToList(cursor.getString(7)));
items.add(item);
}while (cursor.moveToNext());
}
}
return items;
}
private static final String LIST_SEPARATOR = "__,__";
public static String convertListToString(List<String> stringList) {
StringBuilder stringBuilder = new StringBuilder();
for (String str : stringList) {
stringBuilder.append(str).append(LIST_SEPARATOR);
}
// Remove last separator
stringBuilder.setLength(stringBuilder.length() - LIST_SEPARATOR.length());
return stringBuilder.toString();
}
public static List<String> convertStringToList(String str) {
return Arrays.asList(str.split(LIST_SEPARATOR));
}
}
我在响应方法中这样使用了它
final Call<PostList> postList = BloggerAPI.getService().getPostList(url);
postList.enqueue(new Callback<PostList>() {
@Override
public void onResponse(Call<PostList> call, Response<PostList> response) {
PostList list = response.body();
token = list.getNextPageToken();
items.addAll(list.getItems());
for (int i = 0 ; i< items.size();i++) {
itemsDBHelper = new ItemsDBHelper(MainActivity.this);
itemsDBHelper.addItem(items.get(i));
}
Item item1 = itemsDBHelper.getItem(0);
Log.e("TEST ITEM 01",item1.getTitle()+ "\n" + item1.getUrl());
Item item2 = itemsDBHelper.getItem(1);
Log.e("TEST ITEM 01",item2.getTitle()+ "\n" + item2.getUrl());
adapter.notifyDataSetChanged();
Toast.makeText(MainActivity.this, "Sucess", Toast.LENGTH_LONG).show();
}
@Override
public void onFailure(Call<PostList> call, Throwable t) {
Toast.makeText(MainActivity.this,"Error occured",Toast.LENGTH_LONG).show();
Log.i(TAG, "onFailure: "+t.toString());
}
});
最佳答案
问题是 id 列不是唯一的,这不是一个错误,而是异常已被捕获,因为实际上正在使用 INSERT OR IGNORE,但正在写入到日志。然而,当发生这种情况时,该行将不会被插入。
id 列是使用 INTEGER PRIMARY KEY 定义的,这意味着 UNIQUE 约束,它另外使该列成为 rowid 的别名,从而使该列具有一个特殊属性/处理情况。也就是说,如果没有指定值,那么 SQLite 将生成一个唯一的值。该值将是一个唯一的 64 位有符号整数,最初为 1,然后通常比最后一个值大 1。
通常不会为此类列提供任何值,而是使用 SQLite 生成的值。
我建议您更改为使用典型用途,从而相应地修改您的 addItem 方法,例如:-
public long addItem(Item item){ //<<<<<<<<<< returns long (id assigned by SQLite)
SQLiteDatabase db = this.getWritableDatabase();
ContentValues values = new ContentValues();
//values.put(KEY_ID,item.getId()); //<<<<<<<<<< allow SQLite to assign id
values.put(KEY_KIND,item.getKind());
values.put(KEY_PUBLISHED,item.getPublished());
values.put(KEY_UPDATED,item.getUpdated());
values.put(KEY_ETAG,item.getEtag());
values.put(KEY_URL,item.getUrl());
values.put(KEY_SELFLINK,item.getSelfLink());
values.put(KEY_CONTENT,item.getContent());
values.put(KEY_LABELS,convertListToString(item.getLabels()));
db.insert(TABLE_NAME,null,values);
db.close();
}
插入行后,您应该使用 addItem 方法返回的值(如果该对象)在 item 对象中设置 id随后将被使用。
关于java - E/SQLite数据库 : Error inserting with SQLiteConstraintException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54444303/
第一次插入行时没有任何问题。但是在同一台设备上安装应用程序(从 Eclipse 安装而不从设备上卸载应用程序)并尝试插入新行后它会抛出异常 10-1216: 36: 38.405: E/Android
我有一个SqliteConstraintException问题。 我的数据库就是这样 private static final String CREATE_TABLE_1 = "create t
我正在使用内容提供程序从数据库中读取/写入,该数据库允许用户组织处方。目前,我正在实现一个 DialogFragment,允许用户输入新药物。该对话框包含两个 EditText,一个用于强度,一个用于
这段代码有什么问题?它不会捕获 insertChild() 方法抛出的异常。 childDbOps.open(); try { childDbOps.insertChild(child); }
我正在尝试使用 this 在 Android 中将声音保存为铃声代码。它就像一个魅力,但如果我尝试保存已插入的铃声,它将失败。 保存时出现“SQLiteConstraintException”,但我无
我找了又找,还没有找到解决办法。希望这里有人可以提供帮助。 我正在尝试将自定义铃声插入 MediaStore.Audio.Media.EXTERNAL_CONTENT_URI。大多数时候它工作得很好,
我在 Android 中有这个方法: public void insertarTitulo(String _id, String title, String url){ ContentValu
我正在测试我的应用程序并尝试在 SQLite 中插入重复记录。 Java 返回了一个异常,其中包含完全相同的重复列。我可以提取错误信息并向用户显示一条消息,其中包含他输入的重复信息吗? 我的代码:
如何获取导致 SQLiteConstraintException 的约束的名称。 在异常上调用 toString() 只会给我:“错误代码 19:约束失败” 而且异常中也没有获取原因的方法。这使得调试
android.database.sqlite.SQLiteConstraintException: error code 19: constraint failed 我的应用程序出错,不确定原因。
当我运行该代码时,db.insert 中有一个异常: 08-29 15:40:17.519: E/SQLiteDatabase(3599): android.database.sqlite.SQLit
我检查了 SO 中的其他示例并进行了很多搜索,但没有任何内容适合我。数据库文件是this (建议编辑后)。 错误 E/Database(274): android.database.sqlite.SQ
某些数据出现以下错误,概念很清楚: android.database.sqlite.SQLiteConstraintException: FOREIGN KEY constraint failed (
我一直在 logcat 中弹出这个错误。它总是在每次 Activity 更改后显示。有时,该应用程序会消失,然后它会再次显示。 logcat 中没有任何 fatal error ,我所看到的只是: 2
在我的应用程序的这一部分中,我尝试将从改造 onResponse 方法获取的结果数据保存到 sqlite 数据库中,但我在 android.database 中收到多个 E/SQLiteDatabas
我有一个插入方法,它首先检查该行是否可用,如果不可用,则尝试创建新行,或者如果可用,则更新该行,但此方法在 else 中给了我异常。部分,这是我的方法 public long SetSettings(
我知道您对此错误有很多疑问,但我无法理解为什么 Logcat 上的所有字段似乎都已正确填写,但即使如此仍会发生故障。 这是表的创建: public void onCreate(SQLiteDataba
有人可以为我解释以下问题吗?这是下表创建注意 id 是 null db.execSQL( "create table tabtest " +
我已经看到关于此异常的其他问题,但所有这些问题似乎都已通过指定主键的行已存在的解决方案得到解决。对我来说似乎并非如此。我尝试用双引号替换字符串中的所有单引号,但出现了同样的问题。 我正在尝试将一行插入
当我在我的 SQLite 数据库中执行插入操作时,我遇到了这个异常 以下代码给了我异常: mDbHelper.createUser("pablo","a","a","a","a"); 来自 mDbHe
我是一名优秀的程序员,十分优秀!