question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

@Strings of cordova plugins (i.e. cordova-plugin-facebook4)

See original GitHub issue

Hello everyone and thanks for your work!

I have trouble set plugin related @strings to our project.

For example the cordova-plugin-facebook4 plugin required 2 @strings:

<string name="fb_app_id">123456789</string>
<string name="fb_app_name">CompagnyName</string>

If I set them in android/app/src/main/res/values/strings.xml I get

error: resource string/fb_app_id (aka com.my.app:string/fb_app_id) not found.
Message{kind=ERROR, text=error: resource string/fb_app_id (aka com.my.app:string/fb_app_id) not found., sources=[android/app/build/intermediates/manifests/full/debug/AndroidManifest.xml:111], original message=, tool name=Optional.of(AAPT)}

otherwise if I set them in node_modules/@capacitor/cli/assets/capacitor-android-plugins/src/main/res/values/facebookconnect.xml it’s work ! But unfortunetly it’s will be erased at the next cap sync

I have the same kind of issue with google-map-plugins that require key to work.

Is there anyway to make the configuration persistant?

Thanks

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:4
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

6reactions
TonGarciacommented, Jul 6, 2018

@PapyElGringo change your platforms/android/app/src/main/res/values/strings.xml to (worked to me):

<?xml version='1.0' encoding='utf-8'?>
<resources>
    <string name="app_name">Melhor da Vez</string>
    <string name="launcher_name">@string/app_name</string>
    <string name="activity_name">@string/launcher_name</string>
    <string name="fb_app_id">ID</string>
    <string name="fb_app_name">APP_NAME</string>
</resources>
4reactions
jcesarmobilecommented, Jul 10, 2018

For me, adding them to the apps string file is working fine. Just had to sync gradle first, and then run. Can you try with latest version of Capacitor?

Read more comments on GitHub >

github_iconTop Results From Across the Web

jeduan/cordova-plugin-facebook4: Use the latest Facebook ...
Use the latest Facebook SDK in your Cordova and Ionic projects - GitHub ... facebookConnectPlugin.login(Array strings of permissions, Function success, ...
Read more >
cordova-plugin-facebook4 - UNPKG
This is the official plugin for Facebook in Apache Cordova/PhoneGap! 11. 12, The Facebook plugin for Apache Cordova allows you to use the ......
Read more >
cordova-plugin-facebook4 Couldn't Make The App Start ...
So I changed it in ionic-cordova-facebook4 plugin. You can find root/plugins/cordova-plugin-facebook4/plugin.xml file.
Read more >
cordova-plugin-facebook-connect - npm
This is a fork of the official plugin for Facebook in Apache Cordova that implements the latest Facebook SDK.
Read more >
Config.xml - Apache Cordova
config.xml is a global configuration file that controls many aspects of a cordova application's behavior. This platform-agnostic XML file is arranged based ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found