Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Abstract class not being converted properly in android Native binding(.aar) #503

Closed
shaikhawais opened this issue Jan 13, 2019 · 2 comments
Labels
bug Component does not function as intended generator Issues binding a Java library (generator, class-parse, etc.)

Comments

@shaikhawais
Copy link

I have come across a problem while binding .AAR library in Xamarin.Android.
There is an abstract class in library which implements an interface.
Now the problem is, it seems it is not mandatory in java to implement members of interface in abstract class because it will be implemented in the class which implements that abstract class. Whereas in c#,it is mandatory for abstract class to implement members of an interface either abstractly or explicitly.

Sample

public interface MyInterface 
{
void myMethod();
}

Java -

public abstract class MyAbstractClass implements MyInterface
{
//not necessary to implement 'MyInterface' members here..
}

C# -

public abstract class MyAbstractClass implements MyInterface
{
//Necessary to implement 'MyInterface' members here..
//public abstract void myMethod(); OR public void myMethod(){ };
}

Expected Behavior

It should abstractly implement the methods of interface in abstract class while creating bindings in c#

Actual Behavior

It gives error that MyAbstractClass does not implement interface members

Please look into this and reply I have been stuck in it for days

=== Visual Studio Community 2017 for Mac ===

Version 7.7.1 (build 15)
Installation UUID: a43d8067-d536-4a8d-a3fd-e10613bb1d9c
GTK+ 2.24.23 (Raleigh theme)
Xamarin.Mac 4.4.1.178 (master / eeaeb7e6)

Package version: 516000221

=== Mono Framework MDK ===

Runtime:
Mono 5.16.0.221 (2018-06/b63e5378e38) (64-bit)
Package version: 516000221

=== NuGet ===

Version: 4.7.0.5148

=== .NET Core ===

Runtime: /usr/local/share/dotnet/dotnet
Runtime Versions:
2.1.2
2.0.5
SDK: /usr/local/share/dotnet/sdk/2.1.302/Sdks
SDK Versions:
2.1.302
2.1.4
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/5.16.0/lib/mono/msbuild/15.0/bin/Sdks

=== Xamarin.Profiler ===

'/Applications/Xamarin Profiler.app' not found

=== Xamarin.Android ===

Version: 9.1.0.38 (Visual Studio Community)
Android SDK: /Users/shaikhawais/Library/Developer/Xamarin/android-sdk-macosx
Supported Android versions:
2.3 (API level 10)
4.0.3 (API level 15)
4.4 (API level 19)
5.0 (API level 21)
5.1 (API level 22)
6.0 (API level 23)
7.0 (API level 24)
7.1 (API level 25)
8.0 (API level 26)
8.1 (API level 27)

SDK Tools Version: 26.1.1
SDK Platform Tools Version: 28.0.1
SDK Build Tools Version: 26.0.0

Java SDK: /Users/shaikhawais/Library/Developer/Xamarin/jdk/microsoft_dist_openjdk_1.8.0.9
openjdk version "1.8.0-9"
OpenJDK Runtime Environment (build 1.8.0-9-microsoft-b00)
OpenJDK 64-Bit Server VM (build 25.71-b00, mixed mode)

Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

=== Android Device Manager ===

Version: 7.7.1.0
Hash: 06ceaea1

=== Xamarin Inspector ===

Version: 1.4.3
Hash: db27525
Branch: 1.4-release
Build date: Mon, 09 Jul 2018 21:20:18 GMT
Client compatibility: 1

=== Apple Developer Tools ===

Xcode 10.1 (14460.46)
Build 10B61

=== Xamarin.Mac ===

Version: 5.2.1.11 (Visual Studio Community)
Hash: 5ef73d34
Branch:
Build date: 2018-11-21 00:03:25-0500

=== Xamarin.iOS ===

Version: 12.2.1.11 (Visual Studio Community)
Hash: 5ef73d34
Branch: d15-9
Build date: 2018-11-21 00:03:24-0500

=== Build Information ===

Release ID: 707010015
Git revision: a7ca4daaf7add8fe05ed137fdd51bd9eb77758a7
Build date: 2018-12-05 20:15:35+00
Build branch: release-7.7
Xamarin extensions: 40f5fc1b44727b10b1e7bb1ada3aae33516569ce

=== Operating System ===

Mac OS X 10.14.0
Darwin 18.0.0 Darwin Kernel Version 18.0.0
Wed Aug 22 20:13:40 PDT 2018
root:xnu-4903.201.2~1/RELEASE_X86_64 x86_64

=== Enabled user installed extensions ===

Prism Template Studio and Developer Toolkit 2.2.0.203

@shaikhawais
Copy link
Author

any update??

@jpobst jpobst transferred this issue from dotnet/android Oct 8, 2019
@jpobst jpobst added bug Component does not function as intended generator Issues binding a Java library (generator, class-parse, etc.) labels Apr 6, 2020
@jonpryor
Copy link
Member

I consider this bug to be covered by #359 (comment)

@github-actions github-actions bot locked and limited conversation to collaborators Apr 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Component does not function as intended generator Issues binding a Java library (generator, class-parse, etc.)
Projects
None yet
Development

No branches or pull requests

3 participants