IL2CPP Scripting Backend ARM64 Error - Unity 2019.1.0f2 Google mobile sdk native ads unity

1,199 views
Skip to first unread message

Adnan Ahmed

unread,
Oct 22, 2019, 12:57:37 AM10/22/19
to Google Mobile Ads SDK Developers
i have downloaded google mobile ads Sdk for native ads from here (NATIVE ADS BUILD Unity pakage-which support native ads)

https://developers.google.com/admob/unity/native-advanced-unified

Then i am integrating in Unity 2019.1.0f2 (64-bit). Setup everything it work fine on Mono but when i change to 64-bit build for final uploading
During building apk Unity Stucks on Building native binary with IL2CP...

After that Unity Gives this Error

Failed running C:\Program Files\Unity\Editor\Data\il2cpp/build/il2cpp.exe --convert-to-cpp --emit-null-checks --enable-array-bounds-check --dotnetprofile="unityaot" --compile-cpp --libil2cpp-static --platform="Android" --architecture="ARMv7" --configuration="Release" --outputpath="F:\RaceAwardWin\Temp\StagingArea\assets\bin\Data\Native\armeabi-v7a\libil2cpp.so" --cachedirectory="F:\RaceAwardWin\Assets..\Library\il2cpp_android_armeabi-v7a/il2cpp_cache" --additional-include-directories="C:\Program Files\Unity\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\bdwgc/include" --additional-include-directories="C:\Program Files\Unity\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\libil2cpp/include" --tool-chain-path="F:/android-ndk-r16b-windows-x86_64/android-ndk-r16b" --profiler-report --map-file-parser="C:/Program Files/Unity/Editor/Data/Tools/MapFileParser/MapFileParser.exe" --directory=F:/RaceAwardWin/Temp/StagingArea/assets/bin/Data/Managed --generatedcppdir=F:/RaceAwardWin/Temp/StagingArea/Il2Cpp/il2cppOutput

stdout:

Building libil2cpp.so with AndroidToolChain

Output directory: F:\RaceAwardWin\Temp\StagingArea\assets\bin\Data\Native\armeabi-v7a

Cache directory: F:\RaceAwardWin\Library\il2cpp_android_armeabi-v7a\il2cpp_cache

ObjectFiles: 235 of which compiled: 219

Time Compile: 25560 milliseconds Il2CppAttributes.cpp

Time Compile: 17582 milliseconds Il2CppCompilerCalculateTypeValues1.cpp

Time Compile: 15864 milliseconds Il2CppTypeDefinitions.c

Time Compile: 15672 milliseconds Il2CppMetadataUsage.c

Time Compile: 14089 milliseconds Assembly-CSharp3.cpp

Time Compile: 10597 milliseconds ProBuilderCore-Unity5.cpp

Time Compile: 9720 milliseconds Il2CppInvokerTable.cpp

Time Compile: 5484 milliseconds Generics18.cpp

Time Compile: 5444 milliseconds ProBuilderCore-Unity51.cpp

Time Compile: 5388 milliseconds mscorlib3.cpp

Total compilation time: 151626 milliseconds.

il2cpp.exe didn't catch exception: Unity.IL2CPP.Building.BuilderFailedException: F:\android-ndk-r16b-windows-x86_64\android-ndk-r16b\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++ @"C:\Users\Miczon LLP\AppData\Local\Temp\tmpEC90.tmp" -o "F:\RaceAwardWin\Library\il2cpp_android_armeabi-v7a\il2cpp_cache\linkresult_F69D8FD532EC526F74AA591119FF6C7F\libil2cpp.so" -shared -Wl,-soname,libil2cpp.so -Wl,--no-undefined -Wl,-z,noexecstack -Wl,--gc-sections -Wl,--build-id --sysroot "F:\android-ndk-r16b-windows-x86_64\android-ndk-r16b\platforms\android-16\arch-arm" -gcc-toolchain "F:\android-ndk-r16b-windows-x86_64\android-ndk-r16b\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64" -target armv7-none-linux-androideabi -Wl,--wrap,sigaction -L "F:\android-ndk-r16b-windows-x86_64\android-ndk-r16b\sources\cxx-stl\gnu-libstdc++\4.9\libs\armeabi-v7a" -lgnustl_static -llog -rdynamic -fuse-ld=gold.exe

F:\RaceAwardWin\Temp\StagingArea\Il2Cpp\il2cppOutput/GoogleMobileAds2.cpp:14500: error: undefined reference to 'GADURelease'

F:\RaceAwardWin\Temp\StagingArea\Il2Cpp\il2cppOutput/GoogleMobileAds2.cpp:14500: error: undefined reference to 'GADURelease'

F:\RaceAwardWin\Temp\StagingArea\Il2Cpp\il2cppOutput/GoogleMobileAds2.cpp:15023: error: undefined reference to 'GADUCreateRewardedAd'

F:\RaceAwardWin\Temp\StagingArea\Il2Cpp\il2cppOutput/GoogleMobileAds2.cpp:14500: error: undefined reference to 'GADURelease'

F:\RaceAwardWin\Temp\StagingArea\Il2Cpp\il2cppOutput/GoogleMobileAds2.cpp:15023: error: undefined reference to 'GADUCreateRewardedAd'

F:\RaceAwardWin\Temp\StagingArea\Il2Cpp\il2cppOutput/GoogleMobileAds2.cpp:15101: error: undefined reference to 'GADUSetRewardedAdCallbacks'

F:\RaceAwardWin\Temp\StagingArea\Il2Cpp\il2cppOutput/GoogleMobileAds2.cpp:15065: error: undefined reference to 'GADURequestRewardedAd'

F:\RaceAwardWin\Temp\StagingArea\Il2Cpp\il2cppOutput/GoogleMobileAds2.cpp:14500: error: undefined reference to 'GADURelease'

F:\RaceAwardWin\Temp\StagingArea\Il2Cpp\il2cppOutput/GoogleMobileAds2.cpp:14302: error: undefined reference to 'GADUCreateRequest'

F:\RaceAwardWin\Temp\StagingArea\Il2Cpp\il2cppOutput/GoogleMobileAds2.cpp:14400: error: undefined reference to 'GADUAddKeyword'

F:\RaceAwardWin\Temp\StagingArea\Il2Cpp\il2cppOutput/GoogleMobileAds2.cpp:14380: error: undefined reference to 'GADUAddTestDevice'

F:\RaceAwardWin\Temp\StagingArea\Il2Cpp\il2cppOutput/GoogleMobileAds2.cpp:14428: error: undefined

Unity Generates some files in Temp. GoogleMobileAds2 file. i dnt knw why it is generating this file on runtime

i dont have any IOS file in my project, i already tried with different versions of unity and try every thing which mention on different forums. but my problem does not solved.
please help in this matter

Mobile Ads SDK Forum Advisor Prod

unread,
Oct 22, 2019, 4:52:00 AM10/22/19
to adnan...@gmail.com, google-adm...@googlegroups.com

Hi Adnan,

Thank you for reaching out to us, and for giving us an extensive rundown of your concerns.

I tried building our sample project using the native ads version of the AdMob SDK on Unity 2019.1.0f2, and can confirm that I was able to build the APK successfully. Kindly see attached screenshot for the Project Settings used.

With this in mind, could you kindly send a copy of your sample project with the issue reproduced (via Reply privately to author) so that I can investigate this issue further?

Regards,
Ziv Yves Sanchez
Mobile Ads SDK Team



ref:_00D1U1174p._5001UKO3EO:ref
build_settings.png

Adnan Ahmed

unread,
Oct 22, 2019, 9:25:17 AM10/22/19
to Google Mobile Ads SDK Developers
Actually you are right, in empty projects its working fine here as well (Mono, IL2CP 64-bit). But in main projects of game where i have implemented all things its not working its give error which i have mention above


error: undefined reference to 'GADURelease' 
  error: undefined reference to 'GADURequestRewardedAd' 

i dont know why its generating these error ?


F:\RaceAwardWin\Temp\StagingArea\Il2Cpp\il2cppOutput/GoogleMobileAds2.cpp:14500: error: undefined reference to 'GADURelease'  

F:\RaceAwardWin\Temp\StagingArea\Il2Cpp\il2cppOutput/GoogleMobileAds2.cpp:15023: error: undefined reference to 'GADUCreateRewardedAd'  

GoogleMobileAds2.cpp file is generating in my temp folder, error which i have mention give error for this .cpp file. i cant edit this file because every time it generate new GoogleMobileAds2.cpp file. On actuall it generate 3 file in temp folder (i.e  GoogleMobileAds.cpp , GoogleMobileAds1.cpp, GoogleMobileAds2.cpp). i spend 1 week in this problem. kindly see attached file GoogleMobileAds2.cpp for further process. please help me.


please help me in this matter.
GoogleMobileAds2.cpp

Mobile Ads SDK Forum Advisor Prod

unread,
Oct 23, 2019, 1:03:49 AM10/23/19
to adnan...@gmail.com, google-adm...@googlegroups.com

Hi Adnan,

Thank you for providing additional details on your concern.

I can confirm that the generated file (GoogleMobileAds2.cpp) does in fact contain iOS-specific code, despite having been created for an Android-specific build, thus causing the compilation error. However, I'm afraid that I will be needing a copy of your sample project (that replicates this issue), as well as any special building instructions if any, in order to move forward with the investigation for our Engineering team. To that end, feel free to send the requested details via Reply privately to author once you are able to do so.



Regards,
Ziv Yves Sanchez
Mobile Ads SDK Team



ref:_00D1U1174p._5001UKO3EO:ref

Mobile Ads SDK Forum Advisor Prod

unread,
Oct 31, 2019, 5:57:46 AM10/31/19
to adnan...@gmail.com, google-adm...@googlegroups.com

Hi Adnan,

Thank you for providing the requested details in private. Those have proven very helpful in the investigation.

I was able to successfully build the project you've provided using Unity 2019.1.0f2 and android-ndk-r16b for the Android NDK. I will be sending back your sample project to you (along with the APK built, titled out.apk) on a separate private email to confirm this on your end. Could you try building the project that I'll be sending and see if it would build successfully? If the situation persists, you may try either re-importing the AdMob SDK for native ads, or using a newer version of the Android NDK before building again.

Let us know how it goes.



Regards,
Ziv Yves Sanchez
Mobile Ads SDK Team



ref:_00D1U1174p._5001UKO3EO:ref

Ali Ammar

unread,
Feb 6, 2020, 1:21:35 AM2/6/20
to Google Mobile Ads SDK Developers
I am facing a similar problem while using native unified ads plugin, everything is working fine in mono and il2cpp builds until i use a key-store to sign the .apk. 
I have tried it in unity 2018.4.8 f1, 2019.1.7 , 2019.2. I get this error:

Failed running C:\Program Files\Unity2018.4.8f1\Editor\Data\il2cpp/build/il2cpp.exe --convert-to-cpp --emit-null-checks --enable-array-bounds-check --dotnetprofile="unityaot" --compile-cpp --libil2cpp-static --platform="Android" --architecture="ARMv7" --configuration="Release" --outputpath="E:\MultistoryforAds\MultiStory Car Parking Ali\Temp\StagingArea\assets\bin\Data\Native\armeabi-v7a\libil2cpp.so" --cachedirectory="E:\MultistoryforAds\MultiStory Car Parking Ali\Assets\..\Library\il2cpp_android_armeabi-v7a/il2cpp_cache" --additional-include-directories="C:\Program Files\Unity2018.4.8f1\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\bdwgc/include" --additional-include-directories="C:\Program Files\Unity2018.4.8f1\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\libil2cpp/include" --tool-chain-path="E:/synces/Important Assets/SDK AND NDK/android-ndk-r16b-windows-x86_64/android-ndk-r16b" --map-file-parser="C:\Program Files\Unity2018.4.8f1\Editor\Data\Tools\MapFileParser\MapFileParser.exe" --directory="E:\MultistoryforAds\MultiStory Car Parking Ali\Temp\StagingArea\assets\bin\Data\Managed" --generatedcppdir="E:\MultistoryforAds\MultiStory Car Parking Ali\Temp\StagingArea\Il2Cpp\il2cppOutput" 

stdout:
Building libil2cpp.so with AndroidToolChain
Output directory: E:\MultistoryforAds\MultiStory Car Parking Ali\Temp\StagingArea\assets\bin\Data\Native\armeabi-v7a
Cache directory: E:\MultistoryforAds\MultiStory Car Parking Ali\Library\il2cpp_android_armeabi-v7a\il2cpp_cache
ObjectFiles: 590 of which compiled: 0
Total compilation time: 218 milliseconds.
il2cpp.exe didn't catch exception: Unity.IL2CPP.Building.BuilderFailedException: E:\synces\Important Assets\SDK AND NDK\android-ndk-r16b-windows-x86_64\android-ndk-r16b\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++ @"C:\Users\PLASMA- ALI AMMAR\AppData\Local\Temp\tmp23D8.tmp" -o "E:\MultistoryforAds\MultiStory Car Parking Ali\Library\il2cpp_android_armeabi-v7a\il2cpp_cache\linkresult_9C417F8ADB0226E9F5DE5C33DE644EDE\libil2cpp.so" -shared -Wl,-soname,libil2cpp.so -Wl,--no-undefined -Wl,-z,noexecstack -Wl,--gc-sections -Wl,--build-id --sysroot "E:\synces\Important Assets\SDK AND NDK\android-ndk-r16b-windows-x86_64\android-ndk-r16b\platforms\android-16\arch-arm" -gcc-toolchain "E:\synces\Important Assets\SDK AND NDK\android-ndk-r16b-windows-x86_64\android-ndk-r16b\toolchains\arm-linux-androideabi-4.9\prebuilt\windows-x86_64" -target armv7-none-linux-androideabi -Wl,--wrap,sigaction -L "E:\synces\Important Assets\SDK AND NDK\android-ndk-r16b-windows-x86_64\android-ndk-r16b\sources\cxx-stl\gnu-libstdc++\4.9\libs\armeabi-v7a" -lgnustl_static -llog -rdynamic -fuse-ld=gold.exe

Mobile Ads SDK Forum Advisor Prod

unread,
Feb 6, 2020, 3:55:03 AM2/6/20
to alizm...@gmail.com, google-adm...@googlegroups.com

Hi Ali,

 

Thank you for reaching out to us.

 

Could you kindly provide the details below (via Reply privately to author) so that I can investigate the issue?

  • AdMob SDK version
  • Copy of your project folder (reproducing the issue)
  • Steps to replicate the issue

 

You may zip the entire Unity project (excluding the Library and Temp folders) in order to reduce its size, then send it to me via a shareable link from your Google Drive (or on any other file-sharing site that you prefer). Don't forget to send the shareable link via Reply privately to author.

 

Regards,

Ziv Yves Sanchez

Mobile Ads SDK Team



ref:_00D1U1174p._5001UV05Px:ref
Reply all
Reply to author
Forward
0 new messages