我有一个与ripple模拟器运行良好的项目,但是当我尝试在物理Android设备上启动它时,我收到以下错误:
错误:请安装Android目标:"android-21".
提示:运行以下命令打开SDK管理器:C:\ Program\Files \(x86)\ Android\android-sdk\tools\android.BAT
你需要:
- 用于android-21的"SDK平台"
- "Android SDK平台工具(最新)
- "Android SDK Build-tools"(最新)
ERROR运行一个或多个平台:错误:cmd:命令失败,退出代码2您可能没有运行此项目所需的环境或操作系统
我正在使用的设备是在Android 4.2.2上.我的计算机上安装的sdk是4.4.2(API 19):

我不明白为什么我的应用程序不会出现在我的设备上.
我正在尝试填充DropDownList并在提交表单时获取所选值:
这是我的模型:
public class Book
{
public Book()
{
this.Clients = new List<Client>();
}
public int Id { get; set; }
public string JId { get; set; }
public string Name { get; set; }
public string CompanyId { get; set; }
public virtual Company Company { get; set; }
public virtual ICollection<Client> Clients { get; set; }
}
Run Code Online (Sandbox Code Playgroud)
我的控制器:
[Authorize]
public ActionResult Action()
{
var books = GetBooks();
ViewBag.Books = new SelectList(books);
return View();
}
[Authorize]
[HttpPost]
public ActionResult …Run Code Online (Sandbox Code Playgroud) 我正在尝试制作一个仅显示年月的datepicker.
我在不同的地方看到了这些问题,但我测试的所有解决方案都不起作用.
我按照这个例子:http://jsfiddle.net/bopperben/DBpJe/
这是我的.cshtml文件:
@using Site.Models
@{
ViewBag.Title = "Rapports";
}
<script type="text/javascript">
$(function() {
$('.date-picker').datepicker( {
changeMonth: true,
changeYear: true,
showButtonPanel: true,
dateFormat: 'MM yy',
onClose: function(dateText, inst) {
var month = $("#ui-datepicker-div .ui-datepicker-month :selected").val();
var year = $("#ui-datepicker-div .ui-datepicker-year :selected").val();
$(this).datepicker('setDate', new Date(year, month, 1));
}
});
});
</script>
<style type="text/css">
.ui-datepicker-calendar {
display: none;
}
</style>
<h2>Rapports</h2>
<div>
@using (Html.BeginForm()) {
<input name="startDate" id="startDate" class="date-picker" />
<input type="submit" value="Rechercher" />
}
</div>
Run Code Online (Sandbox Code Playgroud)
但是在我的页面中只有一个文本框,当我点击它时没有弹出任何内容.我不知道我做错了什么.