Reputation: 14320
I'll build a Xamarin application but when I start the build for the Android project, The compiler gives me 9 errors:
9 errors: No resource found that matches the given names:
attr windowNoTitle
attr colorPrimaryDark
attr windowActionBar
attr windowActionModeOverlay
attr colorAccent
attr colorPrimary
attr colorAccent
Theme.AppCompat.Light.Dialog
Theme.AppCompat.Light.DarkActionBar
Notes: The Errors happens in the file styles.xml
in the Project.Droid
project.
Here you can find the styles.xml
file:
<?xml version="1.0" encoding="utf-8" ?>
<resources>
<style name="MainTheme" parent="MainTheme.Base">
</style>
<style name="MainTheme.Base" parent="Theme.AppCompat.Light.DarkActionBar">
<item name="windowNoTitle">true</item>
<item name="windowActionBar">false</item>
<item name="colorPrimary">#2196F3</item>
<item name="colorPrimaryDark">#1976D2</item>
<item name="colorAccent">#FF4081</item>
<item name="windowActionModeOverlay">true</item>
<item name="android:datePickerDialogTheme">@style/AppCompatDialogStyle</item>
</style>
<style name="AppCompatDialogStyle" parent="Theme.AppCompat.Light.Dialog">
<item name="colorAccent">#FF4081</item>
</style>
</resources>
I've nothing changed in the SmartBox.Droid
project but got this errors. Could the problem happen because I've added a MainPage.xaml
and a Map.xaml
in the SmartBox (Portable)
project? I need two pages because I'll navigate between the two pages.
I've searched everywhere on Google and SO but found no solution that helps me. My source code you could find on GitHub (https://github.com/HeinPauwelyn/SmartBox) in the folder Execution → SmartBox
Upvotes: 3
Views: 1805
Reputation: 10841
Please try this solution:
Update your Xamarin to the latest version (both shared project and your platform project).
Then redirect to C:\Users\<username>\AppData\Local\
and rename the Xamarin
folder to Xamarin_old
.
Reopen your project, and build it. It will take a few minutes until the packages are fully downloaded.
Upvotes: 3
Reputation: 1592
Try editing the following lines in your Tabbar.axml
and Toolbar.axml
inside the Resources/Layout folder. This worked for me.
Tabbar.axml
From:
android:background="@style/colorPrimary"
app:tabIndicatorColor="@color/white"
To:
android:background="?attr/colorPrimary"
app:tabIndicatorColor="@android:color/white"
Toolbar.axml
From:
android:background="@style/colorPrimary"
To:
android:background="?attr/colorPrimary"
Upvotes: 1