I followed Facebook’s Android dev site to setup Facebook Android projects in Eclipse:
https://developers.facebook.com/docs/guides/mobile/android_hackbook/
I used the “debug” target in build.xml to build using Ant. But I’m getting these errors:
[aapt] E:\Android\facebook-android-sdk\examples\Hackbook\res\layout\token_refresh.xml:15: error: Error: String types not allowed (at ‘layout_width’ with value ‘match_parent’).
[aapt] E:\Android\facebook-android-sdk\examples\Hackbook\res\layout\token_refresh.xml:28: error: Error: String types not allowed (at ‘layout_width’ with value ‘match_parent’).
BUILD FAILED
C:\Android\android-sdk-windows\tools\ant\build.xml:598: The following error occurred while executing this line:
C:\Android\android-sdk-windows\tools\ant\build.xml:627: null returned: 1
Why is the token_refresh.xml erroring out? I haven’t made any changes to the latest facebook sdk that I pulled down from github.
I did change Hackbook’s APP_ID to use a new one I created. I have the facebook sdk referenced in this project. I have libs folder in this project.
I open token_refresh.xml and it shows these errors in the log:
NOTE: This project contains resource errors, so aapt did not succeed, which can cause rendering failures. Fix resource problems first.
Failed to convert @color/grey into a drawable
Couldn't resolve resource @string/app_name
Couldn't resolve resource @string/access_token_label
Couldn't resolve resource @string/access_token_expires_label
Couldn't resolve resource @color/grey
Couldn't resolve resource @string/refresh_button
Couldn't resolve resource @string/tip_label
Couldn't resolve resource @string/refresh_token_tip
Exception details are logged in Window > Show View > Error Log
Does anyone know how to fix these problems?
Thank you
Hackbook only works on Android SDK 2.2 +. I had it set to 2.1, so it didn’t work. Now it compiles and runs on my AVD 2.2.