No resource identifier found for attribute 'enableVrMode' in package 'android' - c#

I've started working on converting a game into Virtual reality. For starting purposes, I've created an empty project and imported Google VR plugin. But when I want to create the build in cellphone, following error occurs:
CommandInvokationFailure: Failed to re-package resources. See the Console for details.
stderr[
AndroidManifest.xml:30: error: No resource identifier found for attribute 'enableVrMode' in package 'android'
stdout[
Configurations:
(default)`
I've searched internet, changed API levels, did everything I could. But it didn't worked. Need your help guys.

The enableVrMode attribute was added in Android N. You will get this error if you are using anything less that this version.
Download Android SDK Platform-Tools 24 and then Android 7.0 (API 24). You can do this from Android Studio. That should solve your problem.
If this does not solve your problem, note that the latest Google VR SDK includes some API that requires Unity VR Technical preview to work.You can read here for more information.

Related

Duplicate class found facebook sdk unity

Hi I am working with unity.
I am trying to build my application in android
I am getting this error when building. Normally I can play the game in unity. I am building for android.
I have a Keystore. I created a key.
java.lang.RuntimeException: Duplicate class
com.facebook.android.BuildConfig found in modules
jetified-facebook- android-
wrapper-7.17.2-runtime.jar (:facebook-android-wrapper-7.17.2:)
and jetified- facebook-android-wrapper-8.0.0-runtime.jar (:facebook-
android-wrapper-8.0.0:)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)
I looked at these links
https://github.com/facebook/facebook-sdk-for-unity/issues/386
Duplicates class found in modules
https://forum.unity.com/threads/androidx-corecomponentfactory-problem-on-2019-3.777584/#post-5193863
But it does not solve my problem. I am getting still the same errors.
I found the solution:
It seems adding voodoo packes in unity and facebook is conflicting. If you have voodoo packages you do not need to add facebook sdks again.

Issue with nuget package Xamarin.Firebase.iOS.CloudMessaging 3.1.2

I get many error messages if I install the Xamarin.Firebase.iOS.CloudMessaging 3.1.2 nuget package.
Error: linker command failed with exit code 1 (use -v to see invocation)
Error MT5210: Native linking failed, undefined symbol: _FIRLogBasic. Please verify that all the necessary frameworks have been referenced and native libraries are properly linked in.
Error MT5211: Native linking failed, undefined Objective-C class:
FIROptions. The symbol '_OBJC_CLASS_$_FIROptions' could not be found
in any of the libraries or frameworks linked with your application.
Error MT5211: Native linking failed, undefined Objective-C class:
GULAppEnvironmentUtil. The symbol
'_OBJC_CLASS_$_GULAppEnvironmentUtil' could not be found in any of the
libraries or frameworks linked with your application.
Error MT5201: Native linking failed. Please review the build log and
the user flags provided to gcc: -ObjC
Error MT5202: Native linking failed. Please review the build log.
I tried uninstalling and reinstalling the nuget package but I still get the same errors.
I use Visual Studio Community for Mac 8.1.5 (build 9).
I need Xamarin.Firebase.iOS.CloudMessaging because I follow this tutorial: https://www.robbiecode.com/setup-push-notifications-with-firebase-in-xamarin-forms-for-ios/
What is wrong with my project? What can I do?
The following two projects are in my solution:
InapppurchaseTest.iOS, MonoGame.Framework.iOS (develop)
Well, this is a well-known issue with Firebase and Xamarin, what basically happens here is the old bin and obj files while interacting with the new data override some existing files that are needed by iOS to synthesize the IPA while deployment and hence ends up throwing linking RELATED errors, follow the below steps and it will clear this mess.
Clean bin and obj
Delete the builds in the following path of your MAC machine - ~/Library/Caches/Xamarin/mtbs/builds/ProjNAME where 'ProjName' is the name of the project you are currently working on
Once you are done with both the above steps add the Xamarin.Firebase.iOS.CloudMessaging package and change linker setting to Don't Link (this is for the time being)
After installing these packages see to it that you build your project dependency wise which means PCL'S and .Net standards first then the native iOS project.
Clean bin and obj again if it does not work for the first build...
This should solve your issues in case it does not repeat the above procedure.
EDIT
If you check the GitHub comment by SotoiGhost here, it says adding the below line anywhere in your project should solve this issue...
var foo = Firebase.Core.Configuration.SharedInstance;
Feel free to get back in case of issues
Good luck!

How to solve this error in Unity? (System.Net.Sockets)

I got much help through Stackoverflow.
Recently, I checked this error when I used Unity.
SystemException: 'System.Net.Sockets' are supported only with Unity Android Pro. Referenced from assembly 'Assembly-CSharp'
To solve this error, I did it as follows :
I would open up Visual Studio and do a Find in Files for "System.Net.Sockets". The file name was 'UDPReceive.cs'.
I searched script for finding script error. But I didn't find script error.
I did find another solution. The solution is to add '#if UNITY_EDITOR' at the very top of any file that uses 'System.Net.Sockets' and '#endif' at the bottom of files. But this error occured continuingly.
I deleted 'Assembly-CSharp' file and 'UDPReceive.cs'. But this error was not solved and more errors occur X_X
So, I wanna solve this error.
Could you notify solution of this error to me?
Is there only solution using paid Android Pro?
+) My Unity Version is 4.6.3 & Unity Pro Version (Internal Develop Version)

Xamarin App builds and runs on simulator, but on real phone I get Assembly Failure

I am working on a Xamarin based mobile app. It has previously deployed to an iPhone, and is currently working on the simulator. However, when I try to Debug on my iPhone, I get:
Error MT2002: Failed to resolve assembly: 'PCLStorage.Abstractions, Version=1.0.2.0, Culture=neutral, PublicKeyToken=286fe515a2c35b64' (MT2002) (My_App.iOS)
PCLStorage is installed and up to date in my iOS and Core projects, although neither have any references to the package. It was installed when I added the AWS Core SDK. How do I resolve this error, I assume that is what is stopping the debug on iPhone?
Edit: (based on Answer below)
If I disable the linker in my build settings, I get the error:
My_App/iOS/MTOUCH: Error MT3001: Could not AOT the assembly 'My_App/iOS/obj/iPhone/Debug/build-iphone4.1-9.2.1/mtouch-cache/Build/AWSSDK.Core.dll' (MT3001) (My_App.iOS)
I would really appreciate some suggestions as I haven't made much headroom with this...
Try disabling "Linker" in the build options for Device builds. It's possible that if you are not directly referencing the library, the linker is stripping it out, causing it to fail at runtime.
I just had the same problem after switching from the simulator to an actual device
Fortunately, I've gotten the error only in 3 pages...
Fix was to remove the assembly attribute from the XAML:
From
xmlns:viewModels="clr-namespace:XXX.ViewModels;assembly=XXX"
To
xmlns:viewModels="clr-namespace:XXX.ViewModels"

keep getting this error when compiling xamarin android (mono for android) app

When I compile one of the Android code samples from Xamarin I get the following error on compile, what can I do to fix it?
C:\Program Files
(x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(3,3):
Error MSB4131: The "ResourceNameCaseMap" parameter is not supported by
the "AndroidComputeResPaths" task. Verify the parameter exists on the
task, and it is a gettable public instance property. (MSB4131) (Snake)
I fixed the problem, one I had to update my mono.android SDK. Second, thanks to the new update of the official android SDK, I had to change the location of the aapt.exe file and the lib directory so that it would build properly, it's working fine now.

Categories