Facebook sdk sample application FriendPickerSamplenot working - android

I have downloaded facebook sdk by registering my application on facebook developers. I got some sample applications .When i tried to run FriendPickerSample application i got the message in console as "installation failed due to invalid apk file".After that i followed the instructions in developers website,but still the problem exist.Can anyone help me know what the problem is?
the code in android manifest file is:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.facebook.samples.friendpicker"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="21" />s
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<application android:label="#string/app_name"
android:icon="#drawable/icon"
android:theme="#android:style/Theme.NoTitleBar"
android:name=".FriendPickerApplication"
>
<activity android:name="FriendPickerSampleActivity"
android:label="#string/app_name"
android:windowSoftInputMode="adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<activity android:name="PickFriendsActivity"
android:label="Pick Friends">
</activity>
<activity android:name="com.facebook.LoginActivity"
android:theme="#android:style/Theme.Translucent.NoTitleBar"
android:label="#string/app_name" />
<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="#string/app_id"/>
</application>
</manifest>

Related

Uploading App to PlayStore failed

When am trying to upload the signed apk to PlayStore, I am getting following error :
Your APK cannot be analyzed using 'aapt dump badging'.
Error output: Failed to run aapt dump badging
Could not find entry resources.arsc
Zip: Could not find entry AndroidManifest
ERROR: dump failed because no AndroidManifest found
My manifest file is :
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.aa"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="18" />
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
<application
android:allowBackup="true"
android:label="#string/app_name"
android:theme="#style/AppTheme"
android:icon="#drawable/logo"
android:debuggable="false">
<meta-data android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version"/>
<activity
android:name="com.example.aa.xx"
android:label="#string/app_name"
android:screenOrientation="portrait"
android:theme="#android:style/Theme.Black.NoTitleBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.example.aa.bb"
android:theme="#android:style/Theme.Black.NoTitleBar"
android:screenOrientation="portrait"></activity>
<activity android:name="com.google.android.gms.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/>
</application></manifest>
Where am I going wrong?
Thanks for your replies
Guys thanks for your replies. I was able to upload the App.
For people who might get similar issue here is the solution :
I just changed the package name from com.example.aa to com.zz.aa and the problem was resolved.
So i advise not to keep example in package name.

Android compilation trouble after adding and removing BlackBerry SDK

I installed BB tools for Eclipse, just added and removed BB Nature to one of my projects.
And now, I can't compile it (for Android).
Eclipse told me about some troubles in AndroidManifest.xml:
native-code: armeabi AndroidManifest.xml /VitocarsAndroidApp AndroidManifest.xml BlackBerry Verifying Problem
But the manifest is OK, no one line is highlighted:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.asap.vitocarsandroidapp"
android:versionCode="5"
android:versionName="1.04" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="17" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CALL_PHONE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<application
android:name="com.asap.vitocarsandroidapp.system.VitocarsApplication"
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="com.asap.vitocarsandroidapp.LoginActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.asap.vitocarsandroidapp.TableViewActivity"
android:label="#string/title_activity_table_view" >
</activity>
<activity
android:name="com.asap.vitocarsandroidapp.PartActivity"
android:label="#string/title_activity_part" >
</activity>
<activity
android:name="com.asap.vitocarsandroidapp.PhotoViewActivity"
android:label="#string/title_activity_photo_view" >
</activity>
<activity
android:name="com.asap.vitocarsandroidapp.UserRegisterActivity"
android:label="#string/title_activity_user_register" >
</activity>
<activity
android:name="com.asap.vitocarsandroidapp.ConfirmPhoneActivity"
android:label="#string/title_activity_confirm_phone" >
</activity>
<activity
android:name="com.asap.vitocarsandroidapp.OfficeActivity"
android:label="#string/title_activity_office" >
</activity>
<activity
android:name="com.asap.vitocarsandroidapp.PriceOfferActivity"
android:label="#string/title_activity_price_offer" >
</activity>
<activity
android:name="com.asap.vitocarsandroidapp.RegionOrderActivity"
android:label="#string/title_activity_region_order" >
</activity>
<activity
android:name="com.asap.vitocarsandroidapp.MapView"
android:label="#string/title_activity_map_view" >
</activity>
</application>
</manifest>
I already spent a lot of time, trying to solve it.
Maybe, somebody can help me?
Had the exact same issue.
Only uninstalling the Blackberry plugin solved it for me.
I guess that the Blcackberry plugin still left some remainders in the validation process of Eclipse, even though I removed the Blackberry nature from the project.
Check the .project file and remove all the * rim * stuff.
A build command and nature was leftover when i ran into this problem.

android manifest is no well formed

Since i upgraded to ADT 20, i've been trying to create new Android project, but the same thing happen every time : The markup in the document preceding the root element must be well-formed. And i've got another error in my main activity. R is not generated.
<<<<<<< Original
<uses-sdk android:minSdkVersion="15" android:targetSdkVersion="15" />
<application android:label="#string/app_name"
android:icon="#drawable/ic_launcher"
android:theme="#style/AppTheme">
</application>
<uses-sdk android:minSdkVersion="15" android:targetSdkVersion="15" />
<application android:label="#string/app_name"
android:icon="#drawable/ic_launcher"
android:theme="#style/AppTheme">
</application>
<uses-sdk
android:minSdkVersion="15"
android:targetSdkVersion="15" />
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name=".Test"
android:label="#string/title_activity_test" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.example.testphonegap.MainActivity" />
</activity>
</application>
<application>
<activity android:name=".Test"
android:label="#string/title_activity_test">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
=======
<application>
<activity android:name=".Test"
android:label="#string/title_activity_test">
<meta-data android:name="android.support.PARENT_ACTIVITY"
android:value="android.app.ListActivity" />
</activity>
</application>
Added
Okay, i think i know what happen. So the first time i wanted to create this new project, i missed something, so i deleted it from Eclipse, and from my computer, i started again, without exiting Eclipse, so it build in top of the former AndroidManifest.xml (even if it was deleted). So i deleted all, made a clean, and reboot Eclipse, and know it's working fine.
As my knowledge you have to upgrade to ADT 20.0.1

App fails with permission when try to debug on Android 4.0 device

I've written app for Android 2.2 (target version) and I tried to run it on device with Android 4.0.3 but it fails with granting permission for internet connection. It run without problems on Android 2.3. Is there any way to run that app on A4.0 without changing target SDK version?
My AndroidManifest.xml:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="pl.niemier.allegro"
android:versionCode="1"
android:versionName="1.0" android:installLocation="auto">
<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="10"/>
<uses-permission android:name="android.permission.INTERNET"/>
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name" android:debuggable="true">
<activity
android:name=".MainActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".ShowAuctionActivity"></activity>
<activity android:name=".SearchFormActivity"></activity>
<activity android:name=".UserInfoActivity"></activity>
<activity android:name=".ConfigPanelActivity"></activity>
</application>
</manifest>
Try adding the SDK target version in you manifest file:
<uses-sdk android:minSdkVersion="8" />
Please check if the version number is correct.
I assume you have added <uses-permission android:name="android.permission.INTERNET" /> since it works on Android 2.3.

Urban Airship config Android app manifest file

I want to use an Urban Airship service in my Android app.
I've already registered a sender email following this tutorial.
Now when I've got my C2DM AUTH_TOKEN I've created an app on my UA account and pasted the TOKEN along with the package name of my app (which is "com.neo.ovs") .
Now onCreate method I've added those lines of code :
PushManager.enablePush();
PushPreferences prefs = PushManager.shared().getPreferences();
Logger.info("My Application onCreate - App APID: " + prefs.getPushId());
Now of course I get an error becouse of various permissions I didn't write in my manifest.xml file.
But I'm a bit confused about the package names and prefixes I should alter following this manifest example.
how should my manifest look ?
write now it looks like this :
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.neo.ovs"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="8" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<application
android:icon="#drawable/logo"
android:label="OVS" >
<activity
android:name=".LoginActivity"
android:label="OVS"
android:theme="#android:style/Theme.NoTitleBar" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<!-- Entry for MyListActivity.class -->
<activity
android:name="com.neo.ovs.MyListActivity"
android:label="My List Activity"
android:theme="#android:style/Theme.NoTitleBar" >
</activity>
<activity
android:name=".VideoScreen"
android:configChanges="orientation|keyboardHidden"
android:label="Video View Demo"
android:screenOrientation="landscape"
android:theme="#android:style/Theme.NoTitleBar" >
</activity>
</application>
</manifest>

Categories

Resources