Menu
Who Do Is
  • Home
  • What
  • How
  • Is
  • Can
  • Are
  • Does
  • Do
  • Why
  • Who
  • Where
  • Which
  • Which
  • Should
  • Will
  • When
  • What’s
  • Did
Who Do Is

[ANSWERED] Android libgdx does not recognize Facebook ShareDialog (Facebook SDK)

Posted on November 14, 2022

Solution 1 :

You declared your dependency in the android module, but MyGdxGame is in your core module – that’s the problem here. You need to follow the documentation for working with platform dependant code.

Problem :

I have a problem in integration Facebook Sharedialog with my android libgdx game:

  1. In build.gradle (Project), I added mavenCentral() in the buildscript { repositories {}} section.

  2. In build.gradle (Module: android) I added implementation 'com.facebook.android:facebook-share:7.1.0' and implementation 'com.facebook.android:facebook-common:7.1.0' in dependencies.

  3. But in my MyGdxGame when I declared ShareDialog, it came with following error:

    Cannot resolve symbol ShareDialog, Add library ‘Gradle:com.facebook.amdroid:facebook-common:[email protected]’ to classpath.

    Even it did not recognize the import com.facebook.share.widget.ShareDialog.

I’ve tried the same with a normal Android app that is not Libgdx game and seen Facebook ShareDialog worked well.

Could you please advise if I did anything wrong?

I also tried with another library: gdx-facebook (https://github.com/TomGrill/gdx-facebook) but failed because the method publish_actions was deprecated. The detail can be found here: https://developers.facebook.com/blog/post/2018/07/31/platform-update-publish-permission/

Comments

Comment posted by Kevin

Thanks for your comment. Actually I tried to declare the dependency in both Android and Core module but it didn’t work. Actually I tried with another platform also: com.codeandweb.physicseditor and there was no problem.

Comment posted by github.com/libgdx/libgdx/wiki/…

Follow this guide

READ  [ANSWERED] java - Assign an attribute to android.TextStyle
Powered by Inline Related Posts

Recent Posts

  • How can I play with my cat without toys?
  • What is a bag pipe band called?
  • Are Honda Civics actually fast?
  • Are Yankee candles toxic?
  • How do I pair my Michael Kors smartwatch with my Android?

Recent Comments

No comments to show.

Archives

  • January 2023
  • December 2022
  • November 2022
  • October 2022
  • September 2022

Categories

  • ¿Cómo
  • ¿Cuál
  • ¿Cuántas
  • ¿Cuánto
  • ¿Que
  • ¿Quién
  • 90” and 108” so you may have to round up to the nearest size.
  • and delete any Spotify folders from it. Once this is done
  • Android
  • Are
  • At
  • Bei
  • blink
  • C'est
  • Can
  • carbs
  • Comment
  • Did
  • Do
  • Does
  • During
  • For
  • Has
  • How
  • In
  • Is
  • Ist
  • Kann
  • Können
  • nouveau
  • On
  • or 108 inches.2020-08-03
  • Où
  • owning
  • Pourquoi
  • Puis-je
  • Quand
  • Quante
  • Quel
  • Quelle
  • Quelles
  • Quels
  • Qui
  • Should
  • Sind
  • Sollte
  • spiritual
  • tap the downward-facing arrow on the top left. A downward-facing arrow will appear underneath each song in the album; they'll turn green as the download completes.2020-07-28
  • Uncategorized
  • Wann
  • Warum
  • Was
  • Welche
  • Welcher
  • Welches
  • Welke
  • Wer
  • Were
  • What
  • What's
  • When
  • Where
  • Which
  • Who
  • Whose
  • Why
  • Wie
  • Will
  • Wo
  • Woher
  • you will receive two curtains each with the same measurements of width 66"" (168cm) x drop 54""(137cm).
  • you'll see a green downward-facing arrow next to each song.2021-02-26
©2023 Who Do Is | Powered by SuperbThemes & WordPress