Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

FriendPickerSample Installation failed due to invalid APK file! [ FriendPickerSample]

I got the error in console while working with facebook sdk samples.I have checked the logcat.The error in logcat and console is given below.

In Console:

[2013-12-05 17:36:05 - FriendPickerSample] Installation failed due to invalid APK file! [2013-12-05 17:36:05 - FriendPickerSample] Please check logcat output for more details. [2013-12-05 17:36:05 - FriendPickerSample] Launch canceled

In Logcat:

12-05 17:42:02.617: W/PackageParser(582): Unable to read AndroidManifest.xml of /data/local/tmp/FriendPickerSample.apk 12-05 17:42:02.617: W/PackageParser(582): java.io.FileNotFoundException: AndroidManifest.xml 12-05 17:42:02.617: W/PackageParser(582): at android.content.res.AssetManager.openXmlAssetNative(Native Method) 12-05 17:42:02.617: W/PackageParser(582): at android.content.res.AssetManager.openXmlBlockAsset(AssetManager.java:487) 12-05 17:42:02.617: W/PackageParser(582): at android.content.res.AssetManager.openXmlResourceParser(AssetManager.java:455) 12-05 17:42:02.617: W/PackageParser(582): at android.content.pm.PackageParser.parsePackageLite(PackageParser.java:722) 12-05 17:42:02.617: W/PackageParser(582): at com.android.defcontainer.DefaultContainerService$1.getMinimalPackageInfo(DefaultContainerService.java:169) 12-05 17:42:02.617: W/PackageParser(582): at com.android.internal.app.IMediaContainerService$Stub.onTransact(IMediaContainerService.java:110) 12-05 17:42:02.617: W/PackageParser(582): at android.os.Binder.execTransact(Binder.java:367) 12-05 17:42:02.617: W/PackageParser(582): at dalvik.system.NativeStart.run(Native Method) 12-05 17:42:02.617: W/DefContainer(582): Failed to parse package 12-05 17:42:02.627: W/ActivityManager(169): No content provider found for permission revoke: file:///data/local/tmp/FriendPickerSample.apk

like image 508
Sai Durga Avatar asked Dec 03 '22 21:12

Sai Durga


2 Answers

I had same issue while working with Samples provided with Facebook SDK. Finally I figured out issue by following these steps.

  • Main cause of problem is libs folder (it is declared a link but depending of your folder configuration, it may be a broken link) which comes with projects, so delete it.

enter image description here

  • Check in your project properties, -> Android, that your project has a reference to the library of the SDK (bottom part of the screen)

enter image description here

  • Now clean and build project.

Also if someone looking for a simplest solution for facebook integration then i will prefer to use Simple Facebook SDK.

like image 98
Vibhor Bhardwaj Avatar answered Dec 10 '22 11:12

Vibhor Bhardwaj


I stumbled on this error few times during my Facebook sample application tests. What you should do and helped me is:

  1. Change the Project build Target API using -> Right Click on the project -> Properties -> Android.

  2. Go to the bin folder of the project in it delete the already created apk file and then try to run the project again.

like image 34
Emil Adz Avatar answered Dec 10 '22 11:12

Emil Adz