Android Question AndroidManifest.xml:19: error: No resource identifier found for attribute 'networkSecurityConfig' in

Ariston

Member
Licensed User
Longtime User
Hi.
I AM trying to add this line to the manifest editor:

B4X:
AndroidManifest.xml:19: error: No resource identifier found for attribute 'networkSecurityConfig' in package 'android'

But when I compile the project, I get this erro:

B4X:
Packaging files.    Error
AndroidManifest.xml:19: error: No resource identifier found for attribute 'networkSecurityConfig' in package 'android'
AAPT path: C:\Android\android-sdk\tools\..\build-tools\27.0.2\aapt.exe
Exit code:1

This is the content of my Manifest:

B4X:
'This code will be applied to the manifest file during compilation.
'You do not need to modify it in most cases.
'See this link for for more information: http://www.b4x.com/forum/showthread.php?p=78136
AddManifestText(
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="28"/> ' Don't use version 28. It couses error in HttpJob.Donwload function
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
<supports-screens android:largeScreens="true"
    android:normalScreens="true"
    android:smallScreens="true"
    android:anyDensity="true"/>)
SetApplicationAttribute(android:networkSecurityConfig, @xml/network_security_config)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
SetApplicationAttribute(android:theme, "@android:style/Theme.Holo.Light") ' For black cursors
CreateResourceFromFile(Macro, Core.NetworkClearText)
'End of default text.

I am using b4a 9.30.
How can I solve it?
 

DonManfred

Expert
Licensed User
Longtime User
What does the code do? What are you trying to archieve? Where does the network_security_config xml come from?

Don't use version 28. It couses error in HttpJob.Donwload function

Bullshit. I am using target 28 and i am using httpjob without problem.

28 - The old http SDK is not available by default. This will cause problems with native libraries such as Google Maps who rely on the old SDK. To enable it: https://www.b4x.com/android/forum/t...ar-error-in-android-9-pie.103247/#post-649875
- 28 - Non-ssl (non-https) communication is not permitted by default. It can be enabled in B4A v9+ by adding this line to the manifest editor:
B4X:
CreateResourceFromFile(Macro, Core.NetworkClearText)
 
Upvote 0

Ariston

Member
Licensed User
Longtime User
Although a made a mistake when a quoted the line I am trying to add, the content in the manifest editor, as shown above, really contais "CreateResourceFromFile(Macro, Core.NetworkClearText)". Is is when I add this line that the compilation error occurs.

The purpuse is to read the whole content of a web page. I manage to read it when I set android:targetSdkVersion="27". The error shows only when I set it to 28.

Any tip?
 
Upvote 0
Top