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

cannot access ListenableFuture #27

Closed
Abesoddy opened this issue Jun 27, 2019 · 9 comments
Closed

cannot access ListenableFuture #27

Abesoddy opened this issue Jun 27, 2019 · 9 comments
Assignees
Labels
Android Android only issue Configuration Issue Configuration Issue

Comments

@Abesoddy
Copy link

Hello,

I have this error on the project Xamarin.Froms.Android with version 4.0.3 :

Error: error: cannot access ListenableFuture public class ScheduledNotificationWorker class file for com.google.common.util.concurrent.ListenableFuture not found

Does this come from the plugin or an implementation error?

@Abesoddy Abesoddy added the bug Something isn't working label Jun 27, 2019
@thudugala
Copy link
Owner

thudugala commented Jun 27, 2019

Can you please attach a sample project?

Also try enabling Multi-Dex

This error is coming for Plugin dependency Xamarin.Android.Arch.Work.Runtime

@thudugala thudugala added Configuration Issue Configuration Issue and removed bug Something isn't working labels Jun 28, 2019
@tranb3r
Copy link

tranb3r commented Jul 4, 2019

@thudugala @Abesoddy

I'm having the same build error when attempting to build the sample project (Nuget) for Android.

However, the error only appears when using visual studio preview:

  • with Visual Studio 2019 16.1.4 (xamarin sdk 9.3.0.23): no error on build
  • with Visual Studio 2019 16.2.0 preview 3.0 (xamarin sdk 9.4.0.4): build error (cannot access ListenableFuture).

Any idea for fixing it ? Is it related to a known issue in the VS preview ? Is there a workaround ? Or maybe this is something new that should be reported to the VS team ?

It could be worth re-opening this issue until we have a full resolution.

@thudugala thudugala reopened this Jul 4, 2019
@tranb3r
Copy link

tranb3r commented Jul 13, 2019

Any progress on that one ?

@tranb3r
Copy link

tranb3r commented Jul 22, 2019

Same issue with the new preview: Visual Studio 2019 16.2.0 preview 4.0 (xamarin android sdk 9.4.0.51)

@thudugala
Copy link
Owner

@tranb3r Can you try referencing Xamarin.Android.Arch.Work.Runtime in your android project ?

@tranb3r
Copy link

tranb3r commented Jul 23, 2019

@tranb3r Can you try referencing Xamarin.Android.Arch.Work.Runtime in your android project ?

Same error (tested with the sample project (nuget)).

@pikausp
Copy link
Contributor

pikausp commented Jul 24, 2019

Possibly related to dotnet/android#3343?

@thudugala
Copy link
Owner

https://docs.microsoft.com/en-nz/xamarin/android/release-notes/9/9.4#known-issues-in-xamarinandroid-94051

Workaround:
Add the following lines to the bottom of your app project's .csproj file (just before the closing tag):

<Target Name="FixGuava" AfterTargets="_AddAndroidCustomMetaData">
  <ItemGroup>
    <_MonoAndroidReferencePath Include="@(_ReferencePath);@(_ReferenceDependencyPaths)" Condition=" '%(Filename)' == 'Xamarin.Google.Guava.ListenableFuture' " />
  </ItemGroup>
</Target>

@thudugala thudugala added Android Android only issue bug Something isn't working labels Jul 29, 2019
@thudugala
Copy link
Owner

Issue seems to be fixed in VS 16.2.1 (Xamarin.Android 9.4.1.0)

@thudugala thudugala removed the bug Something isn't working label Aug 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Android Android only issue Configuration Issue Configuration Issue
Projects
None yet
Development

No branches or pull requests

4 participants