Italian Help su errore Manifest - FileProvider

Discussion in 'Italian Forum' started by MARCO CORRIAS, Jan 16, 2019.

  1. MARCO CORRIAS

    MARCO CORRIAS Member Licensed User

    Buongiorno ,
    dietro consiglio di UDG , vorrei inserire dentro una mia App la possibilità di inviare una copia dell'ordine via mail. Quindi sto cercando di inserire FileProvider all'interno del mio codice.
    Purtroppo il debug mi segnala questa errore

    AndroidManifest.xml:29: error: Error: No resource found that matches the given name (at 'resource' with value '@xml/provider_paths').

    Potete aiutarmi ad inserire il manifest originale del FileProvider
    Code:
    AddManifestText(
    <uses-sdk android:minSdkVersion=
    "5" android:targetSdkVersion="26"/>
    <supports-screens android:largeScreens=
    "true"
        android:normalScreens=
    "true"
        android:smallScreens=
    "true"
        android:anyDensity=
    "true"/>)
    SetApplicationAttribute(android:icon, 
    "@drawable/icon")
    SetApplicationAttribute(android:
    label"$LABEL$")
    'End of default text.

    AddManifestText(<uses-permission
        android:name=
    "android.permission.WRITE_EXTERNAL_STORAGE"
        android:maxSdkVersion=
    "18" />
    )

    AddApplicationText(
      <provider
      android:name=
    "android.support.v4.content.FileProvider"
      android:authorities=
    "$PACKAGE$.provider"
      android:exported=
    "false"
      android:grantUriPermissions=
    "true">
      <meta-data
      android:name=
    "android.support.FILE_PROVIDER_PATHS"
      android:resource=
    "@xml/provider_paths"/>
      </provider>
    )
    CreateResource(xml, provider_paths,
       <files-
    path name="name" path="shared" />
    )
    nel manifest del mio progetto

    Code:
    AddManifestText(
    <uses-sdk android:minSdkVersion=
    "19" android:targetSdkVersion="26"/>
    <supports-screens android:largeScreens=
    "true"
        android:normalScreens=
    "true"
        android:smallScreens=
    "true"
        android:anyDensity=
    "true"/>)
    SetApplicationAttribute(android:icon, 
    "@drawable/icon")
    SetApplicationAttribute(android:
    label"$LABEL$")
    'End of default text.

    SetApplicationAttribute(android:theme, 
    "@style/MyAppTheme")

    AddApplicationText(
      <provider
      android:name=
    "android.support.v4.content.FileProvider"
      android:authorities=
    "$PACKAGE$.provider"
      android:exported=
    "false"
      android:grantUriPermissions=
    "true">
      <meta-data
      android:name=
    "android.support.FILE_PROVIDER_PATHS"
      android:resource=
    "@xml/provider_paths"/>
      </provider>
    )

    CreateResource(values, theme.xml,
    <resources>
        <style name=
    "MyAppTheme" parent="Theme.AppCompat.Light.NoActionBar">
            <item name=
    "colorPrimary">#0098FF</item>
            <item name=
    "colorPrimaryDark">#007CF5</item>
            <item name=
    "colorAccent">#AAAA00</item>
            <item name=
    "windowNoTitle">true</item>
            <item name=
    "windowActionBar">false</item>
        </style>
        <style name=
    "ToolbarMenu" parent="Base.ThemeOverlay.AppCompat.ActionBar">
            <item name=
    "android:textColorPrimary">#fff</item>
            <item name=
    "android:colorBackground">#0098FF</item>
        </style>
    </resources>
    )
    mi pare di capire che dovrei integrare questo
    Code:
    CreateResource(xml, provider_paths,
       <files-
    path name="name" path="shared" />
    )
    in questa mia sezione
    Code:
    CreateResource(values, theme.xml,
    <resources>
        <style name=
    "MyAppTheme" parent="Theme.AppCompat.Light.NoActionBar">
            <item name=
    "colorPrimary">#0098FF</item>
            <item name=
    "colorPrimaryDark">#007CF5</item>
            <item name=
    "colorAccent">#AAAA00</item>
            <item name=
    "windowNoTitle">true</item>
            <item name=
    "windowActionBar">false</item>
        </style>
        <style name=
    "ToolbarMenu" parent="Base.ThemeOverlay.AppCompat.ActionBar">
            <item name=
    "android:textColorPrimary">#fff</item>
            <item name=
    "android:colorBackground">#0098FF</item>
        </style>
    </resources>
    )
    Grazie in anticipo
    M.
     
  2. MARCO CORRIAS

    MARCO CORRIAS Member Licensed User

    Scusate ma era cosi semplice ... bastava metterli entrambi ?
    non mi segnalato alcun errore !!

    Ero convito che accettasse solo una dichiarazione CreateResource

    Code:
    CreateResource(values, theme.xml,
    <resources>
        <style name=
    "MyAppTheme" parent="Theme.AppCompat.Light.NoActionBar">
            <item name=
    "colorPrimary">#0098FF</item>
            <item name=
    "colorPrimaryDark">#007CF5</item>
            <item name=
    "colorAccent">#AAAA00</item>
            <item name=
    "windowNoTitle">true</item>
            <item name=
    "windowActionBar">false</item>
        </style>
        <style name=
    "ToolbarMenu" parent="Base.ThemeOverlay.AppCompat.ActionBar">
            <item name=
    "android:textColorPrimary">#fff</item>
            <item name=
    "android:colorBackground">#0098FF</item>
        </style>
    </resources>
    )

    CreateResource(xml, provider_paths,
       <files-
    path name="name" path="shared" />
    )
    Oppure ho avuto cu.o .. fortuna ?
     
    Last edited: Jan 17, 2019
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice