Vaughn Dabney Vaughn Dabney - 5 months ago 33
Android Question

Can't get Appcelerator Titanium project to read the strings.xml file for Facebook Module integration on Android

I am currently porting over an app to function on Android (about 70% complete) and I need to integrate Facebook login. I have all of the application IDs and proxy setup. The only thing left is the strings.xml file that Android needs under /platform/android/res/values/strings.xml however, I've tried placing this directory in the root of the project as well as under 'Resources' but it still throws an error:

.../build/android/AndroidManifest.xml:19: error: Error: No resource found that matches the given name (at 'value' with value '@string/1498915623760005')


Inside the strings.xml file I have the following:

<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Updateme</string>
<string name="facebook_app_id">1498915623760005</string>
</resources>


In the tiapp.xml is:

<android xmlns:android="http://schemas.android.com/apk/res/android">
<manifest>
<application>
<activity android:label="@string/app_name"
android:name="com.facebook.LoginActivity" android:theme="@android:style/Theme.Translucent.NoTitleBar"/>
<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/1498915623760005"/>
</application>
</manifest>
</android>


My question is, where should this file be placed in relation to the Resources directory of the project? Or am I missing something completely?

Answer

In your tiapp.xml replace android:value="@string/1498915623760005"/> with android:value="@string/facebook_app_id"/>