Xamarin Forms droid上找不到错误资源

时间:2019-12-17 09:10:21

标签: xamarin.forms xamarin.android

我有一个运行iOS项目的xamarin解决方案,现在我想在android上做同样的事情。因此,我创建了一个新的Android项目,安装了nuget,并设置了引用,然后发生了这种情况:

resource integer/google_play_services_version not found. (APT0000)

在路径obj / debug / android ...中,所以我删除obj和bin文件夹,进行构建并得到以下信息:

resource style/Theme.AppCompat.Light.Dialog' not found.
style attribute 'attr/colorAccent' not found.
resource style/Theme.AppCompat.Light.DarkActionBar' not found.
style attribute 'attr/windowNoTitle' not found.
style attribute 'attr/windowActionBar' not found.
style attribute 'attr/colorPrimary' not found.
style attribute 'attr/colorPrimaryDark' not found.
style attribute 'attr/colorAccent' not found.
style attribute 'attr/windowActionModeOverlay' not found.

我也删除了obj和bin文件夹,.local / share / xamarin,清理并重建。包是这样的: enter image description here

这是我的style.xml

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <style name="Theme.Login" parent="Theme.AppCompat.Light.NoActionBar">
        <item name="android:windowNoTitle">true</item>
        <item name="android:windowFullscreen">true</item>
        <item name="android:windowBackground">@drawable/SplashImage</item>        
        <!-- This is for the EditText Color lines-->
        <item name="colorControlNormal">@color/white</item>
        <item name="colorControlActivated">@color/greenBase</item>
        <item name="colorControlHighlight">@color/greenBase</item>
        <item name="android:textColorHint">@color/white</item>
    </style>

    <style name="MyActionBarStyle" parent="Widget.AppCompat.Light.ActionBar.Solid">
        <item name="displayOptions">showTitle</item>
    </style>

    <!-- Base theme applied no matter what API -->
    <style name="MainTheme.Base" parent="Theme.AppCompat.Light.DarkActionBar">
        <!--If you are using revision 22.1 please use just windowNoTitle. Without android:-->
        <item name="windowNoTitle">false</item>
        <item name="actionBarStyle">@style/MyActionBarStyle</item>
        <!--We will be using the toolbar so no need to show ActionBar-->
        <item name="windowActionBar">true</item>
        <!-- Set theme colors from http://www.google.com/design/spec/style/color.html#color-color-palette -->
        <!-- colorPrimary is used for the default action bar background -->
         <item name="colorControlNormal">@color/greyBase</item>
        <item name="colorControlActivated">@color/greenBase</item>
        <item name="colorControlHighlight">@color/greenBase</item>
        <item name="android:textColorHint">@color/greyBase</item>
        <!-- You can also set colorControlNormal, colorControlActivated
         colorControlHighlight and colorSwitchThumbNormal. -->
        <item name="windowActionModeOverlay">true</item>
        <item name="android:datePickerDialogTheme">@style/AppCompatDialogStyle</item>
    </style>
    <style name="AppCompatDialogStyle" parent="Theme.AppCompat.Light.Dialog">
        <item name="colorAccent">@color/greenBase</item>
    </style>
    <style name="MainTheme" parent="MainTheme.Base"/>

    <!-- Base theme applied no matter what API -->
    <style name="MainTheme.BaseLight" parent="Theme.AppCompat.Light.NoActionBar">
        <!--If you are using revision 22.1 please use just windowNoTitle. Without android:-->
        <item name="android:windowNoTitle">true</item>
        <item name="android:windowFullscreen">true</item>
        <!-- Set theme colors from http://www.google.com/design/spec/style/color.html#color-color-palette -->
        <!-- colorPrimary is used for the default action bar background -->
         <item name="colorControlNormal">@color/greyBase</item>
        <item name="colorControlActivated">@color/greenBase</item>
        <item name="colorControlHighlight">@color/greenBase</item>
        <item name="android:textColorHint">@color/greyBase</item>
        <!-- You can also set colorControlNormal, colorControlActivated
         colorControlHighlight and colorSwitchThumbNormal. -->
        <item name="windowActionModeOverlay">true</item>
        <item name="android:datePickerDialogTheme">@style/AppCompatDialogStyle</item>
    </style>
</resources>

我不知道我在制作Android应用程序时是否出错。我还能尝试什么?

0 个答案:

没有答案