Since I built a new computer I'm having problems running my current project on every emulator I could think of (e.g. Xamarin Android Player, Visual Studio Emulator, the Android SDK one ...). Every time I run the project on an emulator (it works on real devices just fine) the emulators screen is gray and only some text rendered by my "engine" appears.
(like this: http://i.stack.imgur.com/7AFos.png ). To develop my project I'm using Xamarin and OpenGL ES 2.
I've looked up all the logs from the different emulators and there are only a few differences when debugging on an emulator and a real device.
The log shows some crazy opengles errors
I/OpenGLRenderer( 3523): Initialized EGL, version 1.4
W/EGL_emulation( 3523): eglSurfaceAttrib not implemented
W/OpenGLRenderer( 3523): Failed to set EGL_SWAP_BEHAVIOR on surface 0x9c242f20, error=EGL_SUCCESS"
There are quite many garbace collections (around one every second) whichs log look like this:
D/Mono ( 3523): GC_OLD_BRIDGE num-objects 1 num_hash_entries 1 sccs size 1 init 0.00ms df1 0.02ms sort 0.01ms dfs2 0.01ms setup-cb 0.01ms free-data 0.01ms links 0/0/0/0 dfs passes 0/0
D/Mono ( 3523): GC_MINOR: (Nursery full) pause 0.51ms, total 0.73ms, bridge 0.01ms promoted 1216K major 1216K los 331K
Here is my Android manifest:
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="com.tipfom.mapknight">
<uses-feature android:glEsVersion="0x00020000" />
<uses-sdk android:targetSdkVersion="21" android:minSdkVersion="21" />
<application android:label="mapKnight" android:icon="#drawable/icon" android:hardwareAccelerated="true"></application>´
I've allready tried to turn off Host GPU, increase the target and minSdkVersion of the Application, Download all AndroidSDK files till API 15 and install the Intel HAXM driver.
Related
I am trying to create a Binding class in Visual Studio like in Android Studio https://developer.android.com/topic/libraries/data-binding/generated-binding
What I have:
Visual Studio 2022 17.4.5
Xamarin 17.4
What I've done:
Create Android App (Xamarin) project. Blank App and minimum android version 10.0
install Xamarin.AndroidX.DataBinding.ViewBinding 7.4.0.1 nuget package
Adds to the .csproj file
<AutoGenerateLayoutBindings>true</AutoGenerateLayoutBindings>
Adds a root element to activity_main.xml
<layout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="#+id/hello_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hello, world!"
android:textSize="24sp"
android:layout_centerInParent="true" />
</RelativeLayout>
</layout>
Build project. In output window
Rebuild started...
1>------ Rebuild All started: Project: App4, Configuration: Debug Any CPU ------
Restored C:\Users\koly8\source\repos\App4\App4.csproj (in 73 ms).
1> App4 -> C:\Users\koly8\source\repos\App4\bin\Debug\App4.dll
========== Rebuild All: 1 succeeded, 0 failed, 0 skipped ==========
nothing have been created
Maybe missed something
I tested the code you provided but failed, then refer to the doc: Data Binding Library. It said:
To configure your app to use data binding, enable the dataBinding build option in your build.gradle file in the app module, as shown in the following example:
android {
...
buildFeatures {
dataBinding true
}
}
The dataBinding library is actually part of the gradle build toolkit so isn't available in Xamarin.Android applications. For xamarin android the most recommended way is to use data binding is to use the native libraries, for example MVVMCross.
The Complete Warning:
Gerätefehler: WARNING: unexpected '-prop' value ('monodroid.avdname=Android_Accelerated_x86_Oreo'), only 'qemu.' properties are supported
WARNING: unexpected '-prop' value ('emu.uuid=c1d2555f-5c69-44bc-ae95-56d2f66aaac1'), only 'qemu.' properties are supported
I have a AMD Ryzen 7 PRO 1700X Eight-Core Processor 3.40 GHz 16,0 GB Processor.
Thanks to everyone to help me!
Pictures:
The SDK Manager
When i click the Start Button
The problem may caused by the video card (AMD Radeon RX580) with outdated drivers.
Update the drivers with "AMD Adrenalin 2020 Edition" and reboot.
Run the android emulator and if you get a GPU error set hw.gpu.mode = off in the emulator properties.
I solved it!
I forgot to activate the Visualization in my UEFI/ BIOS. I use the Uefi msi 5.0.
Here is a Video, how to solve it:
https://www.youtube.com/watch?v=T9kXjf_Hjq0
Have fun in Xamarin Development!!!
I am trying to build and run a simple Xamarin IOS Single View project in VS 2015 using the iPhone simulator. The project creation is fine and I can run and see the empty project in my iPhone simulator but when I try and use the VS 2015 storyboard designer I get the error below. The remote connection to the Mac is fine , I m running VS 2015 Community Edition under Windows 10 using Parallels on my Mac. I have tried disconnecting and reconnecting to the Mac before using the designer but no luck.
Does anyone have any idea what could be the issue.
Thanks
Steve
Object reference not set to an instance of an object
Contents of C:\Users\spric\AppData\Local\Xamarin\Logs\14.0\iOSDesigner-3712.2016-10-29__10-08-39.log:
MDAddinsHash: 33f406fa2dcf214012c78cb846585f062b2e1d24
[2016-10-29 10:09:02.3] INFO: IDE notified that the list of assemblies referenced has changed
[2016-10-29 10:09:02.3] INFO: Not uploading assemblies because there is no remote session
[2016-10-29 10:09:37.2] INFO: IDE notified that the list of assemblies referenced has changed
[2016-10-29 10:09:37.2] INFO: Not uploading assemblies because there is no remote session
[2016-10-29 10:12:16.7] INFO: IDE notified that the list of assemblies referenced has changed
[2016-10-29 10:12:16.7] INFO: Not uploading assemblies because there is no remote session
Looks like a bug in the iOS designer, same error as this bug which is a duplicate of this bug.
The work around seems to be:
Partial workaround
Open the storyboard once more in Xcode 8.
Under the storyboard properties, change "Opens In" to "Xcode 7.x".
(See also the attached screenshot.)
As indicated by the dialog that will appear, this is only a partial
workaround because it will remove Xcode 8 features:
Saving for Xcode 7.x will close your document and data for Xcode 8.0
features will be removed.
if you dont have Xcode then you might be able to just replace the version at the top of your xib/storyboard with this, I havent tested this:
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="11542" systemVersion="16B2555" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" colorMatched="NO">
<dependencies>
<development version="7000" identifier="xcode"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11524"/>
</dependencies>
I have a Xamarin.Android App compiled and packaged. It works on any device Blu Dash 3.5, Samsung S5 and inferior, Hummer, etc.
In Xamarin Studio I go to Options --> Application Build --> Advanced --> Supported ABIs and mark all of them:
armeabi
armeabi-v7a
x86
arm64-v8a
x86_64
So, I put the .apk package on the Samsung S6 and install with no problem. But when I run the app, stop working (the application exit without any message).
LOGCAT: 06-17 17:53:33.797: E/mono-rt(21778): [ERROR] FATAL UNHANDLED EXCEPTION: System.ExecutionEngineException: SIGILL
Is anyone have the same problem? What do you suggest in order to fix the situation?
Found the solution (temporally). You must deselect arm64-v8a from Options --> Application Build --> Advanced --> Supported ABIs.
That solves the problem.
I've been having issues with using Ads on xamarin for android, was hoping someone with more expertise could offer some advice.
This is the first App I have build using Xamarin Android, or at least attempted to. Within the layout I have left a space for an advert.
I've followed multiple guides including;
How to integrate AdMob ads in the latest MonoGame Android (XNA)?
https://blog.tommyparnell.com/admob-with-xamarin-part-1-banner-ads/
Both guides I've followed to the letter and I'm getting the same error each time I try to run the application
The syntax in my main activity is as follows;
AdRequest adRequest = new AdRequest.Builder().Build();
layout.LoadAd(adRequest);
When this is included, I get a runtime error as follows;
Caused by: md52ce486a14f4bcd95899665e9d932190b.JavaProxyThrowable: System.NullReferenceException: Object reference not set to an instance of an object
06-05 09:39:21.062 E/AndroidRuntime( 7212): at MyApp.Android.MainActivity.OnCreate (Android.OS.Bundle) [0x00028] in c:\Users\User\Dropbox\Projects\MyApp_Xamarin\MyApp.Android\MainActivity.cs:44
I have tried deleting and recreating the google play services reference.
I've ensured my manifest has the relevant activity tags within it
<activity android:name="com.google.android.gms.ads.AdActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" />
I'm at a total loss. The error I'm receiving looks like a java error, although as I'm in the c# environment I can't directly access and debug this that I can tell.
After 3 days of getting no further with this issue I've turned to StackOverflow, if anyone can point me in the right direction I'd be very grateful!
I am using visual studio 2013
Cheers.
I've added admob to a Xamarin Forms app but not an XNA game. Here is a link to my app on github
var adMobElement = Element as AdMobBuddyControl;
if ((adMobElement != null) && (e.OldElement == null))
{
AdView ad = new AdView(this.Context);
ad.AdSize = AdSize.Banner;
ad.AdUnitId = adMobElement.AdUnitId;
var requestbuilder = new AdRequest.Builder();
ad.LoadAd(requestbuilder.Build());
this.SetNativeControl(ad);
}
Make sure to have this in your application tag of manifest:
<meta-data android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
<activity android:name="com.google.android.gms.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" />
And this permission:
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
I kind of fumbled my way through it. You may not need everything that I mentioned but hopefully it can give you a starting point.