Admob 3.1.0 showing errors in Unity 5.4.1f1 - unity3d

I have Unity 5.4.1f1
I have the admob Unity sdk version 3.1.0
I setup an admob account, and then followed these steps
When I do a build for Android I get the following errors
When I play I get the following messages
Heres the full version of one of those errors
WARNING: No compatible versions of com.android.support:support-v4 required by (com.android.support:appcompat-v7:23.1.0+, com.google.android.gms:play-services-basement:9.6.1), will try using the latest version 24.0.0
UnityEngine.Debug:Log(Object)
Google.JarResolver.PlayServicesSupport:Log(String, Boolean)
Google.JarResolver.PlayServicesSupport:ResolveDependencies(Boolean)
GooglePlayServices.ResolverVer1_1:DoResolutionNoAndroidPackageChecks(PlayServicesSupport, String, OverwriteConfirmation)
GooglePlayServices.<DoResolution>c__AnonStorey1:<>m__0()
GooglePlayServices.ResolverVer1_1:DoResolution(PlayServicesSupport, String, OverwriteConfirmation, Action)
GooglePlayServices.PlayServicesResolver:Resolve(Action)
GooglePlayServices.PlayServicesResolver:AutoResolve()
UnityEditor.EditorApplication:Internal_CallUpdateFunctions()
Note that I already have Chartboost working.
I have so far been unable to display an admob ad in the editor or in a build with the following code.
private void RequestAdmobInterstitial()
{
#if UNITY_ANDROID
string adUnitId = "my ad unit id";
#elif UNITY_IPHONE
string adUnitId = "INSERT_IOS_INTERSTITIAL_AD_UNIT_ID_HERE";
#else
string adUnitId = "unexpected_platform";
#endif
// Initialize an InterstitialAd.
InterstitialAd interstitial = new InterstitialAd(adUnitId);
// Create an empty ad request.
AdRequest request = new AdRequest.Builder().Build();
// Load the interstitial with the request.
interstitial.LoadAd(request);
}
In a build nothing happens, in the editor I get these messages
Are these errors why it is it working?
If so how do I fix them?

This error:
WARNING: No compatible versions of com.android.support:support-v4
The script complaining about it is the google play jar resolver. It grabs all the necessary android libraries from your Android SDK location, and it can't find the libraries it wants.
This most likely means you are missing the android support libraries in your Android SDK folder.
To fix this, open up the Android SDK manager (most likely via Android Studio) and make sure you have the support libraries up to date.
While you're at it, update google play services too, cant hurt and might save you errors down the road.

Related

Building Flutter sqflite ios app using codemagic.io

My flutter app works fine on android emulator and I am using codemagic.io to build the ios version since I am on windows.
However, when trying to build the ios app, the site is showing the following error and I think it has to do with sqflite.
As far as I understand, I guess, I have to change the minimum targeted ios version but actually I don't know how to do it. Any help would be much appreciated.
Xcode's output:
↳
/Users/builder/clone/ios/Pods/FMDB/src/fmdb/FMDatabaseQueue.m:101:9: warning: 'dispatch_queue_set_specific' **is only available on iOS 5.0 or newer** [-Wunguarded-availability]
dispatch_queue_set_specific(_queue, kDispatchQueueSpecificKey, (__bridge void *)self, NULL);
^~~~~~~~~~~~~~~~~~~~~~~~~~~
In module 'Foundation' imported from /Users/builder/clone/ios/Pods/FMDB/src/fmdb/FMDatabaseQueue.h:9:
In module 'CoreFoundation' imported from /Applications/Xcode-11.4.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.4.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:6:
In module 'Dispatch' imported from /Applications/Xcode-11.4.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.4.sdk/System/Library/Frameworks/CoreFoundation.framework/Headers/CFStream.h:20:
/Applications/Xcode-11.4.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.4.sdk/usr/include/dispatch/queue.h:1498:1: **note: 'dispatch_queue_set_specific' has been marked as being introduced in iOS 5.0 here, but the deployment target is iOS 4.3.0**
dispatch_queue_set_specific(dispatch_queue_t queue, const void *key,
^
/Users/builder/clone/ios/Pods/FMDB/src/fmdb/FMDatabaseQueue.m:101:9: note: enclose 'dispatch_queue_set_specific' in an #available check to silence this warning
dispatch_queue_set_specific(_queue, kDispatchQueueSpecificKey, (__bridge void *)self, NULL);
^~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/builder/clone/ios/Pods/FMDB/src/fmdb/FMDatabaseQueue.m:184:54: warning: 'dispatch_get_specific' **is only available on iOS 5.0 or newer** [-Wunguarded-availability]
FMDatabaseQueue *currentSyncQueue = (__bridge id)dispatch_get_specific(kDispatchQueueSpecificKey);
I reinstalled flutter and that solved the problem

cordova 3.4 file 1.0.1 resolveLocalFileSystemURI android issue

I am trying to get a full path to an image retrieved from Android image library. via the camera plugin.
window.resolveLocalFileSystemURI("content://media/external/images/media/83", function(fileEntry) {
or
window.resolveLocalFileSystemURL(imageURI, function(fileEntry) {
fileEntry.file(function(fileObj) {
newimageURI = fileObj.fullPath;
alert(newimageURI);
});
});
returns undefined.
There was updates the other day and it is no longer working. I have tried toURL() as well with no success.
Try removing the file plugin and adding it again. Works for me. I think it's related to this bug: Cordova iOS Plugins fail after building, unless I remove platform and plugin JSON first

Facebook Unity SDK and Unity 4.3 have a conflicting instance method 'openURL' on iOS

I had Facebook Unity SDK working in my game prototype until I updated to Unity 4.3. After the update build fails on dSYM generation in xCode. Error message:
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/dsymutil failed with exit code 11
Most notably before the final error message above I get this warning:
ld: warning: instance method 'application:openURL:sourceApplication:annotation:' in category from /Users//Library/Developer/Xcode/DerivedData/Unity-iPhone-duxgtdhujpdgtjbanfxzqinkvybw/Build/Intermediates/Unity-iPhone.build/Debug-iphoneos/Unity-iPhone.build/Objects-normal/armv7/FbUnityInterface.o overrides method from class in /Users//Library/Developer/Xcode/DerivedData/Unity-iPhone-duxgtdhujpdgtjbanfxzqinkvybw/Build/Intermediates/Unity-iPhone.build/Debug-iphoneos/Unity-iPhone.build/Objects-normal/armv7/UnityAppController.o
I investigated this a bit and yes, it seems that both UnityAppController.mm and FbUnityInterface.mm define "openURL" method and that's what xCode doesn't like. I also checked the iOS build that I had worked with on earlier (4.2.x) Unity version and in that build Unity did not define openURL-method in any of its .mm files.
Version Info:
Facebook Unity SDK Version 4.3.4
Unity Editor Version 4.3 (Pro)
Xcode 5.0.2
Changes vs Unity xCode project default configuration:
Added the frameworks that AdMob requires
Added linker flag "-ObjC" that AdMob requires (Build Settings -> Other Linker Flags)
I tested linking without the "-ObjC" flag also. Result is the same. Any ideas on how to fix this?
-tomi
I ran into the same problem but only building with debugging enabled in Build Options. Turn off debugging and you get past it. Or, BuildOptions.None in your build pipeline.
Of course, no debugging ...
We just released version 4.3.6 of the sdk that fixes login with unity version 4.3. It's available at https://developers.facebook.com/

loadandverifyassembly error in Facebook script

I recently downloaded the latest FB SDK for unity and imported the asset package in my demo game project in unity ver. 4.0(windows)
As soon as i import all the files i face some errors in FB.cs script file .
Kindly let me know how to eradicate these following errors :
-> UnityEngine.Security does not contain a definition for LoadAndVerifyAssembly
in the line
var assembly = Security.LoadAndVerifyAssembly(www.bytes);
Ahh...the problem was unity itself..
I was using unity version 4.0 but the new Facebook SDK for unity has to have unity 4.1 + !!!

export android project add facebook sdk get error convert to dalvik format failed with error 1

i am doing a small project on android and it using facebook sdk 3.0. everything is ok until i export to upload android market, i got error "error convert to dalvik format failed with error 1" and i try export 2 sample projects in sdk, i got same error. i research on google ,the cause is the projects and facebook sdk have same name file R.java in com.facebook.android. But because it file R.java so i cannot rename it. i try other way, i turn off "build automatically" and delete R.java file in facebook sdk, it can export keystore and apk file but apk file don not work. So what can i do to fix it?
thanks
I was having this problem too with an app that used Facebook SDK. I was trying all sorts of stuff, so I'm not sure what exactly fixed but here's settings that worked for me:
FacebookSDK > Properties > Java Build Path > Order and Export
Android 2.2 - NOT CHECKED
Android Private Libraries - CHECKED
Android Dependencies - CHECKED
MyApp > Properties > Java Build Path > Order and Export
Android 4.2.2 - CHECKED
Android Private Libraries - CHECKED
Android Dependencies - CHECKED
In addition, I had done this before, not sure it mattered. Reverted to Facebook SDK version 3.5 from 3.5.2. Updated to latest ADT 22.2.1. Changed Facebook SDK to use Android 2.2 from 4.2.2.