Android Question AndroidManifest.xml:22: error: Error parsing XML: not well-formed (invalid token)

Alexander1981

Member
Licensed User
FIRST ERROR
Error de respuesta. Motivo: java.net.UnknownServiceException: comunicación CLEARTEXT a www.abc.de no permitida por la política de seguridad de la red, Respuesta:


He
B4A 9.80
Android 28
jdk1.8.0

please I have updated the manifest

I use the OkHttpUtils2 library.

but it does not work

CÓDIGO
PageServer = " http://example.com?field=valor "
Dim js como HttpJob
js.Initialize ("", Me)
js.Download (PageServer)
Esperar (js) JobDone (js como HttpJob)

My manifest
AddManifestText (
<usos-sdk android: minSdkVersion = "5" android: targetSdkVersion = "28" />
<soporta-pantallas android: largeScreens = "true"
android: normalScreens = "true"
android: smallScreens = "true"
android: anyDensity = "true" />)
SetApplicationAttribute (android: icon, "@ drawable / icon")
SetApplicationAttribute (android: label, "$ LABEL $")
CreateResourceFromFile (Macro, Themes.DarkTheme)

SetApplicationAttribute (android: networkSecurityConfig, @ xml / network_security_config)
CreateResource (xml, network_security_config.xml,
<configuración de seguridad de red>
<base-config cleartextTrafficPermitted = "true">
<anclajes de confianza>
<certificados src = "sistema" />
</trust-anchors>
</base-config>
</network-security-config>
)


I have attacked in the manifest
SetApplicationAttribute (android: usesCleartextTraffic, "true")



ERROR
AndroidManifest.xml: 22: error: Error al analizar XML: no está bien formado (token no válido)
 

Alexander1981

Member
Licensed User
My manifest

AddManifestText(

<uses-sdk android:minSdkVersion="5" android:targetSdkVersion="28"/>

<supports-screens android:largeScreens="true"

android:normalScreens="true"

android:smallScreens="true"

android:anyDensity="true"/>)

SetApplicationAttribute(android:icon, "@drawable/icon")

SetApplicationAttribute(android:label, "$LABEL$")

CreateResourceFromFile(Macro, Themes.DarkTheme)



SetApplicationAttribute(android:networkSecurityConfig, @xml/network_security_config)

CreateResource(xml, network_security_config.xml,

<network-security-config>

<base-config cleartextTrafficPermitted="true">

<trust-anchors>

<certificates src="system" />

</trust-anchors>

</base-config>

</network-security-config>

)
SetApplicationAttribute (android: usesCleartextTraffic, "true")

ERROR

AndroidManifest.xml:22: error: Error parsing XML: not well-formed (invalid token)
 
Upvote 0
Top