question

StewartBasterash-4096 avatar image
0 Votes"
StewartBasterash-4096 asked Lunjio commented

Visual Studio Missing Java Binding Library Project Template

I have recently run into an issue with a xamarin forms development. One solution I found was to add a java library (jar) to the project and use that functionality. All the documentation on MS Visual Studio begins with... Create a new "Java Bindings Library" project.

https://docs.microsoft.com/en-us/xamarin/android/platform/binding-java-library/binding-a-jar

Currently, my freshly installed version of Visual Studio does not have this template as it is described in multiple posts. I assumed that there was something missing from the selection and installation of VS 2019. This does not appear to be the case either. And, I have looked for a template download... Can someone provide some guidance? I need to link a java library to a xamarin forms project.

Thank you in advance...


dotnet-xamarin
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

ColeXia-MSFT avatar image
0 Votes"
ColeXia-MSFT answered MarkusJessl-4291 commented

Hello,

Welcome to Microsoft Q&A!

Android Class Library selection will be shown in Project Template if we select Mobile development with .NET in installer .

75337-2.png

I test on the latest visual studio for windows(16.9.0) , the template shows as expected .

75386-capture.png


I suggest you try to repair or update Visual Studio in installer .


If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.



2.png (43.9 KiB)
capture.png (27.0 KiB)
· 6
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

I have repaired the installation twice, and I do NOT have this project template available...

0 Votes 0 ·

Tried a repair... tried a full uninstall and reinstall... Still no project template for Android Binding Library Xamarin...
75319-vsversion.png


0 Votes 0 ·
vsversion.png (31.4 KiB)

Upon further review. I do believe that your installation of the Android Binding Library has to be a remnant of a previous install... I've tried a new installation of Visual Studio 16.90 Community and Professional on two different devices... I have also installed the 16.10 preview... None of these contain the Android Binding Library Project template...

Does anyone have an idea. I am in a bit of a crunch. I have known about the potential for linking a java script library for some time, but never needed it... Now, I have a project that requires me to use such a library, and I have no path to success...

0 Votes 0 ·
ColeXia-MSFT avatar image ColeXia-MSFT StewartBasterash-4096 ·

I test with 16.8.5 before , I will update vs to the latest and get you back .

0 Votes 0 ·

I did reproduce the issue on VS 16.9.0 and opened a issue here : https://github.com/xamarin/xamarin-android/issues/5714.

0 Votes 0 ·
Show more comments
MarkusJessl-4291 avatar image
0 Votes"
MarkusJessl-4291 answered

Same problem on my side.

I'm developing for an Xamarin Android app in VS 2019 and just now need to implement a 3rd party SDK which is only available as a .jar/.aar file.

I tried with VS 2019 and VS 2019 Preview:

75694-image.png

75599-image.png


However, the Android Binding Library is missing:

75722-image.png


Hope Microsoft can help us soon as this is currently slowing down our development.

Thx a lot.



image.png (10.5 KiB)
image.png (89.5 KiB)
image.png (27.9 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

ArthurNogueira-9746 avatar image
0 Votes"
ArthurNogueira-9746 answered ArthurNogueira-9746 published

Same problem here.

Updated VS to version 16.9.2 yesterday and can't find the template.

Is there any other way to import .aar files?

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

EricLira avatar image
0 Votes"
EricLira answered StewartACBasterash-5010 commented

I just updated to VS Community 16.9.2 and the same happen to me, and it's not only the binding template that is missing, Android class library is missing too.

I tried a repair and removing and reinstalling the mobile development tools but no luck.

I wonder if Microsoft has removed these templates from VS Communit. Has anyone running VS Professional had this issue?

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

I was pondering this very issue when I posted this originally... I uninstalled and reinstalled both Community and Professional on multiple computers and can no longer find the project type. The feature seems to no longer be present in VS. I have to assume that MS has, or is in the process of enhancing some other feature like JNI or something along those lines.

FYI... Some have posted that the feature remains if you upgrade from previous versions. The key would be to find a version that has the feature and then upgrade. If this is critical to your dev cycle, I would attempt looking for 6.8.x, or some earlier x.y.0 version... I love how MS provides us with these "opportunities" to waste time and energy. My day wouldn't be complete without excess hunting and pecking for dropped features.

0 Votes 0 ·
StewartACBasterash-5010 avatar image
1 Vote"
StewartACBasterash-5010 answered EricLira commented

Ladies and Gentlemen... Here is the solution...

https://github.com/xamarin/xamarin-android/issues/5714

Read down to where the individual talks about the options dialog in Visual Studio... Uncheck the "Show all .NET Core templates in the new project dialog"

PREFACE... UNCHECK!!!!

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thanks @StewartACBasterash-5010 , unmarking that preview option makes all the Android templates to show up again!

0 Votes 0 ·
Lunjio avatar image
0 Votes"
Lunjio answered Lunjio commented

Same problem here. after update on 16.9.2, there are no binding projects.

· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

See my previous post... or update to 16.9.3... It appears it is fixed in this version

0 Votes 0 ·
Lunjio avatar image Lunjio StewartACBasterash-5010 ·

I have already updated to 16.9.3, the issue is still actual

0 Votes 0 ·
Lunjio avatar image Lunjio StewartACBasterash-5010 ·

Sorry, missed about an uncheking option, thank you very much ! The problem is solved ))) on my way for solving other problems with appcenter

0 Votes 0 ·