Closed sgong-pdftron closed 6 years ago
Assigned to @Redth
This should be addressed in the next preview.
Unfortunately IOnTabSelectedListener
's methos were moved to a new base interface (IBaseOnTabSelectedListener
) which isn't ABI compatible from a .NET standpoint. We basically changed the bindings so that IBaseOnTabSelectedListener
is still the old name, and the new 'parent' type has a new name. This should bring us back to compatibility.
This will go out in either -preview6 or preview7
Thank you very much @Redth Do you mind sharing when the preview with this fix will be available?
Should be sometime today or tomorrow.
Hi @Redth
I tried today's preview6. However The binding project is unable to build due to the following error:
1>Build FAILED. 1> 1>"D:\TrunkXamarin2\PDFNetXamarin\lib\android\Native\Tools\binding\PDFViewCtrlTools.csproj" (Build;BuiltProjectOutputGroup;BuiltProjectOutputGroupDependencies;DebugSymbolsProjectOutputGroup;DebugSymbolsProjectOutputGroupDependencies;DocumentationProjectOutputGroup;DocumentationProjectOutputGroupDependencies;SatelliteDllsProjectOutputGroup;SatelliteDllsProjectOutputGroupDependencies;SGenFilesOutputGroup;SGenFilesOutputGroupDependencies target) (1) -> 1>(_VerifyXamarinAndroidSupportVersions target) -> 1> D:\TrunkXamarin2\PDFNetXamarin\projectSrc\PDFNetAndroidXamarin\packages\Xamarin.Android.Support.Annotations.28.0.0-preview6\build\monoandroid90\Xamarin.Android.Support.Annotations.targets(14,3): error MSB4044: The "VerifyVersionsTask" task was not given a value for the required parameter "AndroidSdkBuildToolsVersion". 1> 1> 0 Warning(s) 1> 1 Error(s) 1>
Is there any configuration change needed to be able to use the new version? Thanks!
@sgong-pdftron are you able to provide us with your solution that is showing this error?
Thanks
@Redth Here is a sample project: http://pdftron.s3.amazonaws.com/custom/external/xamarin/to-xamarin.zip
Steps:
Hope this helps! Thanks!
@Redth just wanted to check in to see if there is anything I can do to fix this error? Thanks!
@moljac just wanted to check in to see if there is anything I can do to fix this error? Thanks!
Would you be able to share your solution with us which exhibits this issue? For some reason the msbuild property expected is not being set.
@Redth Yes, I posted my solution in this comments: https://github.com/xamarin/AndroidSupportComponents/issues/124#issuecomment-437524874
Were you able to run?
Or for some reason you are not able to see the project I linked? (i.e. link got filtered on your end or something?)
Hey @sgong-pdftron so it looks to be a bug in xamarin-android.
The msbuild property AndroidSdkBuildToolsVersion
is not set for Xamarin.Android binding projects.
You can work around this for now by manually setting the property in your binding .csproj:
<PropertyGroup>
<AndroidSdkBuildToolsVersion Condition="'$(AndroidSdkBuildToolsVersion)' == ''">28.0.3</AndroidSdkBuildToolsVersion>
</PropertyGroup>
Please make sure you actually specify the version of build tools that you have installed in the SDK manager, and given that you're working on Support Library 28.x, this should probably be a 28.x version of the build tools to match.
You can track the upstream issue here: https://github.com/xamarin/xamarin-android/issues/2452
@Redth your workaround works!! Thank you very much!
Xamarin.Android Version (eg: 6.0):
9.0
Operating System & Version (eg: Mac OSX 10.11):
Windows 10
Support Libraries Version (eg: 23.3.0):
Upgrade from 27.0.2 -> 28.0.0
Describe your Issue:
When bind an Android library zip from Java to Xamarin, getting the following error:
Java.Lang.NoSuchMethodError: No virtual method addOnTabSelectedListener(Landroid/support/design/widget/TabLayout$BaseOnTabSelectedListener;)V in class Landroid/support/design/widget/TabLayout; or its super classes (declaration of 'android.support.design.widget.TabLayout' appears in /data/app/com.pdftron.pdf.viewer-1/base.apk)
Steps to Reproduce (with link to sample solution if possible):
Include any relevant Exception Stack traces, build logs, adb logs:
11-05 17:37:26.641 D/AndroidRuntime(23006): Shutting down VM Unhandled Exception:
Java.Lang.NoSuchMethodError: No virtual method addOnTabSelectedListener(Landroid/support/design/widget/TabLayout$BaseOnTabSelectedListener;)V in class Landroid/support/design/widget/TabLayout; or its super classes (declaration of 'android.support.design.widget.TabLayout' appears in /data/app/com.pdftron.pdf.viewer-1/base.apk)