Facebook causing android build error

Facebook causing android build error
0.0 0

#1

After installing facebook plugin with sdkbox I am getting this error when trying to build android.

build/jsb-default/frameworks/cocos2d-x/cocos/platform/android/java/libs/android_support_v7/cardview/res/values-v23/styles.xml:20: error: Error: No resource found that matches the given name (at ‘cardBackgroundColor’ with value ‘?android:attr/colorBackgroundFloating’).


#2

it means google play services version not matching that libs


#3

but sdkbox is reporting I have latest versions.

Is that error not related to facebook?

OK… lets put it another way. I had a perfectly good WORKING project which was in beta and close to release. I decided we would add facebook into it. So…

sdkbox install facebook etc etc. NOW BROKEN… project. cant do sod all.


#4

Try
-Use min sdk 15
-Target build 23++


#5

like I said. All I did was install facebook via sdkbox. I use cocos vcreator to generate apk’s Nothing changed. API was set to 13.

I got pissed off and deleted whole build dir and started again.


#6

Now im getting really bloody annoyed.
So I deleted build dir. Re built everything.

via sdkbox import

sdkboxplay
iap
admob
facebook

And guess what.

build/jsb-default/frameworks/cocos2d-x/cocos/platform/android/java/libs/android_support_v7/cardview/res/values-v23/styles.xml:20: error: Error: No resource found that matches the given name (at ‘cardBackgroundColor’ with value ‘?android:attr/colorBackgroundFloating’).
[aapt]

Looks like facebook is broken for android and I cannot use it.
Why is nothing ever smooth with cocos and sdkbox?


#7

Looks like you need to target your android version to 23


#8

Hi ,

Did you find any solution to this problem. I am stuck here . I dont want to upgrade my app to android-23 is there any way i can intrgrate facebook with android-21 only. How can i degrade facebook sdk in sdkbox? Thanks in advance


#9

You can download old version facebook plugin, and replace then with laster facebook SDK.

http://download.sdkbox.com/installer/v1/sdkbox-facebook_v2.3.13.2.tar.gz

http://download.sdkbox.com/installer/v1/sdkbox-facebook_v{{VERSION}}.tar.gz


#10

Thanks yinjimmy . I downloaded sdkbox-facebook_v2.3.1.1 it worked.


#11

Hi yinjimmy,

If I use SDKBOX of lower version and plugins of higher version will it cause any issues?
for eg, If I use SKBOX of v2.3.1.1 and Apteligent of v2.3.13.2.

and what if I use SDKBOX of higher version an plugins of lower version
for eg, SDKBOX of v2.3.13.2 and Facebook of v2.3.1.1

can you please provide me link where I can get to download all the SDKBOX of a perticular version

Thanks in advance


#12

u can get all current release plugins’ link by

sdkbox list --json

but I don’t know how to get all release version, sorry.

I’m not sure, but you can have a try.


#13

Thanks yinjimmy, I’ll experiement and let u know about the result


#14

Hello. I’ve got the same error (cocos2d-x-3.16) and I want to use Android API 19 + sdkbox-facebook (to share my game among facebook friends).

  1. What sdkbox-facebook version should I use (to build with Android API 19)?
  2. Where and how could I review all old sdkbox-facebook plugins version? (i found only http://docs.sdkbox.com/en/release-note/)
  3. How can I properly install them? (now I just copy all the files to proj.android\jni\pluginfacebook\ - is it ok?)

#15

what’s your compile error?


#16

The same, as in topic header:
my_project_name\cocos2d\cocos\platform\android\java\libs\android_support_v7\cardview\res\values-v23\styles.xml:20: error: Error: No resource found that matches the given name (at 'cardBackgroundColor' with value '?android:attr/colorBackgroundFloating').
– when compiling with android API lower than 23 (I need 19).
When compiling with android API 23+ – no error, but my devices can’t start a built apk.


#17

whats the error?


#18

D asset : AssetManager–>addDefaultAssets CIP path not exsit!: com.rubik1d.com
D dalvikvm: open_cached_dex_file : /data/app/com.rubik1d.com-1.apk /data/dalvik-cache/data@app@com.rubik1d.com-1.apk@classes.dex: com.rubik1d.com
D dalvikvm: Trying to load lib /data/app-lib/com.rubik1d.com-1/libMyGame.so 0x42195de0: com.rubik1d.com
E dalvikvm: dlopen("/data/app-lib/com.rubik1d.com-1/libMyGame.so") failed: dlopen failed: cannot locate symbol “rand” referenced by “libMyGame.so”…: com.rubik1d.com
D AndroidRuntime: Shutting down VM: com.rubik1d.com
W dalvikvm: threadid=1: thread exiting with uncaught exception (group=0x41e9fc98): com.rubik1d.com
W dalvikvm: threadid=1: uncaught exception occurred: com.rubik1d.com
W System.err: java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol “rand” referenced by “libMyGame.so”…: com.rubik1d.com
W System.err: at java.lang.Runtime.loadLibrary(Runtime.java:371): com.rubik1d.com
W System.err: at java.lang.System.loadLibrary(System.java:526): com.rubik1d.com
W System.err: at org.cocos2dx.lib.Cocos2dxActivity.onLoadNativeLibraries(Cocos2dxActivity.java:99): com.rubik1d.com

Seems it was an empty project log with added facebook plugin;
About the same log appears for a really empty project (sample) without facebook plugin.


#19

Which c++ lib are you using, libstd++ or gnustl? We recommend using gnustl for now.


#20

In \proj.android\jni\ there is APP_STL := gnustl_static
Upd.: Empty project with sdkbox import facebook build with API-23 (also 26), min-19 starts ok… What I did - restarted windows few times, installing its updates.