Visual Studio Version:
14.0.25431.01 Update 3
Xamarin.Android Version:
7.0.2.42
Xamarin Forms Version:
Tried 2.3.3.193, 2.3.4.192-pre2 & 2.3.3.180.
Operating System & Version:
Win 10 Pro ver. 1607 build 14393.693
Google Play Services Version:
Xamarin.GooglePlayServices.Awareness ver. 42.1001.0
Describe your Issue:
Xamarin.GooglePlayServices.Awareness doesn't work with Xamarin Forms.
Error:
C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2072,3): error MSB6006: "java.exe" exited with code 2
Steps to Reproduce:
Create a blank Xamarin Forms project & use Xamarin.GooglePlayServices.Awareness as described in Xamarin's blog post.
This error often caused by dex methods count limits. You should turn on "MultiDex" support in android project settings. Also you should update ProGuard in Android SDK (see Xamarin.Android release notes - https://developer.xamarin.com/releases/android/xamarin.android_7/xamarin.android_7.1/)
Related
We have installed CerfSharp using the NuGet Pakage Manager and created a class library which loads a ChromiumWebBrowser, it works fine on VisualStudio-2019,
When we deployed the class library(DLL) into target location along with required cefsharp supported files as mentioned the readme.txt, which throws following exception
Error Message: Could not load file or assembly 'CefSharp.Core.Runtime.DLL' or one of its dependencies. The specified module could not be found.
Stack Trace: at CefSharp.Cef.get_IsInitialized()
could anyone help us on this issue?
Added following cefsharp supported files in the target deployment location:
CEF core library.
libcef.dll
Crash reporting library.
chrome_elf.dll
Unicode support data.
icudtl.dat
V8 snapshot data.
snapshot_blob.bin
v8_context_snapshot.bin
[System Info]:
CefSharp Version=91.1.230.0
OS: Windows 7 x64
Visual Studio Version:
Microsoft Visual Studio Enterprise 2019
Version 16.7.8
.NET Framework: 4.8
Thanks,
SQLite.Net.Standard is not working in Android 8 in Xamarin Forms.
What is the alternative ?
I installed SQLIte.Net.Standard but found i was getting "Unhandled Exception: System.DllNotFoundException: /system/lib/libsqlite.so occurred" at runtime.
Further reading indicated that starting with Android 7, access to this lib was removed or restricted. Supposedly the fix was using a different Nuget package.
SQLite.Net.Platform.XamarinAndroidN
I use the alternative NuGet Package sqlite-net from praeclarum with Android 8 + 9 devices and had no problems so far.
Usage:
var db = new SQLiteConnection(Path.Combine(dbPath, dbFile));
db.CreateTable<YourModel>();
var yourObject = new YourModel();
db.Insert(yourObject);
When I try to open the Firebase assistent in Tools > Firebase an IDE Error occurs.
I've already tried to reinstall the Google Repository needed for this tool, reactivating the firebase plugins, and also reinstalled Android Studio (though without deleting all user settings).
Android Studio 3.1.3
Build #AI-173.4819257, built on June 4, 2018
JRE: 1.8.0_152-release-1024-b02 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0
IDE Error:
Exeption in plugin Firebase Services. Moments ago. Occured 2 times since last clear. Undread. Disable Plugin.
null
java.util.NoSuchElementException
at com.google.common.collect.Iterators$1.next(Iterators.java:81)
at com.google.services.firebase.DependencyStateManager.getDependencyState(DependencyStateManager.java:60)
at com.google.services.firebase.DependencyStateManager.init(DependencyStateManager.java:109)
at com.android.tools.idea.assistant.view.StatefulButton.<init>(StatefulButton.java:122)
at com.android.tools.idea.assistant.view.TutorialStep.<init>(TutorialStep.java:106)
at com.android.tools.idea.assistant.view.TutorialCard.redraw(TutorialCard.java:153)
at com.android.tools.idea.assistant.view.TutorialCard.<init>(TutorialCard.java:90)
at com.android.tools.idea.assistant.view.FeaturesPanel.<init>(FeaturesPanel.java:84)
at com.android.tools.idea.assistant.AssistSidePanel.<init>(AssistSidePanel.java:81)
at com.android.tools.idea.assistant.AssistToolWindowFactory.createToolWindowContent(AssistToolWindowFactory.java:37)
at com.android.tools.idea.assistant.OpenAssistSidePanelAction.lambda$openWindow$0(OpenAssistSidePanelAction.java:59)
at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:315)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.runNextEvent(LaterInvocator.java:424)
at com.intellij.openapi.application.impl.LaterInvocator$FlushQueue.run(LaterInvocator.java:407)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:762)
at java.awt.EventQueue.access$500(EventQueue.java:98)
at java.awt.EventQueue$3.run(EventQueue.java:715)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:732)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:822)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:650)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:366)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
A quick search brought up the following procedure to fix the issue:
go to Settings > Plugins.
remove all Firebase plugins.
restart Android Studio.
back to Settings > Plugins.
enable the Firebase plugins again.
restart Android Studio.
I m having 2 version of VS2017 and a mac with latest macOS.
I transfer my Xamarin forms App file from VS2017 enterprise to a machine(more than 3 years old but running win10 pro) with VS2017 Community version. When I debug ( with selecting Android project and VS-android-23 X86 tablet as emulator ) this App in VS2017 Community version , I have no compilation error but have these message:
Found conflicts between different versions of the same dependent assembly
that could not be resolved.
These reference conflicts are listed in the build log when log verbosity is set to detailed.
I could not understand this message. I have no problem running the same app in VS2017 Enterprize ver but I have this error message in VS2017 Community ver.
Update
Click View > Output --> this will show the error
1>Starting deploy VisualStudio_android-23_x86_tablet ...
1>Starting emulator VisualStudio_android-23_x86_tablet ...
1>C:\Users\xxxxx\AppData\Local\Android\ANDROI~1\tools\emulator.EXE -partition-size 512 -no-boot-anim -avd VisualStudio_android-23_x86_tablet -prop monodroid.avdname=VisualStudio_android-23_x86_tablet
1>emulator: ERROR: x86 emulation currently requires hardware acceleration!
1>Please ensure Intel HAXM is properly installed and usable.
1>CPU acceleration status: Please disable Hyper-V before using the Android Emulator. Start a command prompt as Administrator, run 'bcdedit /set hypervisorlaunchtype off', reboot.
1>Emulator VisualStudio_android-23_x86_tablet cannot be started.
Please help.
I am receiving the following error on iOS and Android project. Anybody has any workaround for this issue? This post recommends a workaround but the steps are vague.
C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2,2): Error: Exception while loading assemblies: System.IO.FileNotFoundException: Could not load assembly 'Microsoft.Threading.Tasks, Version=1.0.12.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. Perhaps it doesn't exist in the Mono for Android profile?
File name: 'Microsoft.Threading.Tasks.dll'
at Xamarin.Android.Tuner.DirectoryAssemblyResolver.Resolve(AssemblyNameReference reference, ReaderParameters parameters)
at Xamarin.Android.Tasks.ResolveAssemblies.AddAssemblyReferences(ICollection1 assemblies, AssemblyDefinition assembly, Boolean topLevel)
at Xamarin.Android.Tasks.ResolveAssemblies.AddAssemblyReferences(ICollection1 assemblies, AssemblyDefinition assembly, Boolean topLevel)
at Xamarin.Android.Tasks.ResolveAssemblies.Execute() (Braemar.Vers.Mobile.Droid)
I think that these two paths should have this file but I couldn't find it.
C:\Program Files (x86)\Reference
Assemblies\Microsoft\Framework\MonoAndroid\v1.0
C:\Program Files (x86)\Reference
Assemblies\Microsoft\Framework\MonoTouch\v1.0
Xamarin Studio:
Version 5.10.2 (build 56)
Installation UUID: 88f72eda-5030-43e9-8d1b-7658e8a17627
Runtime:
Microsoft .NET 4.0.30319.42000
GTK+ 2.24.23 (MS-Windows theme)
GTK# 2.12.30
Xamarin.Android:
Version: 6.0.1.10 (Business Edition)
Android SDK: C:\Android\android-sdk
Supported Android versions:
2.3 (API level 10)
4.0.3 (API level 15)
4.1 (API level 16)
4.2 (API level 17)
4.3 (API level 18)
4.4 (API level 19)
4.4.87 (API level 20)
5.0 (API level 21)
5.1 (API level 22)
6.0 (API level 23)
SDK Tools Version: 24.4.1
SDK Platform Tools Version: 23.1.0 rc1
SDK Build Tools Version: 23.0.2
Java SDK: C:\Program Files (x86)\Java\jdk1.7.0_71
java version "1.7.0_71"
Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
Java HotSpot(TM) Client VM (build 24.71-b01, mixed mode, sharing)
Build Information:
Release ID: 510020056
Git revision: bb74ff467c62ded42b7b7ac7fdd2edc60f8647b0
Build date: 2016-01-26 15:49:39-05
Xamarin addins: 8b797d7ba24d5abab226c2cf9fda77f666263f1b
Build lane: monodevelop-windows-cycle6-c6sr1
Operating System:
Windows 10.0.10586.0 (64-bit)
Project Information:
PCL 4.5 - Profile 7
I had such problem. It was caused by missing nuget packages in Droid project. Some of my subprojects referenced packages which had "Microsoft.Threading.Tasks" in references (PCLStorage, Restsharp portable). But in main Droid project I did not added this packages. After adding missing packages (PCLStorage, Restsharp portable) to Droid everything started work.
Is there any reason you are using Profile7?
I would recommend you create a project with profile 259, that is the default one for Xamarin Forms projects.
Otherwise you need to get a reference to that DLL. Normally I try installing the BCL NuGet package as my first port of call, but it might not be included in there: https://www.nuget.org/packages/Microsoft.Bcl/
Update
If you are having linker issues, you can skip certain assemblies: https://developer.xamarin.com/guides/ios/advanced_topics/linker/#Skipping_Assemblies
Sometimes the linker is more aggressive than anticipated.
I had the same problem.
Right click and select Options for the Android project.
Go to Build->General and uncheck "Use MSBuild build engine (recommended for this project type)"
Now I could build again!