当我尝试在我的OnePlus6T上运行应用程序时,出现以下错误。通过一些研究,我知道这是由于 API 28 附带了一些渲染错误。
2019-08-27 09:56:18.480 15457-15491/com.example.myapp E/libc: Access denied finding property "vendor.debug.egl.swapinterval"
2019-08-27 09:56:18.489 15457-15457/com.example.myapp W/RenderThread: type=1400 audit(0.0:5317941): avc: denied { read } for name="u:object_r:vendor_default_prop:s0" dev="tmpfs" ino=16946 scontext=u:r:untrusted_app:s0:c11,c257,c512,c768 tcontext=u:object_r:vendor_default_prop:s0 tclass=file permissive=0
2019-08-27 09:56:18.498 15457-15491/com.example.myapp E/libc: Access denied finding property "vendor.debug.egl.swapinterval"
2019-08-27 09:56:18.500 15457-15491/com.example.myapp E/libc: Access denied finding property "vendor.debug.egl.swapinterval"
2019-08-27 09:56:18.489 15457-15457/com.example.myapp W/RenderThread: type=1400 audit(0.0:5317942): avc: denied { read } for name="u:object_r:vendor_default_prop:s0" dev="tmpfs" ino=16946 scontext=u:r:untrusted_app:s0:c11,c257,c512,c768 tcontext=u:object_r:vendor_default_prop:s0 tclass=file permissive=0
2019-08-27 09:56:18.510 15457-15513/com.example.myapp E/Config:Grabber:GameModeImComponents: Exception:Value 2dba7806e053111f6be5d75308d270082023a2128425335cc69a4dd376faa75f8c0880afe338f32783eb29ad35bcff2eac0a221e64345b3fc201a286ce68db61cb1456a3bdae9cd5ca61057e83f26bc313cafec8fdbc98a4bb3a86b978340eb08912b6fb367f5ed5356d1d823d0e72494ac5770bfc345582f77e63af3959e709ade958b8be4f368dddfc04fb888ad3320732cdd36772146b78725064b299693f23c95b11e006442aa51fa4696d068a75895b56e90791f4266027c4c4606571e252ae87b59e28d6c75552ee4f203877206f8ec3e84fc6e4479540e67403a45224fecf53b42698e59214ea88ecb033c403c645c17b8cd7c5a43bb441051fa32bd61e0af11aa3ed545ef0598dff580c461af84f8bffd1844a33bd9eb2a0af427c4c9fd0e399c74233aa6d7b698ba45946769f1dbd9e39b096328d7394f5ca8161326eba8dcb4e926e4ce82e3e956cfabdb250732f598789a80fc3965e0972f2baa92d9f410483bbf262f0ae820c60cf6f407266d9b5c9b2501e2b3b2accfe048c73ebf2d3516ad47fc555b84a753461f4f249dd0e834f0629ae0262426081db6556ed93d7a8c07785c9530edacb9270c3b571db9fa6e2a7b81a8d2f5697c98a57263c2c9aba0cd8bfd3c9e03582de90879a3f7e6327b24377c2ba5ad11f28e8d966986f492458e90b315a96e49353c053dd2bdb895a3a06ab68dc062f0e698e6756ff6a388c88ebd9a86c0a675baccc184308b8a587d4f2dd7f13a579e0f57e1599935bf734cb97d08e2a5948a21d9d5193d729527b50837504b7e81b0f12714ce9300374da294f6c976df1ce6d963a0164788f04066052626da4c8ac6ad49d66e72ee336bd4d423b0b3042a5b2769d708ab06de1fd115677544c3eae0ab901a3c044451f0305064d18f00c8868d5147c46acb7959cbf9c4ffe832dab31d6db197492a287a32164c776e8badf74b79f29e31abb22070db629cf5eaf245980d869a3b027a29c4fbdd5195319ebe0cb184899c7aaea1595200bc297c42abec642d84d566bce7018b1ff5991b67254296bf75114bd80ae5d7ca24b10bc6cfb12b93f72c0e040d75e254f241d67e8a4674bf018147b913c4c82707a67f7ce668b0ed066f4fce5f0aa2a7a520c72b74fa5ec58eceb676a5df70de6f36c67d6d800d0fba8029c734749646af56101c4952e50c6f7d91220b7e1944ca2e6854dde8a8634ab91559848363967c0e7816127c0c8a669d6dfdd39a4bd8beab8b302708e31f0621bc8a101ffa9b0e0a867c8f1ca20d9b3c3f72b3b7c8436c3f6ec53c43123c5f09dab390aaa257e336e7692e834a5f6845debfc39d73ece8a0650ddac6c9eebc19b7c4ce27a6965f690101188ff5494af5e1c72aa1552aeac658aabd186d8ce796527cab5e432808a5951d8321b255ba7c6d2cc176f7e337c6682c6979c305e20e5b36443ccf63e5e9915059b74dd7995ea67712272bf6d82348134b38525c91f17494d7302ed568e902d3c75c49dbf37579a350c95c5e0190f35ab88f1955bbea556074520b8d8a3629037ded0b6b96aed5bfd0196bbdcbb2c94a2c2af36f8de1fd8b131ed77638a41c18e3c108f3d459009c1547d7e75ad2e77a3e7481557f066fe1c96e0197ecd51d6919b43c499bb2744f37272471bb64da666cc5d101560c8e8b79d08c30d1a2b18a881c7236c4c8326fbd2615c54e643383f9130a9b2c2494b43c748f8c6dcd51e2d6b56de790c6be2c5efadcd052b47b281f8f5a099783e2c918ad23ec79824a5b0c463a0f5e206edb4438eb947f33ababab9c03e71552cdf2693be74a49e6b929aa8d1b6e8577a75a76be48c1d99cfe0a83b9d3ef9028ef35e348a9339745068ff0ef226bf8b650fee8f246408244db36c00ba5d33805e95422d1ae93b63820a64a32f5e843c of type java.lang.String cannot be converted to JSONArray
2019-08-27 09:56:18.517 15457-15491/com.example.myapp E/libc: Access denied finding property "vendor.debug.egl.swapinterval"
2019-08-27 09:56:18.524 15457-15514/com.example.myapp E/Config:Grabber:GameModeImComponents: Exception:Value 2dba7806e053111f6be5d75308d270082023a2128425335cc69a4dd376faa75f8c0880afe338f32783eb29ad35bcff2eac0a221e64345b3fc201a286ce68db61cb1456a3bdae9cd5ca61057e83f26bc313cafec8fdbc98a4bb3a86b978340eb08912b6fb367f5ed5356d1d823d0e72494ac5770bfc345582f77e63af3959e709ade958b8be4f368dddfc04fb888ad3320732cdd36772146b78725064b299693f23c95b11e006442aa51fa4696d068a75895b56e90791f4266027c4c4606571e252ae87b59e28d6c75552ee4f203877206f8ec3e84fc6e4479540e67403a45224fecf53b42698e59214ea88ecb033c403c645c17b8cd7c5a43bb441051fa32bd61e0af11aa3ed545ef0598dff580c461af84f8bffd1844a33bd9eb2a0af427c4c9fd0e399c74233aa6d7b698ba45946769f1dbd9e39b096328d7394f5ca8161326eba8dcb4e926e4ce82e3e956cfabdb250732f598789a80fc3965e0972f2baa92d9f410483bbf262f0ae820c60cf6f407266d9b5c9b2501e2b3b2accfe048c73ebf2d3516ad47fc555b84a753461f4f249dd0e834f0629ae0262426081db6556ed93d7a8c07785c9530edacb9270c3b571db9fa6e2a7b81a8d2f5697c98a57263c2c9aba0cd8bfd3c9e03582de90879a3f7e6327b24377c2ba5ad11f28e8d966986f492458e90b315a96e49353c053dd2bdb895a3a06ab68dc062f0e698e6756ff6a388c88ebd9a86c0a675baccc184308b8a587d4f2dd7f13a579e0f57e1599935bf734cb97d08e2a5948a21d9d5193d729527b50837504b7e81b0f12714ce9300374da294f6c976df1ce6d963a0164788f04066052626da4c8ac6ad49d66e72ee336bd4d423b0b3042a5b2769d708ab06de1fd115677544c3eae0ab901a3c044451f0305064d18f00c8868d5147c46acb7959cbf9c4ffe832dab31d6db197492a287a32164c776e8badf74b79f29e31abb22070db629cf5eaf245980d869a3b027a29c4fbdd5195319ebe0cb184899c7aaea1595200bc297c42abec642d84d566bce7018b1ff5991b67254296bf75114bd80ae5d7ca24b10bc6cfb12b93f72c0e040d75e254f241d67e8a4674bf018147b913c4c82707a67f7ce668b0ed066f4fce5f0aa2a7a520c72b74fa5ec58eceb676a5df70de6f36c67d6d800d0fba8029c734749646af56101c4952e50c6f7d91220b7e1944ca2e6854dde8a8634ab91559848363967c0e7816127c0c8a669d6dfdd39a4bd8beab8b302708e31f0621bc8a101ffa9b0e0a867c8f1ca20d9b3c3f72b3b7c8436c3f6ec53c43123c5f09dab390aaa257e336e7692e834a5f6845debfc39d73ece8a0650ddac6c9eebc19b7c4ce27a6965f690101188ff5494af5e1c72aa1552aeac658aabd186d8ce796527cab5e432808a5951d8321b255ba7c6d2cc176f7e337c6682c6979c305e20e5b36443ccf63e5e9915059b74dd7995ea67712272bf6d82348134b38525c91f17494d7302ed568e902d3c75c49dbf37579a350c95c5e0190f35ab88f1955bbea556074520b8d8a3629037ded0b6b96aed5bfd0196bbdcbb2c94a2c2af36f8de1fd8b131ed77638a41c18e3c108f3d459009c1547d7e75ad2e77a3e7481557f066fe1c96e0197ecd51d6919b43c499bb2744f37272471bb64da666cc5d101560c8e8b79d08c30d1a2b18a881c7236c4c8326fbd2615c54e643383f9130a9b2c2494b43c748f8c6dcd51e2d6b56de790c6be2c5efadcd052b47b281f8f5a099783e2c918ad23ec79824a5b0c463a0f5e206edb4438eb947f33ababab9c03e71552cdf2693be74a49e6b929aa8d1b6e8577a75a76be48c1d99cfe0a83b9d3ef9028ef35e348a9339745068ff0ef226bf8b650fee8f246408244db36c00ba5d33805e95422d1ae93b63820a64a32f5e843c of type java.lang.String cannot be converted to JSONArray
2019-08-27 09:56:18.542 15457-15491/com.example.myapp E/libc: Access denied finding property "vendor.debug.egl.swapinterval"
2019-08-27 09:56:18.631 15457-15474/com.example.myapp W/MediaPlayerNative: info/warning (3, 0)
我尝试了什么:
方法 1.在Manifest.xml中添加这一行。但我认为 Logcat 消息与 OpenGL 命令有关,因此该解决方案不起作用。
<uses-library android:name="org.apache.http.legacy" android:required="false"/>
方法 2.将targetSdkVersion和compileSdkVersion从 28 更改为 27。
方法三、开启“<strong> Force Gpu Rendering ”</p>
通过添加android:hardwareAccelerated="true"
到我的应用程序 manifest.xml 的应用程序标记。
但是这两个想法都对我不起作用。