我已经下载了XamarinStudio,并尝试将MapsAndLocationDemo3示例与MapWithOverlaysActivity项目一起使用.
我收到以下错误:
C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2,2): Error XA0000: Could not determine $(TargetFrameworkVersion) for API level '19.' (XA0000) (SimpleMapDemo)
Run Code Online (Sandbox Code Playgroud)
在Android SDK Manager我已经安装了所有选项Android 4.4 (API 19)以及Google Play服务.
我可以请一些帮助让这个样本有效吗?
谢谢
我正在使用Xamarin,当我点击具有电话号码链接的TextView时,我的模拟器正在执行错误.
应用程序输出具有以下输出:
[MessageQueue-JNI] Exception in MessageQueue callback: handleReceiveCallback
[MessageQueue-JNI] android.util.AndroidRuntimeException: Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want?
Run Code Online (Sandbox Code Playgroud)
我需要在哪里设置标志,我应该将其设置为什么?
我可以请一些帮助让这个工作吗?
提前致谢.
编辑
这是我的应用程序代码:
namespace TestTextViewAutoLink
{
[Activity (Label = "TestTextViewAutoLink", MainLauncher = true)]
public class MainActivity : Activity
{
protected override void OnCreate (Bundle bundle)
{
base.OnCreate (bundle);
TextView textView = new TextView (this.ApplicationContext);
textView.AutoLinkMask = Android.Text.Util.MatchOptions.PhoneNumbers;
textView.Text = "This is a phone number 0800 32 32 32";
//Linkify.AddLinks(textView, MatchOptions.PhoneNumbers); …Run Code Online (Sandbox Code Playgroud) 在LogOn视图中,我有以下代码:
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
Run Code Online (Sandbox Code Playgroud)
这个片段是什么意思,"MainContent"定义在哪里?
编辑
谢谢你的回复.我现在明白它是如何工作的,但是"MainContent"定义在哪里?它是在母版页中定义的吗?
我正在使用 Xamarin,但我的 Google 地图应用程序没有显示地图。我想检查 logcat 输出以解决这种情况。
如何检查 logcat 输出?我做了一些研究,我需要使用以下命令:“adb logcat -d -v time > logfile.txt”
但是我从哪里运行这个语句呢?它是来自命令提示符还是来自 Xamarin 或其他地方?
提前致谢。
编辑
我已经浏览到 android sdk 文件夹中的 platform-tools 文件夹并运行了以下命令:“adb logcat -d -v time > logfile.txt”
输出说:“等待设备”
我什么时候运行“adb logcat -d -v time > logfile.txt”命令?我是在应用程序在 Xamarin 中运行时或之后运行它,还是在其他时间运行它?
我正在使用Xamarin我想开始一个名为AutoLinkActivity的新活动.
这是我的代码:
using System;
using Android.App;
using Android.Content;
using Android.Runtime;
using Android.Views;
using Android.Widget;
using Android.OS;
using Android.Text.Util;
namespace TestTextViewAutoLink
{
[Activity (Label = "TestTextViewAutoLink", MainLauncher = true)]
public class MainActivity : Activity
{
protected override void OnCreate (Bundle bundle)
{
Intent intent= new Intent(this.ApplicationContext, AutoLinkActivity);
intent.SetFlags(ActivityFlags.NewTask);
StartActivity(intent);
}
}
}
Run Code Online (Sandbox Code Playgroud)
我得到的构建错误是:
'TestTextViewAutoLink.AutoLinkActivity'是'type',但用作'变量'
我可以请一些帮助让这个工作吗?
提前致谢
android ×4
xamarin ×4
c# ×2
google-maps ×2
adb ×1
asp.net ×1
frameworks ×1
google-api ×1
html ×1
logcat ×1
textview ×1
variables ×1
view ×1