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

Getting a "failed linking references" error when running an Android Project (Xamarin - Visual Studio 2022) #8902

Open
BantiPlayz opened this issue Apr 25, 2024 · 5 comments
Assignees
Labels
Area: Android Resources Issues with Android Resources (aapt, etc) needs-triage Issues that need to be assigned.

Comments

@BantiPlayz
Copy link

Android application type

Classic Xamarin.Android (MonoAndroid13.0, etc.)

Affected platform version

VS 2022

Description

I simply wanna test out this application: (https://github.com/bojibenji/Language-Learning-App-EZJapanese) on the android emulator but I keep getting several errors when doing so. I am new to Xamarin and C# Application development, but I just wanna experience running this specifically. So can anyone please show me the steps on how I can run this android application?

Steps to Reproduce

Solutions Attempted: Updating NuGet Packages, rebuilding solution, then I get error: "The $(TargetFrameworkVersion) for EasyJ.Android (v9.0) is less than the minimum required $(TargetFrameworkVersion) for Xamarin.Forms (10.0). You need to increase the $(TargetFrameworkVersion) for EasyJ.Android. ", I increased the TargetFrameworkVersion to 10.0, rebuild solution, back to the "failed linking references" and ocean of errors.

Did you find any workaround?

No response

Relevant log output

Severity	Code	Description	Project	File	Line	Suppression State
Error		resource style/Theme.AppCompat.Light.DarkActionBar (aka com.companyname.EasyJ:style/Theme.AppCompat.Light.DarkActionBar) not found.	EasyJ.Android			
Error		failed linking references.	EasyJ.Android			
Error		resource style/Theme.AppCompat.Light.Dialog (aka com.companyname.EasyJ:style/Theme.AppCompat.Light.Dialog) not found.	EasyJ.Android			
Error		style attribute 'attr/windowNoTitle (aka com.companyname.EasyJ:attr/windowNoTitle)' not found.	EasyJ.Android	D:\Storage\User\VisualStudio\Projects\Language-Learning-App-EZJapanese-master\EasyJ\EasyJ\EasyJ.Android\Resources\values\styles.xml	2	
Error		style attribute 'attr/colorPrimary (aka com.companyname.EasyJ:attr/colorPrimary)' not found.	EasyJ.Android	D:\Storage\User\VisualStudio\Projects\Language-Learning-App-EZJapanese-master\EasyJ\EasyJ\EasyJ.Android\Resources\values\styles.xml	2	
Error		style attribute 'attr/colorPrimaryDark (aka com.companyname.EasyJ:attr/colorPrimaryDark)' not found.	EasyJ.Android	D:\Storage\User\VisualStudio\Projects\Language-Learning-App-EZJapanese-master\EasyJ\EasyJ\EasyJ.Android\Resources\values\styles.xml	2	
Error		style attribute 'attr/windowActionBar (aka com.companyname.EasyJ:attr/windowActionBar)' not found.	EasyJ.Android	D:\Storage\User\VisualStudio\Projects\Language-Learning-App-EZJapanese-master\EasyJ\EasyJ\EasyJ.Android\Resources\values\styles.xml	2	
Error		style attribute 'attr/colorAccent (aka com.companyname.EasyJ:attr/colorAccent)' not found.	EasyJ.Android	D:\Storage\User\VisualStudio\Projects\Language-Learning-App-EZJapanese-master\EasyJ\EasyJ\EasyJ.Android\Resources\values\styles.xml	3	
Error		style attribute 'attr/windowActionModeOverlay (aka com.companyname.EasyJ:attr/windowActionModeOverlay)' not found.	EasyJ.Android	D:\Storage\User\VisualStudio\Projects\Language-Learning-App-EZJapanese-master\EasyJ\EasyJ\EasyJ.Android\Resources\values\styles.xml	4	
Error		style attribute 'attr/colorAccent (aka com.companyname.EasyJ:attr/colorAccent)' not found.	EasyJ.Android	D:\Storage\User\VisualStudio\Projects\Language-Learning-App-EZJapanese-master\EasyJ\EasyJ\EasyJ.Android\Resources\values\styles.xml	4
@BantiPlayz BantiPlayz added Area: App Runtime Issues in `libmonodroid.so`. needs-triage Issues that need to be assigned. labels Apr 25, 2024
@grendello grendello assigned dellis1972 and unassigned grendello Apr 25, 2024
@grendello grendello added Area: Android Resources Issues with Android Resources (aapt, etc) and removed Area: App Runtime Issues in `libmonodroid.so`. labels Apr 25, 2024
@dellis1972
Copy link
Contributor

I don't have the old Classic Xamarin.Android installed anymore (it goes out of support soon) so its difficult to test.
My guess is that the NuGet packages will need upgrading if you want to up the TargetFramework to 10.0.

@BantiPlayz
Copy link
Author

@dellis1972 I said I updated the NuGet packages though

@dellis1972
Copy link
Contributor

So its likely then that those resouces have moved to another package as part of the update. I'm not sure which one though.

@bulubuloa
Copy link

hi @BantiPlayz Did you have a solution for this

@yablos
Copy link

yablos commented May 27, 2024

This one helped:

"Make sure you have TargetFrameworkVersion=v13.0 in your Droid.csproj"
Previously, there was = v10
And that was all + all your mentioned(delete bin,obj, nuget...)

More possible hotfixes:
https://stackoverflow.com/questions/77539174/xamarin-forms-5-0-0-2622-compilation-error-about-styles-xml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Android Resources Issues with Android Resources (aapt, etc) needs-triage Issues that need to be assigned.
Projects
None yet
Development

No branches or pull requests

5 participants