Bug? Erron in Android Manifest

Discussion in 'Bugs & wishlist' started by wizard699, Jul 10, 2015.

  1. wizard699

    wizard699 Member Licensed 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.
     
  2. wizard699

    wizard699 Member Licensed User

    Problem resolved!!! Excuse me, Erel.
     
  3. wizard699

    wizard699 Member Licensed 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????
     
  4. wizard699

    wizard699 Member Licensed 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
     
  5. wizard699

    wizard699 Member Licensed 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?
     
  6. Erel

    Erel Administrator Staff Member Licensed User

    The resources folder names should be lower cased. They are processed by Android SDK tools.
     
  7. focus330

    focus330 Member Licensed 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:
    Code:
    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:
    Code:
    <uses-permission android:name="android.permission.READ_CONTACTS,android.permission.WRITE_CONTACTS,android.permission.GET_ACCOUNTS"/>

    The AndroidManifest.xml:
    Code:
    <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
     
  8. Erel

    Erel Administrator Staff Member Licensed User

    I'm unable to reproduce it. I've took the code you posted it and put it in the manifest editor. The generated manifest file is valid.

    Which version of B4A are you using? Try to remove the quotes from the permissions.
     
    focus330 likes this.
  9. focus330

    focus330 Member Licensed 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.
     
  10. Erel

    Erel Administrator Staff Member Licensed User

    Can you upload your project (File - Export as zip)?
     
  11. focus330

    focus330 Member Licensed User

    Hi Erel

    the problem is a library written an year ago using Eclipse that contains:
    Code:
    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.
     
  12. Erel

    Erel Administrator Staff Member Licensed User

    The problem is in the library. It creates a single invalid permission.

    You can fix it in the xml file if you like.
     
  13. focus330

    focus330 Member Licensed User

    OK. Thanks.
     
Loading...