GraphicsMode configuration for NokiaX via MonoGame - c#

As described here I am having difficulty porting my existing working Android games, developed using MonoGame, to Nokia X.
OpenTK does not appear to be able to detect the device capabilities properly, or something similar:
OpenTK.Platform.Android.EglException: Failed to find a valid GraphicsMode configuration
at OpenTK.Platform.Android.AndroidGraphicsMode.ChooseConfig (Javax.Microedition.Khronos.Egl.EGLDisplay display) [0x0035c] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.10.1-branch/9d03ce3e/source/monodroid/src/OpenGLES/Android/AndroidGraphicsMode.cs:186
at OpenTK.Platform.Android.AndroidGraphicsMode.Initialize (Javax.Microedition.Khronos.Egl.EGLDisplay display, Int32 version) [0x0000a] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.10.1-branch/9d03ce3e/source/monodroid/src/OpenGLES/Android/AndroidGraphicsMode.cs:223
at OpenTK.Platform.Android.AndroidGraphicsContext.Init (OpenTK.Graphics.GraphicsMode mode, IWindowInfo win, IGraphicsContext sharedContext, Int32 major, GraphicsContextFlags flags) [0x000a9] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.10.1-branch/9d03ce3e/source/monodroid/src/OpenGLES/Android/AndroidGraphicsContext.cs:114
at OpenTK.Platform.Android.AndroidGraphicsContext..ctor (OpenTK.Graphics.GraphicsMode mode, IWindowInfo window, IGraphicsContext sharedContext, GLContextVersion glesVersion, GraphicsContextFlags flags) [0x00015] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.10.1-branch/9d03ce3e/source/monodroid/src/OpenGLES/Android/AndroidGraphicsContext.cs:88
at OpenTK.Platform.Android.AndroidGraphicsContext.CreateGraphicsContext (OpenTK.Graphics.GraphicsMode mode, IWindowInfo window, IGraphicsContext sharedContext, GLContextVersion glVersion, GraphicsContextFlags flags) [0x00007] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.10.1-branch/9d03ce3e/source/monodroid/src/OpenGLES/Android/AndroidGraphicsContext.cs:50
at OpenTK.Platform.Android.AndroidGameView.CreateContext () [0x0001b] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.10.1-branch/9d03ce3e/source/monodroid/src/OpenGLES/Android/AndroidGameView.cs:314
at OpenTK.Platform.Android.AndroidGameView.CreateFrameBuffer () [0x00002] in /Users/builder/data/lanes/monodroid-mlion-monodroid-4.10.1-branch/9d03ce3e/source/monodroid/src/OpenGLES/Android/AndroidGameView.cs:165
at Microsoft.Xna.Framework.AndroidGameWindow.CreateFrameBuffer () [0x0003f] in /Users/paulharman/MonoGame/MonoGame.Framework/Android/AndroidGameWindow.cs:164
I'm asking for an 800x480 screen (which is the native screen size of the device) and Color mode (8,8,8,8) - although MonoGame itself tries various fallbacks to simpler bit depths, stencils etc. but nothing seems to work.
Has anyone else seen this issue and have an idea of what might be wrong?
I am using the tip of MonoGame (develop branch) as of the time of writing. Xamarin details:
=== Xamarin Studio ===
Version 4.2.3 (build 54)
Installation UUID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Runtime:
Mono 3.2.6 ((no/9b58377)
GTK+ 2.24.23 theme: Raleigh
GTK# (2.12.0.0)
Package version: 302060000
=== Apple Developer Tools ===
Xcode 5.0.2 (3335.32)
Build 5A3005
=== Xamarin.Mac ===
Xamarin.Mac: Not Installed
=== Xamarin.iOS ===
Version: 7.0.6.168 (Business Edition)
Hash: 2ed9bc9
Branch:
Build date: 2014-21-01 06:33:05-0500
=== Xamarin.Android ===
Version: 4.10.1 (Business Edition)
Android SDK: /Users/paulharman/Library/Developer/Xamarin/android-sdk-mac_x86
Supported Android versions:
1.6 (API level 4)
2.1 (API level 7)
2.2 (API level 8)
2.3 (API level 10)
3.1 (API level 12)
3.2 (API level 13)
4.0 (API level 14)
4.0.3 (API level 15)
4.1 (API level 16)
4.2 (API level 17)
4.4 (API level 19)
Java SDK: /usr
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-462-11M4609)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-462, mixed mode)
=== Build Information ===
Release ID: 402030054
Git revision: f3fd2a8582693cd1728166bcfc17056235cb5b05
Build date: 2014-02-03 17:26:56+0000
Xamarin addins: b992974cc7bee7713bba6abaf2b4fac94e67dd1c
=== Operating System ===
Mac OS X 10.9.1
Darwin HOSTNAME 13.0.0 Darwin Kernel Version 13.0.0
Thu Sep 19 22:22:27 PDT 2013
root:xnu-2422.1.72~6/RELEASE_X86_64 x86_64

I know it is slightly out of date, but I recently received the same error on Android Virtual Device, so I figured out that I can post how I solved it.
Have you tried to use hardware GPU in the Android Virtual Device settings? [open Android Emulator Manager, pick your AVD and click edit, then make sure that the checkbox next to "Use Host GPU" is ticked]
I had the same error with my game, but then I turned this option on and it works perfectly without any flaws. I'm using MonoGame in my development, but maybe this will work for you too.
I'm not sure if Nokia X emulator has this hardware GPU support though.

As a follow up to this report, Paul kindly collaborated with Nokia to analyze the suspected issues mentioned in the original question.
As a result of the investigation, we mutually concluded that the specific findings above from the app are not Nokia X specific, yet are reproducing on other Android devices as well.
I recommend this issue to be closed.
Petro Soininen
Head of Developer Support
Nokia Developer Relations

Related

Unity3D - problem with Google Play 64-bit requirement

I cannot deploy the .abb nor .apk as I keep getting the 64-bit requirement error in the Google Play Console.
I have tried everything from this answer: Unity Export Android 64-bit
but still the same problem.
Unity3D version: 2017.4.30f1
NDK: r13b (Unity is not supporting newer versions but this should not be a problem)
SDK API Level: 28
JDK: 1.8.0_221
Player Settings:
When the Unity builds the package I can see it is building for 64-bit devices so I don't get what is the issue.
Build your app without x86.
x86 usage is very low and it even got deprecated in 2019.2, so you wont miss anything by removing it.

App targeting Fall Creators Update: Installation/run on Windows phone

My UWP app uses NavigationView XAML control. It was introduced IMHO in Fall Creators Update. My phone is 1709, build: 10.0.15254.369. So, this app should be installable and runnable on this phone. I set minimal targeting version in Visual Studio to 10.0.16299 (this is the only available version for Fall Creators Update there). But bundled application seems to be not installable (after installation I don't see it in list of installed apps in the phone). When I decrease minimal targeting version - it's installing on the phone but fails on run (I suppose due to used NavigationView control). So, question is: why app is not installing on this phone and how to create "humburder-like menu" in this situation (I have NavigationView control only in my Visual studio).
If your app has minversion=16299 it means it can only be installed on operating systems with version 16299 and above. Your device is on OS version 15254, so it can't run apps that target 16299.
Another way to put it: All APIs that have been introduced in SDK 16299 are not supported/available on the latest build for Windows Phone.

Why am I getting a "package could not be registered" deployment error on Windows 10 UWP?

I have an application targetted for Windows 10 and the UWP. The application correctly runs for x86 and x64 but when I try to run it on a mobile device targetting ARM on a Nokia Lumia 820 I get an error message during deployment:
DEP0001 : Unexpected Error: Package could not be registered. (Exception from HRESULT: 0x80073CF6)
There are other questions relating to this error that suggest it could be an issue with shared user certificates or that you can't have Audio and Device use in the same background task but I am not using either of these. There is also a suggestion that this may be due to a missing icon however to the best of my knowledge I am including far more icons than I actually need.
I have tried removing everything from my assets folder and removing it from the manifest but this also hasn't solved the problem.
Edit I've also tried creating a new blank universal project and that too runs on x86 and x64 but not on the mobile.
You have to run Windows 10 Mobile on your Lumia and you should at least have OS Version 10.0.10240.x. This will work with the release Version of Visual Studio 2015. If you have a CTP or Preview Version of Visual Studio, you should update them to release to get it running.
To get the preview onto the phone, you need the Windows Insider app on your phone and follow the instructions. Choose "fast ring" to get the latest bits.
http://windows.microsoft.com/en-us/windows/preview-download-phone
Get the app here:
https://www.microsoft.com/de-de/store/apps/windows-insider/9wzdncrfjbhk
This should make it work for you.
For more info on the current preview version check this link:
http://blogs.windows.com/bloggingwindows/2015/08/12/announcing-windows-10-mobile-insider-preview-build10512/

Xamarin Visual Studio IOS Development Without a Mac?

I'm a .NET developer and want to write an IOS & Android app in C#. I've had a read around Xamarin for Visual Studio which looks interesting if not a tad expensive!
Do you need a Mac to debug your code? Do you just need a networked Mac to actually deploy the app to the Store?
Is the best option just to buy a Mac and run Windows with VS in a VM or can I just use my windows machine, write & debug the code in Windows then just hook up to a networked Mac for final deployment?
From May 2017, you can develop app without MAC.
Microsoft Xamarin introduce a Live Player. With Live Player, iOS apps can be deployed directly onto an iPhone or other iDevice from a PC running Visual Studio, where the code can then be tested and debugged.
WARNING The Xamarin Live Player Preview has ended. But it changed Hot Reload. With this feature, you can develop iOS app with your iPhone See discussion
See this video: https://www.youtube.com/watch?v=awgZDL1a3YI
this is Live Player Get start section: Live Player
Note: The final build and submission to the App Store will still require a Mac
Device Requirements
The Xamarin Live Player app supports the following devices:
iOS
iOS 9.0 or later.
ARM64 processor.
Check the App Store for a list of supported devices.
Android
Android 4.2 or later.
ARM-v7a, ARM-v8a, ARM64-v8a, x86, or x86_64 processor.
Limitations
There are some limitations on the things Xamarin Live Player can run, including the items below:
Android user interfaces designed with AXML files are not currently supported.
Some iOS storyboard features are not supported.
iOS XIB files are not supported.
Custom Renderers are not supported.
Xamarin.Forms Effects are not supported.
Embedded resources are not supported (ie. embedding images or other resources in a PCL).
Limited support for reflection (currently affects some popular NuGets, like SQLite and Json.NET). Other NuGets are still supported.
Some system classes cannot be overridden (for example, you cannot implement a subclass).
Some platform features that require provisioning can't work in the Xamarin Live Player app (however it has been configured for common operations like camera access).
Custom targets and build steps are ignored. For example, tools like Fody cannot be incorporated.
Yes, you must have a Mac to do Xamarin.iOS development. The Mac is required for building as well as running the iOS simulator. You can either use it as a build server, and actually do your development in Visual Studio (either in a standalone PC, or on a VM running on your Mac), or you can do your development directly on the Mac using Xamarin Studio as your IDE.
You can use Xamarin Studio instead of Visual Studio and build iOS application by C#.
First install VMware Workstation and then download OS X image and run it by VMware.
Then Install tools on it and enjoy.
Tools :
EDIT : The following links are out dated, You must install Mac OS 10.10 in order to be able to install XCode 6.
iOS Tools that you need:
1) Mac OS X image for Windows
Note: Max OS X Installation Help:
http://www.sysprobs.com/easily-run-mac-os-x-10-8-mountain-lion-retail-on-pc-with-vmware-image
2) Mono:
http://download.xamarin.com/MonoFrameworkMDK/Macx86/MonoFramework-MDK-3.2.4.macos10.xamarin.x86.pkg
3) Xamarin Studio:
http://download.xamarin.com/studio/Mac/XamarinStudio-4.2.1-1.dmg
4) MonoTouch:
http://download.xamarin.com/MonoTouch/Mac/monotouch-7.0.4.209.pkg
5) Xcode
Update 2018
Install VirtualBox
https://www.virtualbox.org/
Install MacOs 10.13 on VirtualBox
https://techsviewer.com/install-macos-high-sierra-virtualbox-windows/
Create or login with an apple account on the mac
Install XCode 9.0
https://download.developer.apple.com/Developer_Tools/Xcode_9/Xcode_9.xip
Enable Remote Login
System Preferences > Sharing > Remote Login > Enable for All Users
Configure VirtualBox with an additional network adaptor (host-only)
In Windows > Visual Studio (Xamarin Project) > Pair with mac
Enter the IPaddress of the second network adaptor
Let Visual studio install Xamarin IOS, IOS SDK, additional tools on the Mac
All set up.
An option is to use a remote service to do this.
For example:
http://www.macincloud.com
Anybody know that a Virtual-Machine is the solution! but when you want to have an OSX on windows it's not really easy as you just talked about it.
it's very important to find best OS ROM.
check it out here.
and you have to know that limitation is Apple's doing, not Xamarin's.
As someone that developed 3 Xamarin Forms apps, I would like to bring some points about the options:
Pair with a virtual Mac (VMWare, VirtualBox or cloud)
I worked this way for a while, but virtual machines consume a lot of hardware resources. Paid for a month to use a remote Mac, but the pairing and debugging process does not get much better.
Develop inside a virtual macOS
I have been using this option with good results. I just run everything on the macOS VMware virtual machine. Visual Studio and Emulator got a little slow (my CPU is i5 and 8GB ram), but is acceptable to make some adjusts. Advantages: Avoid pairing, Xcode to edit some resources, publishing.
Install macOS on Windows PC
This is kind of upgraded of previous suggestion. Didn't tested yet, but the performance should be better than VMWare if it works. They call this Hackintosh and is possible if your hardware is compatible.

Sqlite and Windows RT incompatibility issues

I have been working on a two player air hockey kind of game for windows RT devices using monogame, Apart from gaming logic I recently integrated sqlite for winRT in my app so that players could be able to save their scoreboard, view recent scores and share them on social networks. But with this Integration I started running into problems.
before explaining the problem Let me make you aware of my PC and target device architectures.
The machine on which I am developing and testing is Windows 8 pro with 64 bit x64 based processor.
And the target machine is Windows RT 32 bit os, ARM based Processor.
Now when I set the target platform of my app as "ANY CPU" and then try deploying my app I get an error which reads:
Error 1 The processor architecture of the project being built "Any CPU" is not supported by the referenced SDK "SQLite.WinRT, Version=3.8.2". Please consider changing the targeted processor architecture of your project (in visual studio this can be done through the Configuration Manager) to one of the architectures supported by the SDK: "x86, x64, ARM". Pong
Now I set the target platform as ARM then again I am in an error which says
Error 6 Error : DEP0700 : Registration of the app failed. Windows cannot install package da981e37-1c3c-4614-8c85-40485aa9e4a8 because the package requires architecture ARM, but this computer has architecture x64. (0x80073cf3) Pong
then I set the target to x86. This makes the game run normally on my PC but the package installation on target device fails with this option.
Now finally I am left with x64 as the target. This also runs well on my system, also the package gets easily installed on target machine. But it just shows me a black screen for long(Note that it is not a crash!).
I know I might be doing silly somewhere. But I am stuck on this from a long time.
Its a long note, But its only so that I could make you well aware with my problem.
Please provide the answer to the problem.
Your Suggestions are always appreciated :) Thanks.
When you want to Deploy or Debug in your Development machine, set the target Platform as "x86". When you want to deploy or debug in your RT device, change the target platform to "ARM".
You cannot deploy an app which targets "x86", or "x64" to an ARM device.
Also the "Microsoft C++ Runtime Package" dll will not allow you Build with the configuration of "Any CPU".

Categories