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

Could not find Android Resource.. #19645

Open
South2AK opened this issue Jan 2, 2024 · 13 comments
Open

Could not find Android Resource.. #19645

South2AK opened this issue Jan 2, 2024 · 13 comments
Labels
platform/android 🤖 s/needs-attention Issue has more information and needs another look s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working

Comments

@South2AK
Copy link

South2AK commented Jan 2, 2024

Description

Could not find Android Resource '@styleable/SKCanvasView'. Please update to add the missing resource.

Could not find Android Resource '@styleable/SKCanvasView_ignorePixelScaling'. Please update @(AndroidResource) to add the missing resource.

Debugging works every second time (when the error occurs and I Debug again it works
Building a project works also
Rebuilding doesn´t work anymore at all

I already deleted the Bin / Obj Folders, cleaned the project but nothing worked.

I also did uninstsall SkiaSharp from Nuget Packager to see if there is any difference but to no avail.

Steps to Reproduce

No response

Link to public reproduction project repository

No response

Version with bug

8.0.3

Is this a regression from previous behavior?

No, this is something new

Last version that worked well

Unknown/Other

Affected platforms

Android

Affected platform versions

No response

Did you find any workaround?

No response

Relevant log output

No response

@South2AK South2AK added the t/bug Something isn't working label Jan 2, 2024
@Redth Redth added the s/needs-repro Attach a solution or code which reproduces the issue label Jan 2, 2024
@ghost
Copy link

ghost commented Jan 2, 2024

Hi @South2AK. We have added the "s/needs-repro" label to this issue, which indicates that we require steps and sample code to reproduce the issue before we can take further action. Please try to create a minimal sample project/solution or code samples which reproduce the issue, ideally as a GitHub repo that we can clone. See more details about creating repros here: https://github.com/dotnet/maui/blob/main/.github/repro.md

This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

@ghost ghost added the s/no-recent-activity Issue has had no recent activity label Jan 8, 2024
@ghost
Copy link

ghost commented Jan 8, 2024

This issue has been automatically marked as stale because it has been marked as requiring author feedback to reproduce the issue but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. If it is closed, feel free to comment when you are able to provide the additional information and we will re-investigate.

@arsovskim
Copy link

I have update target framework from net6.0-android33.0 to net8.0-android34.0 and I have the same issue.
The error is: Could not find Android Resource '@styleable/SKCanvasView'. Please update @(AndroidResource) to add the missing resource.

@ghost ghost added s/needs-attention Issue has more information and needs another look and removed s/needs-repro Attach a solution or code which reproduces the issue s/no-recent-activity Issue has had no recent activity labels Jan 8, 2024
@guypld
Copy link

guypld commented Jan 9, 2024

Also happens here.

Steps to Reproduce:

  1. Create new Maui project (.net 8)
  2. Add "Particle.Maui" nuget

nothing further.

@netstart188
Copy link

<assembly fullname="SkiaSharp.Views.Android">
	<namespace fullname="SkiaSharp.Views.Android" />
</assembly>

@kennykanp
Copy link

I have the same error 😞:

Severity	Code	Description	Project	File	Line	Suppression State	Details
Error	XA8000	Could not find Android Resource '@styleable/SKCanvasView_ignorePixelScaling'. Please update @(AndroidResource) to add the missing resource.	DigSig.AppVerifier	C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\34.0.52\tools\Xamarin.Android.Common.targets	1458		
Severity	Code	Description	Project	File	Line	Suppression State	Details
Error	XA8000	Could not find Android Resource '@styleable/SKCanvasView'. Please update @(AndroidResource) to add the missing resource.	DigSig.AppVerifier	C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\34.0.52\tools\Xamarin.Android.Common.targets	1458		
1>C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\34.0.52\tools\Xamarin.Android.Common.targets(1458,3): error XA8000: Could not find Android Resource '@styleable/SKCanvasView'. Please update @(AndroidResource) to add the missing resource.
1>C:\Program Files\dotnet\packs\Microsoft.Android.Sdk.Windows\34.0.52\tools\Xamarin.Android.Common.targets(1458,3): error XA8000: Could not find Android Resource '@styleable/SKCanvasView_ignorePixelScaling'. Please update @(AndroidResource) to add the missing resource.

@milesring
Copy link

milesring commented Feb 2, 2024

When upgrading from .NET 6 to .NET 8 on my project using outdated packages. I had to add

<declare-styleable name='SKCanvasView'> <attr name='ignorePixelScaling' format='boolean'/> </declare-styleable>

to Platforms/Android/Resources/values/attrs.xml to get the project to build and deploy.

After updating all packages, I was getting the issue mentioned in OP. I removed this from attrs.xml and stopped getting the error.

Edit: It seems to work sometimes and not work other times, as OP.
Here is where the original fix was that worked for me.
mono/SkiaSharp#2444 (comment)

@jbtdevgit
Copy link

jbtdevgit commented Feb 25, 2024

Still exists with 8.07 Maui.. Make sure to change the attrs.xml build action to AndroidResource

@Ghostbird
Copy link
Contributor

Ghostbird commented Mar 11, 2024

I have this intermittently. If it happens, my solution won't build for an hour or so, and then it will start building again. There must be some caching involved, but it isn't related to the obj or bin folder, because removing those entirely doesn't change it.

Also, it only starts when I make a clean build, on my local machine (Debian Linux), and never in CI (also Debian Linux).

@ninachen03
Copy link
Collaborator

Verified this issue with Visual Studio 17.10.0 Preview 2 (8.0.14 &8.0.0-rc.2.9530). Can repro it
image

@ninachen03 ninachen03 added s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed labels Apr 1, 2024
@Ghostbird
Copy link
Contributor

Sometimes running dotnet clean (which doesn't clean everything) helps me resolve this error when it occurs.

@samirgcofficial
Copy link
Contributor

samirgcofficial commented Apr 29, 2024

Updating the <PackageReference Include="LiveChartsCore.SkiaSharpView.Maui" Version="2.0.0-rc2" />fixed the issue

@Flaszlo1
Copy link

It seems, if you install this package:
SkiaSharp.Views.Maui.Controls.Compatibility, solves the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform/android 🤖 s/needs-attention Issue has more information and needs another look s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests