Hello, I’m trying to build an admob extension to test how ads work. I use defold recommended one https://github.com/defold/extension-admob
The code itself is very simple, I copied initialization and “admob_callback” callback from the example in the documentation. I also added two buttons, one loads the rewarded video on click, the other one shows it.
I also added required fields in the game_project (app_id_ios, app_id_android) + url to the library and fetched libraries
When I try to bundle the application for android I get the following error:
/extension-admob/src/admob_android.cpp
Line 3: 'dmsdk/dlib/android.h' file not found
#include <dmsdk/dlib/android.h>
^~~~~~~~~~~~~~~~~~~~~~
And a few warnings
/extension-admob/src/admob.cpp
Line 5: 'DLIB_LOG_DOMAIN' macro redefined [-Wmacro-redefined]
#define DLIB_LOG_DOMAIN LIB_NAME
^
Line 5: previous definition is here
#define DLIB_LOG_DOMAIN "ADMOBEXT"
^
Line 36: format string is not a string literal (potentially insecure) [-Wformat-security]
luaL_error(L, msg);
^~~
Line 36: treat the string as an argument to avoid this
luaL_error(L, msg);
^
"%s",
Line 57: format string is not a string literal (potentially insecure) [-Wformat-security]
luaL_error(L, msg);
^~~
Line 57: treat the string as an argument to avoid this
luaL_error(L, msg);
^
"%s",
Line 78: format string is not a string literal (potentially insecure) [-Wformat-security]
luaL_error(L, msg);
^~~
Line 78: treat the string as an argument to avoid this
luaL_error(L, msg);
^
"%s",
And “info” from unknown source
warning: [options] bootstrap class path not set in conjunction with -source 8
Note: /tmp/job17318447802578078829/upload/extension-admob/src/java/com/defold/admob/AdmobJNI.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Can someone help me? I tried a few things but I don’t understand what I’m doing wrong.