Unable to init ZXing on Android platform - Xamarin Forms application - android

I am wondering if someone can help with my problem of initializing ZXing barcode reader on Android platform in my Xamarin Form application.
I successfully added ZXing.Net.Mobile and ZXing.Net libraries but when I try to initialize ZXing library on Android platform with the following code:
global::ZXing.Net.Mobile.Forms.Android.Platform.Init();
It failes to find the required classes with error:
The type or namespace name 'Net' does not exist in the namespace 'ZXing' (are you missing an assembly reference?)
My references for Android project:
Has anyone encountered a similar problem?

I have updated ZXing.Net.Mobile and ZXing.Net.Mobile.Forms libraries to version 2.1.0-beta1 and problem has been resolved.

Related

How to effectively add dependency .aar file in Xamarin project?

I am trying to create a Xamarin project using PayTM android library. Since PayTM doesn't have a direct Xamarin binding I have added the appinvokesdk-1.2.aar in the Xamarin Android Biding library project. The build action for appinvoke is "LibraryProjectZip". Now the appinvoke library also have a runtime dependency on easypay-8.7.3-appinvoke.aar (I found this after checking the pom file for appinvoke.aar file). I have set the build action for the easypay aar file as "EmbdedJar". I have also tried setting it to "LibraryProjectZip","ReferenceJar" and "EmbeddedReferenceJar". During runtime I am getting the error as
Java.Lang.ClassNotFoundException: Didn't find class "easypay.listeners.WebClientListener" on path: DexPathList[[zip file "/data/app/com.edmatix.poc.paytmdemo1-WQf3uMctjbNHoAG_ZfsH3A==/base.apk"],nativeLibraryDirectories=[/data/app/com.edmatix.poc.paytmdemo1-WQ…}
Here is my environment details
Visual Studio for Mac 8.5.4 (Build 12)
AndroidX assemblies
Xamarin.Form 4.6.0.726
Android Minimum API version 22
Android Target API 28 (Android 9)
the class easypay.listeners.WebClientListener is only required during run time and not during compile time.
Can you please help about how to properly embed the dependency library?
Thanks
so this is what I did to solve the issue of missing .aar file during runtime. I added the second .aar file (easypay-8.7.3-appinvoke.aar) into another Xamarin binding project (as shown in here) and set the compile type as LibraryProjectZip. And that solved my issue with not finding the class in runtime.
Thanks
Please try to install Xamarin.Kotlin.StdLib in your Xamarin Android project. Installing the Kotlin package worked for me because I was using the .aar file which contains Kotlin code.
Install-Package Xamarin.Kotlin.StdLib -Version 1.3.50.1

How to get Sqlite.net extensions working?

I'm struggling to use Sqlite.net Extensions in my Xamarin Android app.
I get the exeption:
Don't know about System.Collections.Generic.List`1 [app_name.Model.modelName]
The problem is similar to:
Sqlite extension is not working as expected
and
Use SQLiteNetextensions with Xamarin for Android-App
but the answers from there are not working for me and I can't add comments, so I have to start a new question.
I was trying to install different sqlite.net extensions packages and got no result.
Using SQLite.Net Extensions-PCL 2.0.0-alpha2 gives me such exeption:
System.IO.FileNotFoundException: Could not load assembly 'SQLite.Net, Version=3.0.5.0, Culture=neutral, PublicKeyToken='. Perhaps it doesn't exist in the Mono for Android profile?
I'm using Sql-net library:
https://www.nuget.org/packages/sqlite-net-pcl/
Does anyone has a final solution to this problem, please?
Edit:
I had to create a new project and paste everything in from the old one.
I don't think that answers the issue, but it's enough for me...
I'm using Sql-net library:
https://www.nuget.org/packages/sqlite-net-pcl/
The link here you give is the right lib, but you really installing this package? Cause you also said that you're installing SQLite.Net Extensions-PCL 2.0.0-alpha2.
Please try to install the package in the following screenshot, the latest stable version is 1.3.3:

Xamarin Target named 'SignAndroidPackage' not found in the project

I am building a android binding project on xamarin studio which builds successfully. However when i include the same in a test project (from reference), I am facing error [Target names SignAndroidPackage not found in the project] in the binding library project. I tried setting up signing keys but no luck.
Any pointers how i can resolve this issue?
Thanks in advance

Project does not see namespace "ZBar" Xamarin.Android

I have some problems with binding ZBar Android library in Xamarin.
I follow this tutorial -
http://docs.xamarin.com/guides/android/advanced_topics/java_integration_overview/binding_a_java_library_%28.jar%29/
After I fix all errors, I create test project. In test project I add reference on binding project.
And there is problem - test project does not see namespace of generated binding project.
How to fix this??
Is there any sample with Zbar on Xamarin??
UPDATE:
Resolve this problem. Visual Studio can't correct bind java library.
Use Xamarin Studio to do this.
Resolve this problem. Visual Studio can't correct bind java library. Use Xamarin Studio to do this.

Integrating Unity and Eclipse

I've struggled integrating Unity and Android in Eclipse.
I was following [these steps.][1]
Importing the unity project as a library, compiler tells me there is no a file in my Android project: com.unity3d.player.unityplayerproxyactivity.jar
Error: The container 'Android Dependencies' references non existing library 'D:\Work\Unity Projects\Tutorials\UnityProjectLibaray\StagingArea\bin\com.unity3d.player.unityplayerproxyactivity.jar'
Help me. I would appreciate it.
Have you maybe considered using the Unity2Eclipse plugin in the Asset Store?

Categories

Resources