9

Though I delete the "{}" braces but it still occurs.

<provider
        android:name="com.facebook.FacebookContentProvider" android:authorities="com.facebook.app.FacebookContentProvider{facebook_app_id}"
        android:exported="true" />
NorthCat
  • 9,643
  • 16
  • 47
  • 50

4 Answers4

30

The format shoud be: android:authorities="com.facebook.app.FacebookContentProvider0123456789" , where 012345678 is your Facebook app ID. Use it without the { character. So your provider tag should be:

<provider
android:authorities="com.facebook.app.FacebookContentProvider0123456789"
android:name="com.facebook.FacebookContentProvider"
android:exported="true"/>

However, if you accidently have already used the { character, then you will be most likely facing an Android Studio bug as it is reported here. The problem is that you are trying to edit the wrong manifest. The poped up manifest from Android Studio build message is not the application's manifest.

So simply open your application's manifest and you can edit it without problem.

Menelaos Kotsollaris
  • 5,776
  • 9
  • 54
  • 68
3

I had the same: the IDE re-inserted the curly braces. I cut the part, restarted Android Studio and pasted it. Then it worked.

David
  • 3,388
  • 2
  • 21
  • 25
1

Replace {facebook_app_id} in the snippet you posted with your Facebook app id.

Gokhan Caglar
  • 1,147
  • 6
  • 7
  • 1
    i think you say as: android:authorities="com.facebook.app.FacebookContentProvider1620994908000000" but when i press the run it becomes android:authorities="com.facebook.app.FacebookContentProvider{1620994908000000}" and show up the error. when i try to edit there is also a message like: Files under the build folder is generated should not edited. – Shakawat Hossain Apr 16 '15 at 06:09
  • AndroidManifest.xml would not be in the build folder. – Gokhan Caglar Apr 16 '15 at 18:54
1

You added the <provider../> tag in the wrong place

  1. Delete the <provider../> tag
  2. Close Android Manifest
  3. Try "Sync Project with Grandle Files"

  4. Build Project again

  5. Open Android Manifest
  6. Add the tag, without hte brackets '{}' right before application tag closes

...

<provider
    android:name="com.facebook.FacebookContentProvider"
    android:authorities="com.facebook.app.FacebookContentProvider7779..."
    android:exported="true" />
</application>

Hope it helps

node_modules
  • 4,790
  • 6
  • 21
  • 37
Panos K.
  • 61
  • 4