Admob minimum system requirements

Admob minimum system requirements
0

#1

On admob page:
Cocos2d-x v2.2+
Android v2.3+

  • create and compile new project (cocos2d-x v3.10)
  • import admob (all succesfull)
  • replace include path in AppDelegate.cpp:
    #include "../proj.android/jni/pluginadmob/PluginAdMob.h"
  • compile and deploy application.
    On device with android 4.+ application worked. On device with android 2.3.6 app crashed:
D/dalvikvm(13516): Trying to load lib /mnt/asec/org.cocos2dx.admob-1/lib/libcocos2dcpp.so 0x40515df8
I/DEBUG   ( 1323): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
I/DEBUG   ( 1323): Build fingerprint: 'samsung/GT-S6102/GT-S6102:2.3.6/GINGERBREAD/XXMA1:user/release-keys'
I/DEBUG   ( 1323): pid: 13516, tid: 13516  >>> org.cocos2dx.admob <<<
I/DEBUG   ( 1323): signal 4 (SIGILL), code 1 (ILL_ILLOPC), fault addr 8111dd3a
I/DEBUG   ( 1323):  r0 8145694c  r1 81121c55  r2 8144d000  r3 8111dd21
I/DEBUG   ( 1323):  r4 8145694c  r5 00000048  r6 00000004  r7 00000000
I/DEBUG   ( 1323):  r8 80218240  r9 0000cec8  10 4428fc04  fp beebc7d0
I/DEBUG   ( 1323):  ip 8144cb88  sp beebc3e8  lr 8111dd2f  pc 8111dd3a  cpsr 40000030
I/DEBUG   ( 1323):  d0  3f8000003f800000  d1  3ff0000040000000
I/DEBUG   ( 1323):  d2  4d86c52c424d3647  d3  00540ff04a2c8180
I/DEBUG   ( 1323):  d4  3fbc71c7002b2060  d5  3fcef049fb9094d1
I/DEBUG   ( 1323):  d6  401c000000000000  d7  0000000000000000
I/DEBUG   ( 1323):  d8  0000000000000000  d9  0000000000000000
I/DEBUG   ( 1323):  d10 0000000000000000  d11 0000000000000000
I/DEBUG   ( 1323):  d12 0000000000000000  d13 0000000000000000
I/DEBUG   ( 1323):  d14 0000000000000000  d15 0000000000000000
I/DEBUG   ( 1323):  scr 60000010
I/DEBUG   ( 1323): 
I/DEBUG   ( 1323):          #00  pc 0011dd3a  /mnt/asec/org.cocos2dx.admob-1/lib/libcocos2dcpp.so
I/DEBUG   ( 1323):          #01  lr 8111dd2f  /mnt/asec/org.cocos2dx.admob-1/lib/libcocos2dcpp.so
I/DEBUG   ( 1323): 
I/DEBUG   ( 1323): code around pc:
I/DEBUG   ( 1323): 8111dd18 002bd309 0032d812 4c08b510 6824447c 
I/DEBUG   ( 1323): 8111dd28 f0034620 4906ff5d 46204a06 68094479 
I/DEBUG   ( 1323): 8111dd38 e8bd447a f2494010 bf00bcd5 0032d7f0 
I/DEBUG   ( 1323): 8111dd48 0032d7e4 0032f2c4 4c08b510 3448447c 
I/DEBUG   ( 1323): 8111dd58 f24d4620 4906f903 46204a06 68094479 
I/DEBUG   ( 1323): 
I/DEBUG   ( 1323): code around lr:
I/DEBUG   ( 1323): 8111dd0c 00338c6e 0032f326 0032d804 002bd309 
I/DEBUG   ( 1323): 8111dd1c 0032d812 4c08b510 6824447c f0034620 
I/DEBUG   ( 1323): 8111dd2c 4906ff5d 46204a06 68094479 e8bd447a 
I/DEBUG   ( 1323): 8111dd3c f2494010 bf00bcd5 0032d7f0 0032d7e4 
I/DEBUG   ( 1323): 8111dd4c 0032f2c4 4c08b510 3448447c f24d4620 
I/DEBUG   ( 1323): 
I/DEBUG   ( 1323): code around r0:
I/DEBUG   ( 1323): 8145692c 00000000 81120fb1 81120fa5 00000000 
I/DEBUG   ( 1323): 8145693c 00000000 00000000 001ac744 00000000 
I/DEBUG   ( 1323): 8145694c 00000000 00000000 00000000 00000000 
I/DEBUG   ( 1323): 8145695c 00000000 00000000 00000000 00000000 
I/DEBUG   ( 1323): 8145696c 00000000 00000000 00000000 00000000 
I/DEBUG   ( 1323): 
I/DEBUG   ( 1323): code around r1:
I/DEBUG   ( 1323): 81121c34 68404770 e8804770 47700006 4604b510 
I/DEBUG   ( 1323): 81121c44 b1086800 eb36f7f7 60232300 bd106063 
I/DEBUG   ( 1323): 81121c54 4604b510 fff2f7ff bd104620 4614b570 
I/DEBUG   ( 1323): 81121c64 460d4606 ffeaf7ff dd0b2c00 6074b155 
I/DEBUG   ( 1323): 81121c74 f7f74620 4629eb26 60304622 4070e8bd 
I/DEBUG   ( 1323): 
I/DEBUG   ( 1323): code around r2:
I/DEBUG   ( 1323): 8144cfe0 afd211c9 afd20815 afd187d5 afd19fc9 
I/DEBUG   ( 1323): 8144cff0 afd0b810 afd0c670 afd17d11 afd11e41 
I/DEBUG   ( 1323): 8144d000 00000000 ffffffff 813dd15b 813dd16c 
I/DEBUG   ( 1323): 8144d010 8113030d 813dd175 813dd184 81130135 
I/DEBUG   ( 1323): 8144d020 ffffffff ffffffff 3f800000 00000020 
I/DEBUG   ( 1323): 
I/DEBUG   ( 1323): code around r3:
I/DEBUG   ( 1323): 8111dd00 f2496809 b002fcf3 bf00bd70 00338c6e 
I/DEBUG   ( 1323): 8111dd10 0032f326 0032d804 002bd309 0032d812 
I/DEBUG   ( 1323): 8111dd20 4c08b510 6824447c f0034620 4906ff5d 
I/DEBUG   ( 1323): 8111dd30 46204a06 68094479 e8bd447a f2494010 
I/DEBUG   ( 1323): 8111dd40 bf00bcd5 0032d7f0 0032d7e4 0032f2c4 
I/DEBUG   ( 1323): 
I/DEBUG   ( 1323): code around r4:
I/DEBUG   ( 1323): 8145692c 00000000 81120fb1 81120fa5 00000000 
I/DEBUG   ( 1323): 8145693c 00000000 00000000 001ac744 00000000 
I/DEBUG   ( 1323): 8145694c 00000000 00000000 00000000 00000000 
I/DEBUG   ( 1323): 8145695c 00000000 00000000 00000000 00000000 
I/DEBUG   ( 1323): 8145696c 00000000 00000000 00000000 00000000 
I/DEBUG   ( 1323): 
I/DEBUG   ( 1323): code around r5:
I/DEBUG   ( 1323): 00000028 ffffffff ffffffff ffffffff ffffffff 
I/DEBUG   ( 1323): 00000038 ffffffff ffffffff ffffffff ffffffff 
I/DEBUG   ( 1323): 00000048 ffffffff ffffffff ffffffff ffffffff 
I/DEBUG   ( 1323): 00000058 ffffffff ffffffff ffffffff ffffffff 
I/DEBUG   ( 1323): 00000068 ffffffff ffffffff ffffffff ffffffff 
I/DEBUG   ( 1323): 
I/DEBUG   ( 1323): code around r6:
I/DEBUG   ( 1323): 
I/DEBUG   ( 1323): code around r7:
I/DEBUG   ( 1323): 
I/DEBUG   ( 1323): code around r8:
I/DEBUG   ( 1323): 80218220 e1a00000 e1a00000 e1a00000 e1a00000 
I/DEBUG   ( 1323): 80218230 e1a00000 e1a00000 e1a00000 e1a00000 
I/DEBUG   ( 1323): 80218240 e1f470b2 e207c0ff e088f30c e92d4ff0 
I/DEBUG   ( 1323): 80218250 e24dd004 e1a00000 e1a00000 e1a00000 
I/DEBUG   ( 1323): 80218260 e1a00000 e1a00000 e1a00000 e1a00000 
I/DEBUG   ( 1323): 
I/DEBUG   ( 1323): code around r9:
I/DEBUG   ( 1323): 0000cea8 00000000 00000000 00000000 00000000 
I/DEBUG   ( 1323): 0000ceb8 00000000 00000000 00000000 0000013b 
I/DEBUG   ( 1323): 0000cec8 00000001 00000008 00000000 00000000 
I/DEBUG   ( 1323): 0000ced8 afd4d4c0 000034cc 44290000 4428d300 
I/DEBUG   ( 1323): 0000cee8 00003000 00000000 4428fc18 00000000 
I/DEBUG   ( 1323): 
I/DEBUG   ( 1323): code around r10:
I/DEBUG   ( 1323): 4428fbe4 00000001 40531d50 4428fc34 448648d4 
I/DEBUG   ( 1323): 4428fbf4 442cb61c 4483d730 00000000 40531b88 
I/DEBUG   ( 1323): 4428fc04 4428fc34 4486492a 4438f718 0000d018 
I/DEBUG   ( 1323): 4428fc14 00000000 40531d30 40515df8 4428fc84 
I/DEBUG   ( 1323): 4428fc24 4486a58a 4438fb2c 4486492a 00000000 
I/DEBUG   ( 1323): 
I/DEBUG   ( 1323): stack:
I/DEBUG   ( 1323):     beebc3a8  00000040  
I/DEBUG   ( 1323):     beebc3ac  81395bcd  /mnt/asec/org.cocos2dx.admob-1/lib/libcocos2dcpp.so
I/DEBUG   ( 1323):     beebc3b0  81456944  
I/DEBUG   ( 1323):     beebc3b4  8144d000  
I/DEBUG   ( 1323):     beebc3b8  81456944  
I/DEBUG   ( 1323):     beebc3bc  81456944  
I/DEBUG   ( 1323):     beebc3c0  8144d000  
I/DEBUG   ( 1323):     beebc3c4  81456948  
I/DEBUG   ( 1323):     beebc3c8  00000000  
I/DEBUG   ( 1323):     beebc3cc  813676f9  /mnt/asec/org.cocos2dx.admob-1/lib/libcocos2dcpp.so
I/DEBUG   ( 1323):     beebc3d0  00000000  
I/DEBUG   ( 1323):     beebc3d4  8111dd07  /mnt/asec/org.cocos2dx.admob-1/lib/libcocos2dcpp.so
I/DEBUG   ( 1323):     beebc3d8  00000000  
I/DEBUG   ( 1323):     beebc3dc  00000000  
I/DEBUG   ( 1323):     beebc3e0  df002777  
I/DEBUG   ( 1323):     beebc3e4  e3a070ad  
I/DEBUG   ( 1323): #00 beebc3e8  81438898  
I/DEBUG   ( 1323):     beebc3ec  b00037f5  /system/bin/linker
I/DEBUG   ( 1323):     beebc3f0  b000e1cc  
I/DEBUG   ( 1323):     beebc3f4  b000e1c8  
I/DEBUG   ( 1323):     beebc3f8  00002751  
I/DEBUG   ( 1323):     beebc3fc  b00038a9  /system/bin/linker
I/DEBUG   ( 1323):     beebc400  00462000  
I/DEBUG   ( 1323):     beebc404  afd00000  /system/lib/libc.so
I/DEBUG   ( 1323):     beebc408  0000001d  
I/DEBUG   ( 1323):     beebc40c  b000e0e8  
I/DEBUG   ( 1323):     beebc410  8144b468  
I/DEBUG   ( 1323):     beebc414  b000e0e8  
I/DEBUG   ( 1323):     beebc418  00002751  
I/DEBUG   ( 1323):     beebc41c  b0004f93  /system/bin/linker
I/DEBUG   ( 1323):     beebc420  0000001d  
I/DEBUG   ( 1323):     beebc424  b000e174  
I/DEBUG   ( 1323):     beebc428  b000e0e8  
I/DEBUG   ( 1323):     beebc42c  00000008  
I/DEBUG   ( 1323):     beebc430  00000000  
I/DEBUG   ( 1323):     beebc434  802461c9  /system/lib/libdvm.so
I/DEBUG   ( 1323):     beebc438  beebc45c  
I/DEBUG   ( 1323):     beebc43c  b000e0f0  
I/DEBUG   ( 1323):     beebc440  00000000  
I/DEBUG   ( 1323):     beebc444  b000e0e8  
I/DEBUG   ( 1323):     beebc448  001ac690  
I/DEBUG   ( 1323):     beebc44c  001ac6b3  
I/DEBUG   ( 1323):     beebc450  40515df8  
I/DEBUG   ( 1323):     beebc454  b0004fdd  /system/bin/linker
I/DEBUG   ( 1323):     beebc458  b000e0e8  
I/DEBUG   ( 1323):     beebc45c  b0004af7  /system/bin/linker
I/DEBUG   ( 1323):     beebc460  001ac690  
I/DEBUG   ( 1323):     beebc464  beebc4c4  
I/DEBUG   ( 1323):     beebc468  001ac690  
I/DEBUG   ( 1323):     beebc46c  40515df8  

Out from

ndk-stack -sym ./obj/local/armeabi -dump LogFromLogcat.txt

is empty.

What am I doing wrong?


#2

Please include the header like this -

#include "PluginAdmob/PluginAdmob.h"

You could check your code against our sample here -
https://github.com/sdkbox/sdkbox-admob-sample

Best,
Pabitra


#3

I replace path because directory with name “PluginAdmob” does not exist in project folder.

If I specify the path from the documentation:

jni/../../Classes/AppDelegate.cpp:4:37: fatal error: PluginAdmob/PluginAdmob.h: No such file or directory
 #include "PluginAdmob/PluginAdmob.h"

#4

I am sorry, could you try these -

#include "PluginAdMob/PluginAdMob.h"

EDIT:

This would make you find the library.
but if still issues are coming up

you can run this command inside your project ROOT directory

sdkbox import admob --forcedownload

#5

No problem :smile:

  • Create new project
[19:23]teplik@lapa.tpl:/opt/cocos2d-x(git:v3.10)% cocos new admob -l cpp -d projects 
> Copy template into /home/opt/cocos2d-x/projects/admob
> Copying cocos2d-x files...
> Rename project name from 'HelloCpp' to 'admob'
> Replace the project name from 'HelloCpp' to 'admob'
> Replace the project package name from 'org.cocos2dx.hellocpp' to 'org.cocos2dx.admob'
> Replace the Mac bundle id from 'org.cocos2dx.hellocpp' to 'org.cocos2dx.admob'
> Replace the iOS bundle id from 'org.cocos2dx.hellocpp' to 'org.cocos2dx.admob'
  • Import admob
[19:23]teplik@lapa.tpl:/opt/cocos2d-x(git:v3.10)% cd ./projects/admob
[19:24]teplik@lapa.tpl:/opt/cocos2d-x/projects/admob(git:v3.10)% sdkbox import admob --forcedownload
  _______ ______  _     _ ______   _____  _     _
  |______ |     \ |____/  |_____] |     |  \___/ 
  ______| |_____/ |    \_ |_____] |_____| _/   \_
 Copyright (c) 2015 SDKBOX Inc. v1.0.0.9
 downloading package sdkbox-googleplayservices_v2.1.2.7.tar.gz
[###################################] 100%
 Installation Successful :)
 downloading package sdkbox-admob_v2.1.2.7.tar.gz
[###################################] 100%
 Please reference the online documentation to finish the integration:
http://sdkbox-doc.github.io/en/plugins/admob/v3-cpp/
 Installation Successful :)
  • Check requested include path
[19:26]teplik@lapa.tpl:/opt/cocos2d-x/projects/admob(git:v3.10)% head ./Classes/AppDelegate.cpp
#include "AppDelegate.h"
#include "HelloWorldScene.h"
#ifdef SDKBOX_ENABLED
#include "PluginAdMob/PluginAdMob.h"
#endif

USING_NS_CC;

static cocos2d::Size designResolutionSize = cocos2d::Size(480, 320);
static cocos2d::Size smallResolutionSize = cocos2d::Size(480, 320);
  • Compile project:
[19:26]teplik@lapa.tpl:/opt/cocos2d-x/projects/admob(git:v3.10)% cocos compile -p android
Building mode: debug
Using Eclipse project : /home/opt/cocos2d-x/projects/admob/proj.android
Android platform not specified, searching a default one...
running: '/opt/android-sdk-update-manager/tools/android update project -t android-19 -p /home/opt/cocos2d-x/projects/admob/proj.android'

Updated project.properties
Updated local.properties
Updated file /home/opt/cocos2d-x/projects/admob/proj.android/proguard-project.txt
Android platform not specified, searching a default one...
running: '/opt/android-sdk-update-manager/tools/android update lib-project -p /home/opt/cocos2d-x/projects/admob/cocos2d/cocos/platform/android/java -t android-10'

Updated project.properties
Updated local.properties
Updated file /home/opt/cocos2d-x/projects/admob/cocos2d/cocos/platform/android/java/proguard-project.txt
Android platform not specified, searching a default one...
running: '/opt/android-sdk-update-manager/tools/android update lib-project -p /home/opt/cocos2d-x/projects/admob/cocos2d/cocos/platform/android/java/libs/gps -t android-10'

Updated project.properties
Updated local.properties
Updated file /home/opt/cocos2d-x/projects/admob/cocos2d/cocos/platform/android/java/libs/gps/proguard-project.txt
Building native...
NDK build mode: debug
NDK_TOOLCHAIN_VERSION: 4.9
running: '/opt/android-ndk/ndk-build -C /home/opt/cocos2d-x/projects/admob/proj.android -j2 NDK_MODULE_PATH=/home/opt/cocos2d-x/projects/admob/proj.android/../cocos2d:/home/opt/cocos2d-x/projects/admob/proj.android/../cocos2d/cocos:/home/opt/cocos2d-x/projects/admob/proj.android/../cocos2d/external NDK_TOOLCHAIN_VERSION=4.9 NDK_DEBUG=1'

make: Entering directory `/home/opt/cocos2d-x/projects/admob/proj.android'
[armeabi] StaticLibrary  : libcocos2d.a
[armeabi] Compile++ thumb: cocostudio_static <= WidgetReader.cpp
[armeabi] Compile++ thumb: cocostudio_static <= FlatBuffersSerialize.cpp
[armeabi] Compile++ thumb: cocostudio_static <= WidgetCallBackHandlerProtocol.cpp
[armeabi] Compile++ thumb: cocostudio_static <= CCComExtensionData.cpp
[armeabi] Compile++ thumb: cocostudio_static <= CocoStudio.cpp
[armeabi] Compile++ thumb: cocos_ui_static <= UILayoutComponent.cpp
[armeabi] Compile++ thumb: cocos2dx_internal_static <= atitc.cpp
[armeabi] Compile++ thumb: cocos2dx_internal_static <= base64.cpp
[armeabi] Compile++ thumb: cocos2dx_internal_static <= ccCArray.cpp
[armeabi] Compile thumb  : cocos2dx_internal_static <= ccFPSImages.c
[armeabi] Compile++ thumb: cocos2dx_internal_static <= ccRandom.cpp
[armeabi] Compile++ thumb: cocos2dx_internal_static <= ccTypes.cpp
[armeabi] Compile++ thumb: cocos2dx_internal_static <= ccUTF8.cpp
[armeabi] Compile++ thumb: cocos2dx_internal_static <= ccUtils.cpp
[armeabi] Compile++ thumb: cocos2dx_internal_static <= etc1.cpp
[armeabi] Compile++ thumb: cocos2dx_internal_static <= pvr.cpp
[armeabi] Compile++ thumb: cocos2dx_internal_static <= s3tc.cpp
[armeabi] Gdbserver      : [arm-linux-androideabi-4.9] libs/armeabi/gdbserver
[armeabi] Gdbsetup       : libs/armeabi/gdb.setup
[armeabi] Compile++ thumb: cocos2dcpp_shared <= main.cpp
[armeabi] Compile++ thumb: cocos2dcpp_shared <= AppDelegate.cpp
jni/../../Classes/AppDelegate.cpp:4:37: fatal error: PluginAdMob/PluginAdMob.h: No such file or directory
 #include "PluginAdMob/PluginAdMob.h"
                                     ^
compilation terminated.
make: *** [obj/local/armeabi/objs-debug/cocos2dcpp_shared/__/__/Classes/AppDelegate.o] Error 1
make: *** Waiting for unfinished jobs....
make: Leaving directory `/home/opt/cocos2d-x/projects/admob/proj.android'
Error running command, return code: 2.

#6

Hey @chmyaf

I see the issue is something else.
Either with the setup or something.

I can create new projects and import sdkbox without any issue.

I guess there’s some issue with sdkbox setup.
please find the folder and delete it.

/Users/pabitra/.sdkbox/plugins/sdkbox-admob_v2.1.2.7

then go inside your project ROOT directory and run

sdkbox update

it should do a fresh download of the plugin
and hopefully that solves the issue.

make sure that your jni folder has contents like this -

Best,
Pabitra


#7
  • Clear plugin
[21:00]teplik@lapa.tpl:~% cd ./.sdkbox/plugins
[21:01]teplik@lapa.tpl:~/.sdkbox/plugins% ls -la
итого 0
drwxr-xr-x 4 teplik teplik 144 мар 28 19:25 .
drwxr-xr-x 6 teplik teplik 144 мар 27 16:49 ..
drwxr-xr-x 3 teplik teplik  72 мар 25 23:33 sdkbox-admob_v2.1.2.7
drwxr-xr-x 3 teplik teplik  72 мар 25 23:25 sdkbox-googleplayservices_v2.1.2.7
[21:01]teplik@lapa.tpl:~/.sdkbox/plugins% rm -Rf sdkbox-admob_v2.1.2.7
  • Updating sdkbox
[21:01]teplik@lapa.tpl:~/.sdkbox/plugins% cd /opt/cocos2d-x/projects/admob 
[21:01]teplik@lapa.tpl:/opt/cocos2d-x/projects/admob(git:v3.10)% sdkbox update
  _______ ______  _     _ ______   _____  _     _
  |______ |     \ |____/  |_____] |     |  \___/ 
  ______| |_____/ |    \_ |_____] |_____| _/   \_
 Copyright (c) 2015 SDKBOX Inc. v1.0.0.9
 downloading package sdkbox-admob_v2.1.2.7.tar.gz
[###################################] 100%
 2.1.2.7 2.1.2.7
 2.1.2.7 2.1.2.7
 all packages are up to date.
  • Check directory:
[21:02]teplik@lapa.tpl:/opt/cocos2d-x/projects/admob(git:v3.10)% ls ./proj.android/jni 
Android.mk  Application.mk  hellocpp  pluginadmob  sdkbox
  • Recompile
[21:03]teplik@lapa.tpl:/opt/cocos2d-x/projects/admob(git:v3.10)% cocos compile -p android
Building mode: debug
Using Eclipse project : /home/opt/cocos2d-x/projects/admob/proj.android
Android platform not specified, searching a default one...
running: '/opt/android-sdk-update-manager/tools/android update project -t android-19 -p /home/opt/cocos2d-x/projects/admob/proj.android'

Updated project.properties
Updated local.properties
Updated file /home/opt/cocos2d-x/projects/admob/proj.android/proguard-project.txt
Android platform not specified, searching a default one...
running: '/opt/android-sdk-update-manager/tools/android update lib-project -p /home/opt/cocos2d-x/projects/admob/cocos2d/cocos/platform/android/java -t android-10'

Updated project.properties
Updated local.properties
Updated file /home/opt/cocos2d-x/projects/admob/cocos2d/cocos/platform/android/java/proguard-project.txt
Android platform not specified, searching a default one...
running: '/opt/android-sdk-update-manager/tools/android update lib-project -p /home/opt/cocos2d-x/projects/admob/cocos2d/cocos/platform/android/java/libs/gps -t android-10'

Updated project.properties
Updated local.properties
Updated file /home/opt/cocos2d-x/projects/admob/cocos2d/cocos/platform/android/java/libs/gps/proguard-project.txt
Building native...
NDK build mode: debug
NDK_TOOLCHAIN_VERSION: 4.9
running: '/opt/android-ndk/ndk-build -C /home/opt/cocos2d-x/projects/admob/proj.android -j2 NDK_MODULE_PATH=/home/opt/cocos2d-x/projects/admob/proj.android/../cocos2d:/home/opt/cocos2d-x/projects/admob/proj.android/../cocos2d/cocos:/home/opt/cocos2d-x/projects/admob/proj.android/../cocos2d/external NDK_TOOLCHAIN_VERSION=4.9 NDK_DEBUG=1'

make: Entering directory `/home/opt/cocos2d-x/projects/admob/proj.android'
[armeabi] Compile++ thumb: cocos2dcpp_shared <= AppDelegate.cpp
[armeabi] Compile++ thumb: cocos2dcpp_shared <= HelloWorldScene.cpp
jni/../../Classes/AppDelegate.cpp:4:37: fatal error: PluginAdMob/PluginAdMob.h: No such file or directory
 #include "PluginAdMob/PluginAdMob.h"
                                     ^
compilation terminated.
make: *** [obj/local/armeabi/objs-debug/cocos2dcpp_shared/__/__/Classes/AppDelegate.o] Error 1
make: *** Waiting for unfinished jobs....
make: Leaving directory `/home/opt/cocos2d-x/projects/admob/proj.android'
Error running command, return code: 2.

Imho, including error may be due to case-sensitive file system:

These are different directories:

PluginAdMob

and

pluginadmob

I tried to specify the path to the directory in lowercase:

#include "pluginadmob/PluginAdMob.h"

Compile was successful, but on running i received error from first message.

After that I canceled my changes and renamed the directory in proj.android/jni from pluginadmob to PluginAdMob.
Also I fixed the library path in the file proj.android/jni/sdkbox/Android.mk:
replace

$(call import-module, ./pluginadmob)

on to

$(call import-module, ./PluginAdMob)

After compiling again got the result from the first message


#8

@nite could you help here please.


#9

Looks like your system is case sensitive, I think your Android.mk change should work.


#10

I tried to build on Windows and got the same result: the app is going, but doesn’t work on Android 2.3.6. However, works on Android 4+.
Edit:
going == builded
sorry for my English with translator:)


#11

could you please tell us what exactly happens with android 2.3.6 !!
logs for your issue.

because it’s hard for me to get an android 2.3 device this time.

Best,
Pabitra


#12

On touch by application icon:

  • one phone vibration

  • in log:

I/InputReader( 1515): dispatchTouch::touch event's action is 0
I/InputDispatcher( 1515): Delivering touch to current input target
I/InputReader( 1515): dispatchTouch::touch event's action is 1
I/InputDispatcher( 1515): Delivering touch to current input target
I/Launcher( 1603): onPause()
D/SurfaceFlinger( 1515): Layer[57aec0]:: Tile format buffer w[256] h[320] f[4] v[0x4a8b5000] p[0x946a1000] sz[163840]
I/WindowManager( 1515): Setting rotation to 1, animFlags=1
I/ActivityManager( 1515): Config changed: { scale=1.0 loc=ru_RU touch=3 K-board=1/1/2 nav=1/1 orien=2 layout=17 uiMode=17 seq=60}
I/Launcher( 1603): onWindowFocusChanged(false)
D/Launcher( 1603): setWallpaperDimension() called
I/WallpaperService( 1515): getWallpaperInfo = null
D/SurfaceFlinger( 1515): Layer[1fd2b8]:: Tile format buffer w[320] h[288] f[1] v[0x4a406000] p[0x9449a000] sz[368640]
D/SurfaceFlinger( 1515): Layer[2169d8] [38] non-RGB565 reloads
D/SurfaceFlinger( 1515): Layer[2169d8]:: Tile format buffer w[320] h[32] f[1] v[0x47622000] p[0x97ff6000] sz[40960]
E/ClockWidget( 1849): clock_bg portrait
E/ClockWidget( 1849): drawDayText
E/ClockWidget( 1849): width= 50
E/ClockWidget( 1849): widthText= 63.0
E/ClockWidget( 1849): RIGHT
D/SurfaceFlinger( 1515): Layer[1fd2b8]:: Tile format buffer w[320] h[224] f[1] v[0x4964a000] p[0x9449a000] sz[286720]
D/dalvikvm(18557): Trying to load lib /mnt/asec/org.cocos2dx.admob-1/lib/libcocos2dcpp.so 0x40516390
D/dalvikvm( 1603): GC_EXTERNAL_ALLOC freed 909K, 50% free 3464K/6919K, external 2523K/2525K, paused 119ms
I/DEBUG   ( 1323): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
D/SurfaceFlinger( 1515): Layer[2169d8] [2] non-RGB565 reloads
E/ClockWidget( 1849): clock_bg portrait
E/ClockWidget( 1849): drawDayText
E/ClockWidget( 1849): width= 50
E/ClockWidget( 1849): widthText= 63.0
E/ClockWidget( 1849): RIGHT
I/DEBUG   ( 1323): Build fingerprint: 'samsung/GT-S6102/GT-S6102:2.3.6/GINGERBREAD/XXMA1:user/release-keys'
I/DEBUG   ( 1323): pid: 18557, tid: 18557  >>> org.cocos2dx.admob <<<
I/DEBUG   ( 1323): signal 4 (SIGILL), code 1 (ILL_ILLOPC), fault addr 81388252
I/DEBUG   ( 1323):  r0 81a3aa8c  r1 8138d269  r2 81a31000  r3 81388239
I/DEBUG   ( 1323):  r4 81a3aa8c  r5 00000048  r6 00000004  r7 00000000
I/DEBUG   ( 1323):  r8 80218240  r9 0000cec8  10 4428fc04  fp beebc7d0
I/DEBUG   ( 1323):  ip 80900000  sp beebc3e8  lr 81388247  pc 81388252  cpsr 40000030
I/DEBUG   ( 1323):  d0  3f8000003f800000  d1  3ff0000040000000
I/DEBUG   ( 1323):  d2  4d86c52c424d3647  d3  00540ff04a2c8180
I/DEBUG   ( 1323):  d4  3fbc71c7002b2060  d5  3fcef049fb9094d1
I/DEBUG   ( 1323):  d6  401c000000000000  d7  0000000000000000
I/DEBUG   ( 1323):  d8  0000000000000000  d9  0000000000000000
I/DEBUG   ( 1323):  d10 0000000000000000  d11 0000000000000000
I/DEBUG   ( 1323):  d12 0000000000000000  d13 0000000000000000
I/DEBUG   ( 1323):  d14 0000000000000000  d15 0000000000000000
I/DEBUG   ( 1323):  scr 60000010
I/DEBUG   ( 1323): 
I/DEBUG   ( 1323):          #00  pc 00388252  /mnt/asec/org.cocos2dx.admob-1/lib/libcocos2dcpp.so
I/DEBUG   ( 1323):          #01  lr 81388247  /mnt/asec/org.cocos2dx.admob-1/lib/libcocos2dcpp.so
I/DEBUG   ( 1323): 
I/DEBUG   ( 1323): code around pc:
I/DEBUG   ( 1323): 81388230 00596051 006a723a 4c08b510 6824447c 
I/DEBUG   ( 1323): 81388240 f0044620 4906ffdb 46204a06 68094479 
I/DEBUG   ( 1323): 81388250 e8bd447a f14d4010 bf00b42b 006a7218 
I/DEBUG   ( 1323): 81388260 006a720c 006a8dac 4c08b510 3448447c 
I/DEBUG   ( 1323): 81388270 f1514620 4906f065 46204a06 68094479 
I/DEBUG   ( 1323): 
I/DEBUG   ( 1323): code around lr:
I/DEBUG   ( 1323): 81388224 006b2896 006a8e0e 006a722c 00596051 
I/DEBUG   ( 1323): 81388234 006a723a 4c08b510 6824447c f0044620 
I/DEBUG   ( 1323): 81388244 4906ffdb 46204a06 68094479 e8bd447a 
I/DEBUG   ( 1323): 81388254 f14d4010 bf00b42b 006a7218 006a720c 
I/DEBUG   ( 1323): 81388264 006a8dac 4c08b510 3448447c f1514620 
I/DEBUG   ( 1323): 
I/DEBUG   ( 1323): code around r0:
I/DEBUG   ( 1323): 81a3aa6c 00000000 8138c5c5 8138c5b9 00000000 
I/DEBUG   ( 1323): 81a3aa7c 00000000 00000000 00000000 00000000 
I/DEBUG   ( 1323): 81a3aa8c 00000000 00000000 00000000 00000000 
I/DEBUG   ( 1323): 81a3aa9c 00000000 00000000 00000000 00000000 
I/DEBUG   ( 1323): 81a3aaac 00000000 00000000 00000000 00000000 
I/DEBUG   ( 1323): 
I/DEBUG   ( 1323): code around r1:
I/DEBUG   ( 1323): 8138d248 68404770 e8804770 47700006 4604b510 
I/DEBUG   ( 1323): 8138d258 b1086800 eb2af7f6 60232300 bd106063 
I/DEBUG   ( 1323): 8138d268 4604b510 fff2f7ff bd104620 4614b570 
I/DEBUG   ( 1323): 8138d278 460d4606 ffeaf7ff dd0b2c00 6074b155 
I/DEBUG   ( 1323): 8138d288 f7f64620 4629eb1a 60304622 4070e8bd 
I/DEBUG   ( 1323): 
I/DEBUG   ( 1323): code around r2:
I/DEBUG   ( 1323): 81a30fe0 afd211c9 afd20815 afd187d5 afd19fc9 
I/DEBUG   ( 1323): 81a30ff0 afd0b810 afd0c670 afd17d11 afd11e41 
I/DEBUG   ( 1323): 81a31000 00000000 ffffffff 81921900 81921918 
I/DEBUG   ( 1323): 81a31010 813aaf08 81921928 81921938 813aaffc 
I/DEBUG   ( 1323): 81a31020 ffffffff ffffffff 3f800000 00000020 
I/DEBUG   ( 1323): 
I/DEBUG   ( 1323): code around r3:
I/DEBUG   ( 1323): 81388218 f14d6809 b002f449 bf00bd70 006b2896 
I/DEBUG   ( 1323): 81388228 006a8e0e 006a722c 00596051 006a723a 
I/DEBUG   ( 1323): 81388238 4c08b510 6824447c f0044620 4906ffdb 
I/DEBUG   ( 1323): 81388248 46204a06 68094479 e8bd447a f14d4010 
I/DEBUG   ( 1323): 81388258 bf00b42b 006a7218 006a720c 006a8dac 
I/DEBUG   ( 1323): 
I/DEBUG   ( 1323): code around r4:
I/DEBUG   ( 1323): 81a3aa6c 00000000 8138c5c5 8138c5b9 00000000 
I/DEBUG   ( 1323): 81a3aa7c 00000000 00000000 00000000 00000000 
I/DEBUG   ( 1323): 81a3aa8c 00000000 00000000 00000000 00000000 
I/DEBUG   ( 1323): 81a3aa9c 00000000 00000000 00000000 00000000 
I/DEBUG   ( 1323): 81a3aaac 00000000 00000000 00000000 00000000 
I/DEBUG   ( 1323): 
I/DEBUG   ( 1323): code around r5:
I/DEBUG   ( 1323): 00000028 ffffffff ffffffff ffffffff ffffffff 
I/DEBUG   ( 1323): 00000038 ffffffff ffffffff ffffffff ffffffff 
I/DEBUG   ( 1323): 00000048 ffffffff ffffffff ffffffff ffffffff 
I/DEBUG   ( 1323): 00000058 ffffffff ffffffff ffffffff ffffffff 
I/DEBUG   ( 1323): 00000068 ffffffff ffffffff ffffffff ffffffff 
I/DEBUG   ( 1323): 
I/DEBUG   ( 1323): code around r6:
I/DEBUG   ( 1323): 
I/DEBUG   ( 1323): code around r7:
I/DEBUG   ( 1323): 
I/DEBUG   ( 1323): code around r8:
I/DEBUG   ( 1323): 80218220 e1a00000 e1a00000 e1a00000 e1a00000 
I/DEBUG   ( 1323): 80218230 e1a00000 e1a00000 e1a00000 e1a00000 
I/DEBUG   ( 1323): 80218240 e1f470b2 e207c0ff e088f30c e92d4ff0 
I/DEBUG   ( 1323): 80218250 e24dd004 e1a00000 e1a00000 e1a00000 
I/DEBUG   ( 1323): 80218260 e1a00000 e1a00000 e1a00000 e1a00000 
I/DEBUG   ( 1323): 
I/DEBUG   ( 1323): code around r9:
I/DEBUG   ( 1323): 0000cea8 00000000 00000000 00000000 00000000 
I/DEBUG   ( 1323): 0000ceb8 00000000 00000000 00000000 0000013b 
I/DEBUG   ( 1323): 0000cec8 00000001 00000008 00000000 00000000 
I/DEBUG   ( 1323): 0000ced8 afd4d4c0 0000487d 44290000 4428d300 
I/DEBUG   ( 1323): 0000cee8 00003000 00000000 4428fc18 00000000 
I/DEBUG   ( 1323): 
I/DEBUG   ( 1323): code around r10:
I/DEBUG   ( 1323): 4428fbe4 00000001 405323e8 4428fc34 448648d4 
I/DEBUG   ( 1323): 4428fbf4 442cb61c 4483d730 00000000 40532220 
I/DEBUG   ( 1323): 4428fc04 4428fc34 4486492a 4438f718 0000d018 
I/DEBUG   ( 1323): 4428fc14 00000000 405323c8 40516390 4428fc84 
I/DEBUG   ( 1323): 4428fc24 4486a58a 4438fb2c 4486492a 00000000 
I/DEBUG   ( 1323): 
I/DEBUG   ( 1323): stack:
I/DEBUG   ( 1323):     beebc3a8  00000015  
I/DEBUG   ( 1323):     beebc3ac  8108d698  /mnt/asec/org.cocos2dx.admob-1/lib/libcocos2dcpp.so
I/DEBUG   ( 1323):     beebc3b0  b000e174  
I/DEBUG   ( 1323):     beebc3b4  b0003c4d  /system/bin/linker
I/DEBUG   ( 1323):     beebc3b8  3f000000  
I/DEBUG   ( 1323):     beebc3bc  3f000000  
I/DEBUG   ( 1323):     beebc3c0  3dcccccd  
I/DEBUG   ( 1323):     beebc3c4  81a3aa4c  
I/DEBUG   ( 1323):     beebc3c8  b000e318  
I/DEBUG   ( 1323):     beebc3cc  beebc3e4  
I/DEBUG   ( 1323):     beebc3d0  0000ffff  
I/DEBUG   ( 1323):     beebc3d4  00000001  
I/DEBUG   ( 1323):     beebc3d8  81a3aa80  
I/DEBUG   ( 1323):     beebc3dc  818d9849  /mnt/asec/org.cocos2dx.admob-1/lib/libcocos2dcpp.so
I/DEBUG   ( 1323):     beebc3e0  df002777  
I/DEBUG   ( 1323):     beebc3e4  e3a070ad  
I/DEBUG   ( 1323): #00 beebc3e8  81a1c930  
I/DEBUG   ( 1323):     beebc3ec  b00037f5  /system/bin/linker
I/DEBUG   ( 1323):     beebc3f0  b000e1cc  
I/DEBUG   ( 1323):     beebc3f4  b000e1c8  
I/DEBUG   ( 1323):     beebc3f8  00002751  
I/DEBUG   ( 1323):     beebc3fc  b00038a9  /system/bin/linker
I/DEBUG   ( 1323):     beebc400  00a45000  
I/DEBUG   ( 1323):     beebc404  afd00000  /system/lib/libc.so
I/DEBUG   ( 1323):     beebc408  00000020  
I/DEBUG   ( 1323):     beebc40c  b000e0e8  
I/DEBUG   ( 1323):     beebc410  81a2f3a0  
I/DEBUG   ( 1323):     beebc414  b000e0e8  
I/DEBUG   ( 1323):     beebc418  00002751  
I/DEBUG   ( 1323):     beebc41c  b0004f93  /system/bin/linker
I/DEBUG   ( 1323):     beebc420  00000020  
I/DEBUG   ( 1323):     beebc424  b000e174  
I/DEBUG   ( 1323):     beebc428  b000e0e8  
I/DEBUG   ( 1323):     beebc42c  00000008  
I/DEBUG   ( 1323):     beebc430  00000000  
I/DEBUG   ( 1323):     beebc434  802461c9  /system/lib/libdvm.so
I/DEBUG   ( 1323):     beebc438  beebc45c  
I/DEBUG   ( 1323):     beebc43c  b000e0f0  
I/DEBUG   ( 1323):     beebc440  00000000  
I/DEBUG   ( 1323):     beebc444  b000e0e8  
I/DEBUG   ( 1323):     beebc448  001af240  
I/DEBUG   ( 1323):     beebc44c  001af263  
I/DEBUG   ( 1323):     beebc450  40516390  
I/DEBUG   ( 1323):     beebc454  b0004fdd  /system/bin/linker
I/DEBUG   ( 1323):     beebc458  b000e0e8  
I/DEBUG   ( 1323):     beebc45c  b0004af7  /system/bin/linker
I/DEBUG   ( 1323):     beebc460  001af240  
I/DEBUG   ( 1323):     beebc464  beebc4c4  
I/DEBUG   ( 1323):     beebc468  001af240  
I/DEBUG   ( 1323):     beebc46c  40516390  
D/BatteryService( 1515): update start
I/BootReceiver( 1515): Copying /data/tombstones/tombstone_05 to DropBox (SYSTEM_TOMBSTONE)
D/dalvikvm( 1515): GC_FOR_MALLOC freed 401K, 40% free 6697K/11143K, external 3213K/3853K, paused 105ms
D/dalvikvm( 1515): GC_FOR_MALLOC freed 1K, 41% free 6763K/11271K, external 3213K/3853K, paused 392ms
D/dalvikvm( 1515): GC_FOR_MALLOC freed 213K, 42% free 6549K/11271K, external 1733K/2245K, paused 76ms
  • black screen (~0.5–1sec)

  • two phone vibration

  • in log:

D/StatusBarDsUiControl( 1578): setNoSimIcon
W/WindowManager( 1515): App freeze timeout expired.
D/SurfaceFlinger( 1515): Layer[57aec0]:: Tile format buffer w[320] h[256] f[4] v[0x4a430000] p[0x94564000] sz[163840]
W/WindowManager( 1515): Force clearing freeze: AppWindowToken{409fa000 token=HistoryRecord{4052b2d0 org.cocos2dx.admob/org.cocos2dx.cpp.AppActivity}}
D/BatteryService( 1515): update start
W/PowerManagerService( 1515): Timer 0x3->0x3|0x1
D/dalvikvm( 1515): GC_EXPLICIT freed 356K, 44% free 6423K/11271K, external 1733K/2245K, paused 183ms
D/StatusBarDsUiControl( 1578): setNoSimIcon
D/VoldCmdListener( 1321): CommandListener::AsecCmd::runCommand -> org.cocos2dx.admob-1 
I/DEBUG   ( 1323): gotoUploadUserFault called
E/liblog  ( 1323): failed to call dumpstate
I/WindowManager( 1515): Setting rotation to 0, animFlags=1
D/Zygote  ( 1326): Process 18557 terminated by signal (4)
I/ActivityManager( 1515): Config changed: { scale=1.0 loc=ru_RU touch=3 K-board=1/1/2 nav=1/1 orien=1 layout=17 uiMode=17 seq=61}
D/SurfaceFlinger( 1515): Layer[1fd2b8] [2] non-RGB565 reloads
D/SurfaceFlinger( 1515): Layer[1fd2b8]:: Tile format buffer w[256] h[224] f[1] v[0x4964a000] p[0x9449a000] sz[229376]
D/SurfaceFlinger( 1515): Layer[2169d8]:: Tile format buffer w[256] h[32] f[1] v[0x47620000] p[0x97ff8000] sz[32768]
E/ClockWidget( 1849): clock_bg portrait
E/ClockWidget( 1849): drawDayText
E/ClockWidget( 1849): width= 50
E/ClockWidget( 1849): widthText= 63.0
E/ClockWidget( 1849): RIGHT
I/Launcher( 1603): onWindowFocusChanged(true)
D/Launcher( 1603): setWallpaperDimension() called
I/Launcher( 1603): updateWindowTransparency->  WallpaperManager wp:android.app.WallpaperManager@40554398
I/Launcher( 1603): updateWindowTransparency->  WallpaperInfo wi:null
E/Launcher( 1603): setWindowOpaque()
D/Launcher( 1603): mWallpaperCanvasView.setVisibility - Start
D/Launcher( 1603): mWallpaperCanvasView.setVisibility - End
W/WallpaperManager( 1603): peekWallpaperBitmap->mDefaultWallpaperandroid.graphics.Bitmap@4055b618
I/WallpaperService( 1515): getWallpaperInfo = null
I/WallpaperService( 1515): getWallpaperInfo = null
D/Launcher( 1603): usingLiveWallpaper ELSE part
D/SurfaceFlinger( 1515): Layer[1fd2b8]:: Tile format buffer w[256] h[288] f[1] v[0x4964a000] p[0x9449a000] sz[294912]
W/InputManagerService( 1515): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@40529eb8
D/ProgramMonitor( 2193):  onReceive -no
D/ProgramMonitor( 2193): appWidgetIds.length : 1
D/ProgramMonitor( 2193):  onReceive - action:com.sec.android.app.controlpanel.RUNNING_PROGRAM_REQ
I/Launcher( 1603): updateWindowTransparency->  WallpaperManager wp:android.app.WallpaperManager@40554398
I/Launcher( 1603): updateWindowTransparency->  WallpaperInfo wi:null
E/Launcher( 1603): setWindowOpaque()
D/Launcher( 1603): mWallpaperCanvasView.setVisibility - Start
D/Launcher( 1603): mWallpaperCanvasView.setVisibility - End
W/WallpaperManager( 1603): peekWallpaperBitmap->mDefaultWallpaperandroid.graphics.Bitmap@4055b618
I/WallpaperService( 1515): getWallpaperInfo = null
D/Launcher( 1603): usingLiveWallpaper ELSE part
D/ClockWidget( 1849): onReceive : ACTION_HOME_RESUME is called!!
I/Launcher( 1603): onResume() ended
D/SurfaceFlinger( 1515): Layer[2a2828]:: Tile format buffer w[256] h[320] f[4] v[0x4a48f000] p[0x9450b000] sz[163840]
D/ProgramMonitor( 2193):  onReceive - action:com.sec.android.app.controlpanel.RUNNING_PROGRAM_ACK
D/ProgramMonitor( 2193): updateNumberText
D/ProgramMonitor( 2193): updateWidget
D/ProgramMonitor( 2193): updateWidget - appWidgetIds == null -->> resetting
D/dalvikvm( 2262): GC_CONCURRENT freed 428K, 47% free 3338K/6215K, external 551K/1031K, paused 3ms+4ms
D/BatteryService( 1515): update start
  • on screen: applications list

#13

Hi, were you able to fix this issue? I am trying with latest cocos2d-x version, 3.17.1 and having the same error:
fatal error: PluginAdmob/PluginAdmob.h: No such file or directory #include “PluginAdmob/PluginAdmob.h”

Any help is much appreciated.


#14

cpp3171/proj.android/gradle.properties

plz PROP_BUILD_TYPE=cmake to PROP_BUILD_TYPE=ndk-build .

and

support cmake version will release this week.