我在Azure上部署了一个虚拟机。 我安装了Visual Studio 2015、Xamarin和其他移动开发工具。我在本地计算机上进行了相同的设置,以便从Visual Studio测试我的应用程序。
唯一的区别是Android SDK的安装。 在我的本地计算机上,我没有映像系统。
我在虚拟机上开发了一个应用程序。 编译期间没有错误。我使用了Android.Support.Design、Android.Support.V4、Android.Support.V7.AppCompat、Android.Support.V7.RecyclerView(来自NuGet的最新版本)及其MvvmCross实现。
我想在本地计算机上继续开发这个应用程序。 NuGet包已正确还原。
但当我构建应用程序时,出现了一些错误:
Error Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light.DarkActionBar'. Novatech.Droid D:\Sources\Novatech\Novatech.Droid\Resources\values\styles.xml
Error Error retrieving parent for item: No resource found that matches the given name 'Base.Widget.AppCompat.Button'. Novatech.Droid D:\Sources\Novatech\Novatech.Droid\Resources\values\styles.xml
Error No resource found that matches the given name: attr 'buttonStyle'. Novatech.Droid D:\Sources\Novatech\Novatech.Droid\Resources\values\styles.xml
Error No resource found that matches the given name: attr 'colorAccent'. Novatech.Droid D:\Sources\Novatech\Novatech.Droid\Resources\values\styles.xml
Error No resource found that matches the given name: attr 'colorPrimary'. Novatech.Droid D:\Sources\Novatech\Novatech.Droid\Resources\values\styles.xml
Error No resource found that matches the given name: attr 'colorPrimaryDark'. Novatech.Droid D:\Sources\Novatech\Novatech.Droid\Resources\values\styles.xml
Error No resource found that matches the given name: attr 'windowActionBar'. Novatech.Droid D:\Sources\Novatech\Novatech.Droid\Resources\values\styles.xml
Error No resource found that matches the given name: attr 'windowNoTitle'. Novatech.Droid D:\Sources\Novatech\Novatech.Droid\Resources\values\styles.xml
Error No resource found that matches the given name: attr 'windowNoTitle'. Novatech.Droid D:\Sources\Novatech\Novatech.Droid\Resources\values\styles.xml
我尝试过:
- 将'Theme.AppCompat.Light.DarkActionBar'更改为'@android:styles/Theme.AppCompat.Light.DarkActionBar',以及其他一些(android/styles)
- 在
C:\Program Files (x86)\Android\android-sdk\extras\android\support\v7\appcompat\project.properties
中将target=android-19
更改为target=android-21
有人能解释一下问题吗?我放弃了。操作系统、工具、SDK和JDK都是相同的。