I am using the AlexTouch.googleAdMobAds project for displaying ads. Unfortunately it shows the error below:
static UIWindow window;
static GADBannerView adViewWindow;
static bool adOnWindow = false;
Error:
Error CS0012: The type MonoTouch.UIKit.UIView' is defined in an assembly that is not referenced. Consider adding a reference to assemblymonotouch, Version=0.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065' (CS0012) (OnlineVideos.Ui)
How can I solve this issue? Can anyone help please?
Add a using clause to include UIKit:
using UIKit;
Xamarin.iOS Only Nuget:
<package id="Xamarin.Google.iOS.MobileAds" version="7.6.0.1" targetFramework="xamarinios10" />
UPDATE 2: Xamarinos.AdMob.FormsPlugin Nuget
A Xamarin.Forms based PCL version # https://github.com/LosXamarinos/Xamarinos.AdMob.FormsPlugin
Nuget: https://www.nuget.org/packages/Xamarinos.AdMob.FormsPlugin/
UPDATE: See this forum thread concerning AlexTouch.GoogleAdMobAds being outdated:
https://forums.xamarin.com/discussion/7935/admob-with-alextouch-googleadmobads
I am the author of AlexTouch.GoogleAdMobAds it is really outdated now please use either the component
https://components.xamarin.com/view/googleadmob/
or the more up to date binding
https://github.com/mono/monotouch-bindings/tree/master/GoogleAdMobAds
I would suggest the component over the manual binding it's just easier ;)
Related
When using FSharp.Compiler.SourceCodeServices.FSharpChecker.ParseAndCheckFileInProject from FSharp Compiler Service for whole-project analysis, how can NuGet dependencies be included for symbolic resolution?
In the project under analysis, some project file (*.fsproj) contains some <PackageReference> element, e.g. <PackageReference Include="NodaTime" Version="3.0.3" />, and some source file contains an open statement open NodaTime and somewhere some symbol DateInterval refering to NodaTime.DateInterval. For me, the FSharp Compiler Service seems to fail to resolve DateInterval to NodaTime.DateInterval in that source file.
What I am currently doing is, summarized:
let checker = FSharpChecker.Create()
let options: FSharpProjectOptions = { ... }
checker.ParseAndCheckFileInProject (...)
Given that I use ParseAndCheckFileInProject, what is necessary for checker and/or options to consider symbols coming from NuGet dependencies?
I think you have to extract the FSharpProjectOptions from the .fsproj project file. For old-style .NET Framework projects, there used to be a method called ProjectCracker.GetProjectOptionsFromProjectFile that would do this, but it has been replaced with Dotnet.ProjInfo, which also supports .NET Core. See this SO question for details.
I'm in a strange situation where I cannot cast a Fragment to a SupportMapFragment. And I've read the 8+ threads about similar problems, which are all not linked to my problem. They all mixed MapFragment and SupportMapFragment, or referenced Android.App instead of Android.Support.V4.App.
I'm in Mono (MvvmCross). My layout is containing a SupportMapFragment.
<fragment
android:id="#+id/map"
android:layout_width="match_parent"
android:layout_height="match_parent"
class="com.google.android.gms.maps.SupportMapFragment" />
So, here's how I try to get my SupportMapFragment from my layout:
var theMap = (SupportMapFragment) SupportFragmentManager
.FindFragmentById(Resource.Id.map);
Cannot cast expression of type 'Android.Suport.V4.App.Fragment'
to type 'SupportMapFragment'
SupportMapFragment inherits from android.support.v4.app.Fragment, so that's why I find it strange.
I have Mono.Android.Support.v4 and Xamarin.Android.Support.V4 referenced.
I noticed that my SupportFragmentManager comes from global::Android.Support.V4.App and not the previously mentionned two assemblies.
My project targets API 13 to 19, and compiles in API 19.
I'm using a precompiled version of Cirrious.MvvmCross.Droid.Fragging as the version in the component doesn't build.
In short: what I get from SupportFragmentManager cannot be casted to SupportMapFragment.
While I'd prefer not to answer my own problem, this issue is so problematic that I'll contribute in documenting workaround. To get it working, I:
Added GooglePlayServices component
Added Android Support V4 component
Added original source code of Cirrous.MvvmCross.Droid.Fragging
Made sure I only add Xamarin.Android.Support.V4 referenced and not Mono.Android.Support.V4
It now works without any assembly redirection.
So i'm trying to create a binding for Card.IO in Android.
The error i'm facing now is "Classes cannot have multiple base classes". The line which the error is occurring on is shown below.
public sealed partial class CardIOActivity : global::Android.App.Activity, global::IO.Card.Payment.IN {
I've tried
<attr path="/api/package[#name='io.card.payment']/class[#name='CardIOActivity']" name="baseName">global::Android.App.Activity</attr>
but it didn't work. Any help is appreciated.
I'm trying to integrate xlslib in my app. After compiling and installing lib, I have added this in my code. Then I got the error shown below:
format_t::format_t(CGlobalRecords& gRecords, const u16string& fmtstr) :
formatstr(fmtstr),
index(0),
m_usage_counter(0),
m_GlobalRecords(gRecords)
{
}
Errors:
format.cpp:125:52: Reference to 'u16string' is ambiguous
Out-of-line definition of 'format_t' does not match any declaration in
xlslib_core::format_t
while in format.h file, declaration as below
format_t(CGlobalRecords& gRecords, const u16string& fmtstr);
Can any one help to solve this issue?
Why didn't you post a bug report on the SourceForge page? In any case, the xlslib project has been updated and now offers the DHxlslibIOS library that you can incorporate as is into your project. You can download a zipped package here with the latest 2.4.0b1 source, or pull it from SVN. The framework is in the DHxls directory.
An external Library need the Batik.jar Library.
But on Loading it outputs:
java.lang.LinkageError: loader constraint violation: loader (instance of ) previously initiated loading for a different type with name "org/xml/sax/SAXParseException"
I tried modifying the build config.groovy file to exclude xml-apis but it didnt work. Any workaround for using batik?
I faced the same problem , I've manually looked for all ivy*.xml files in %User%\.ivy2\cache\org.apache.xmlgraphics and deleted the following entry :
<dependency org="xml-apis" name="xml-apis" rev="1.3.04" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>
I had the same issue with the selenium libraries, which have contain some xml-libraries. I extracted these newer/outdated versions from selenium and then it worked.
I had a look into "batik" and in the lib folder there are xalan, xerces and xml-apis. Try to remove them and hope, that the api-versions provided from grails are compatible.