Skip to content

Failure to bind AAR library that depends on AppCompat and uses camera API #1874

@DoDoENT

Description

@DoDoENT

Steps to Reproduce

  1. Create an AAR binding library as described in official documentation, but instead of example AAR, use AAR that depends on AppCompat and uses camera API, like for example BlinkID Android AAR.
  2. Try building the binding library
  3. It fails with these errors: xamarin.log

Reference AppCompat by adding package Xamarin.Android.Support.v7.AppCompat to the binding library, but this fails with following log:

Attempting to gather dependency information for package 'Xamarin.Android.Support.v7.AppCompat.27.0.2.1' with respect to project 'BlinkIDAARBinding', targeting 'MonoAndroid,Version=v4.1'
  GET https://api.nuget.org/v3/registration3-gz-semver2/xamarin.android.support.v7.appcompat/index.json
  OK https://api.nuget.org/v3/registration3-gz-semver2/xamarin.android.support.v7.appcompat/index.json 601ms
Total number of results gathered : 1
Gathering dependency information took 611.5 ms
Summary of time taken to gather dependencies per source :
https://api.nuget.org/v3/index.json	-	611.05 ms
Attempting to resolve dependencies for package 'Xamarin.Android.Support.v7.AppCompat.27.0.2.1' with DependencyBehavior 'Lowest'
Resolving dependency information took 0 ms
Resolving actions to install package 'Xamarin.Android.Support.v7.AppCompat.27.0.2.1'
Resolved actions to install package 'Xamarin.Android.Support.v7.AppCompat.27.0.2.1'
Retrieving package 'Xamarin.Android.Support.v7.AppCompat 27.0.2.1' from 'nuget.org'.
For adding package 'Xamarin.Android.Support.v7.AppCompat.27.0.2.1' to project 'BlinkIDAARBinding' that targets 'monoandroid41'.
Install failed. Rolling back...
Package 'Xamarin.Android.Support.v7.AppCompat.27.0.2.1' does not exist in project 'BlinkIDAARBinding'
Package 'Xamarin.Android.Support.v7.AppCompat.27.0.2.1' does not exist in folder '/Users/dodo/Work/Microblink/deployRepos/blinkid/blinkid-xamarin/Samples/BlinkID-Xamarin-Android/packages'
Executing nuget actions took 131.95 ms
Could not install package 'Xamarin.Android.Support.v7.AppCompat 27.0.2.1'. You are trying to install this package into a project that targets 'MonoAndroid,Version=v4.1', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.

Next thing I tried is to manually download AppCompat AAR and create another binding library for it, using the same instructions as for my original AAR, however when building this binding library, I get following errors in build log:

xamarin-appcompat.log

Expected Behavior

The created binding library should build and work.

Actual Behavior

See above.

Version Information

Visual Studio Community 2017 for Mac
Version 7.5.1 (build 22)
Installation UUID: af0c96ed-b55d-45fa-b2f3-1fef37c9d8af
Runtime:
Mono 5.10.1.47 (2017-12/8eb8f7d5e74) (64-bit)
GTK+ 2.24.23 (Raleigh theme)
Xamarin.Mac 4.4.1.178 (master / eeaeb7e6)

Package version: 510010047

NuGet
Version: 4.3.1.4445

.NET Core
Runtime: Not installed
SDK: Not installed
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/5.10.1/lib/mono/msbuild/15.0/bin/Sdks

Xamarin.Profiler
Version: 1.6.2
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

Apple Developer Tools
Xcode 9.4.1 (14161)
Build 9F2000

Xamarin.Mac
Version: 2.10.0.103 (Visual Studio Community)

Xamarin.iOS
Version: 11.10.1.178 (Visual Studio Community)
Hash: 408d3574
Branch: d15-7
Build date: 2018-05-08 18:56:30-0400

Xamarin.Android
Version: 8.3.0.19 (Visual Studio Community)
Android SDK: /Users/dodo/android-sdks
Supported Android versions:
4.1 (API level 16)
4.2 (API level 17)
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.0
SDK Build Tools Version: 28.0.0 rc2

Java SDK: /usr
java version "1.8.0_162"
Java(TM) SE Runtime Environment (build 1.8.0_162-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.162-b12, mixed mode)

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

Xamarin Inspector
Version: 1.4.0
Hash: b3f92f9
Branch: master
Build date: Fri, 19 Jan 2018 22:00:34 GMT
Client compatibility: 1

Build Information
Release ID: 705010022
Git revision: 60442dd643a20c7a4ae1f8705b8d1de8972eee78
Build date: 2018-05-15 01:43:39+00
Xamarin addins: 4194ffe4868321e4c3477bd56aed579bda4c6fbb

Operating System
Mac OS X 10.13.5
Darwin 17.6.0 Darwin Kernel Version 17.6.0
Tue May 8 15:22:16 PDT 2018
root:xnu-4570.61.1~1/RELEASE_X86_64 x86_64

Log File

Build logs attached above.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions