Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AdMobs : google_play_services/build.xml failed #50

Open
mariustruica opened this issue Apr 10, 2016 · 6 comments
Open

AdMobs : google_play_services/build.xml failed #50

mariustruica opened this issue Apr 10, 2016 · 6 comments

Comments

@mariustruica
Copy link

Hi guys,

I am trying to make AdMobs to work for my project but when executing build_native.py in command line i am getting an error :
ad_mob_error

I have cocos2dx v3.10.

Regards,
Marius

@mariustruica mariustruica changed the title AdMobs : google_play_services/build/xml failed AdMobs : google_play_services/build.xml failed Apr 10, 2016
@OscarLeif
Copy link
Contributor

You should better use Eclipse it could be bad setup I think I cannot find more reasons to fail.
But if you're using AdMobs remember to import google play services and uncomment the lines about Google Play Services.

@mariustruica
Copy link
Author

In eclipse , when the application starts i am getting this error (at runtime):

eclipse error

Here are my settings :
admob_manifest

google_play_manifest

google_play_properties

project_properties_1

project_properties_2

sonar_frameworksettings

eclipse_solution

@SonarSystems
Copy link
Owner

Does a fresh project work in Eclipse?

@mariustruica
Copy link
Author

a fresh project is the first thing i tried and does not work.... my project worked fine on my phone but when i added AdMob nothing worked... i am using ndk r10e and my phone is a galaxy S3 with android 4.3

@OscarLeif
Copy link
Contributor

@mariustruica Please don't show your banner or interstitial code, well reading your log file it seems that you're using rand() function in the c++ code can you try to compile your game in Visual studio or maybe you can temporaly change the rand() with a number, I'm not sure what the problem could be, rand should work well with android 6 with the NDK 10

@mariustruica
Copy link
Author

@OscarLeif Those banners are fakes ... I cannot run even a fresh copy of the project where no rand function is present. On a fresh copy the following error occurs :
fresh_project_error

I managed to run build_native.py by using google_play_services rev 22 instead of 29. But when running the project from eclipse i get the same error (the above on) . And of course in VS the project works fine.
I think the combination between google_play_services, android api versions , ndk versions are the problem..... can this be a problem on my phone ? i mean the v4.3 android version ?

IN VS i had an error when i added sonarSystems : d:\workspace\cocos2d-x-3.10\tests\testgame\classes\sonarframeworks.cpp(50): fatal error C1017: invalid integer constant expression

#if SCH_IS_SOCIAL_ENABLED == true (line 50)

and i solved the error in 2 steps :
1.Project Properties > Configuration Properties > C/C++ > Command Line
-Dfalse=0 -Dtrue=1
2.Project Properties > Configuration Properties > C/ C++ / Preprocessor
add _XKEYCHECK_H;
I run the project in VS 2013.

Can someone tell me what combination of ndk version , google_play_services rev and what android api for each project (cocos2dx , my project and google_play_services ) should i use ?

Regards ,
Marius

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants