Bug? Erron in Android Manifest

wizard699

Active Member
Licensed User
Longtime User
Erel,
I've a problem.

B4a working very well.
But, for hard disk space reason, I've uninstalled and re-installed Android SDK.

Now, after I've change Path .... every project that I compile, there is also the same error

Compiling layouts code. (0.02s)
Generating R file. Error
AndroidManifest.xml:30: Tag <uses-permission> attribute name has invalid character

And ... also If i correct this character in AndroidManifest ... after another run ... the problem is the same.
Whsat's the problem? How can I correct it. It's depend from the SDK reinstallation.
I'ts the only change that i've made.
 

wizard699

Active Member
Licensed User
Longtime User
Erel .... some problems ...
from time that i've reinstalled android SDK, all my projects (yet in google play store) present the same error in ANDROIDMANIFEST ....
an invalid characther was written in the file and in all projects must be eliminated.
Why????
 

wizard699

Active Member
Licensed User
Longtime User
and also a lot of error using #AdditionalRes: that never give error to me ... also in project yet compiled and on-line
what's the problem that can generate all these inconvenients?
it is frustrating to find that projects that worked now have never had errors
 

wizard699

Active Member
Licensed User
Longtime User
Erel, I've foud the problem ... that I don't have before reinstalling Anrdoid SDK.
Error in AdditonRes was eliminated reneming a dir from Values to values .... all lower case.
But, before reinstalling Android sdk .... this folder, Values, has existed with "v" in UpperCase and B4A have always compiled my app
Why?
 

focus330

Member
Licensed User
Longtime User
Eriel,
I have the same problem that is :
After reinstalling Android-SDk in other path I have:
Generating R file. Error
AndroidManifest.xml:19: Tag <uses-permission> attribute name has invalid character ','

The manifest:
B4X:
AddManifestText(
<uses-sdk android:minSdkVersion="9" android:targetSdkVersion="23" />
<supports-screens android:largeScreens="true"
    android:xlargeScreens="true"
    android:normalScreens="true"
    android:smallScreens="true"
    android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
AddPermission("android.permission.READ_CONTACTS")
AddPermission("android.permission.WRITE_CONTACTS")
AddPermission("android.permission.GET_ACCOUNTS")
AddPermission("android.permission.AUTHENTICATE_ACCOUNTS")
AddPermission(android.permission.INTERNET)
AddPermission(com.android.vending.CHECK_LICENSE)
AddPermission(com.google.android.providers.gsf.permission.READ_GSERVICES)
AddPermission(android.permission.ACCESS_EXTERNAL_STORAGE)
AddPermission(android.permission.WRITE_EXTERNAL_STORAGE)
AddPermission(android.permission.READ_PHONE_STATE)
AddPermission(android.permission.WAKE_LOCK)
AddPermission(com.android.launcher.permission.INSTALL_SHORTCUT)

The line 19 is:
B4X:
 <uses-permission android:name="android.permission.READ_CONTACTS,android.permission.WRITE_CONTACTS,android.permission.GET_ACCOUNTS"/>


The AndroidManifest.xml:
B4X:
    <uses-sdk android:minSdkVersion="9" android:targetSdkVersion="23" />
    <supports-screens android:largeScreens="true"
        android:xlargeScreens="true"
        android:normalScreens="true"
        android:smallScreens="true"
        android:anyDensity="true"/>
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
    <uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
    <uses-permission android:name="android.permission.WAKE_LOCK"/>
    <uses-permission android:name="android.permission.READ_CONTACTS,android.permission.WRITE_CONTACTS,android.permission.GET_ACCOUNTS"/>
    <uses-permission android:name="com.android.vending.CHECK_LICENSE"/>
    <uses-permission android:name="android.permission.READ_PHONE_STATE"/>
    <uses-permission android:name="android.permission.BLUETOOTH"/>
    <uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
    <uses-permission android:name="android.permission.READ_CONTACTS"/>
    <uses-permission android:name="android.permission.WRITE_CONTACTS"/>
    <uses-permission android:name="android.permission.GET_ACCOUNTS"/>
    <uses-permission android:name="android.permission.AUTHENTICATE_ACCOUNTS"/>
    <uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
    <uses-permission android:name="android.permission.ACCESS_EXTERNAL_STORAGE"/>
    <uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT"/>

I read the others replies but nothing seems incorrect.
Can you help me ?
Thanks
 

focus330

Member
Licensed User
Longtime User
Also removing quotes I have the error.
I'm using the last Beta V.5.20 but also downgrading to the last stabile version V5.2.0 the error appears.
Before reinstalling Android-SDk everithing was ok.

I see that the incriminated line has 3 permssion declarations separated by commas ( the illegal character)
The same declarations appears in single lines.

I made a new installation in other PC but the problem appears the same.
 

focus330

Member
Licensed User
Longtime User
Hi Erel

the problem is a library written an year ago using Eclipse that contains:
B4X:
Import anywheresoftware.b4a.BA.Permission:
....
@Permissions(values = ( "android.permission.READ_Contacts, android.permission.WRITE_Contacts, android.permission.GET_ACCOUNTS" )

Reinstalling Android-SDK with only the last version (23) the problem appears.
Installing also an old version (10) (without changes of the config paths in B4A ) the problem disappears.
 
Top