The type android.support.v4.app.Fragment cannot be resolved. It is indirectly referenced from required .class files, Facebook [duplicate]

放肆的年华 提交于 2019-12-21 06:04:31

问题


i want to publish photo and text in facebook, for that i have used below code from the facebook reference site

https://developers.facebook.com/docs/android/link-to-your-native-app/#step6

i have copied all the code in my activity so code but in below line i am getting error

    Session.NewPermissionsRequest newPermissionsRequest = new Session.NewPermissionsRequest(
                        MainActivity.this, PERMISSIONS);

here in this line i am getting error like The type android.support.v4.app.Fragment cannot be resolved. It is indirectly referenced from required .class files

can anybody help me, how to resolve this, i think that it is because *android-support-v4.jar * is also over here and it is in facebook sdk also,


回答1:


I resolved this issue using this StackOverflow answer:

If you are using eclipse and windows, here is how you can get rid of this error.

Right click on your project folder->Build path-> Configure build path->

Add External Jars -> select "android-support-v4.jar" file (It'll be located in Android "android-sdk-windows\extras\android\support")

then click OK.



来源:https://stackoverflow.com/questions/20771395/the-type-android-support-v4-app-fragment-cannot-be-resolved-it-is-indirectly-re

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!