在Visual Studio 2017上发布部署android项目的解决方案

时间:2017-04-09 06:47:12

标签: c# android xamarin visual-studio-2017

我必须使用visual studio处理一个Android应用程序。所以我开始写一个简单的" Hello World"应用程序在控制台上打印。

它出现以下错误:

<?php

/* db variables */

$dbhost = 'localhost';
$dbname = 'name_db';
$dbuser = 'user_db';
$dbpass = 'pass_db';

/* grab the json */

$data = $_POST['payload'];

/* put json into php associative array */

$data_array = json_decode($data);

/* store in PHP variables */

$ip_address = $data_array['data']['payload'];
$vid_name = $data_array['data']['videoName'];
$date_time = $data_array['data']['dateTime'];
$time_zone = $data_array['data']['timeZone'];

/* connect to mysql db */

$con = mysql_connect($dbuser, $dbpass, $dbhost) or die('Could not connect: ' . mysql_error());

/* select the specific db */

mysql_select_db($dbname, $con);

/* insert the values into the db */

$sql = "INSERT INTO ip_and_videos(IpAddress, VideoName, DateTime, Timezone) VALUES('$ip_address','$vid_name','$date_time','$time_zone')";

if(!mysql_query($sql,$con))
{
    die('Error : ' . mysql_error());
}

?>

寻找&#34;找不到AVD系统路径。请在Google上定义ANDROID_SDK_ROOT&#34; ,我想我可能要设置一个环境变量。所以我将其添加到系统环境变量中的路径列表:1>------ Build started: Project: App1, Configuration: Debug Any CPU ------ 1> Processing: obj\Debug\res\layout\main.xml 1> Processing: obj\Debug\res\values\strings.xml 1> App1 -> C:\Users\soume\Desktop\App1\App1\bin\Debug\App1.dll 1> Processing: obj\Debug\res\layout\main.xml 1> Processing: obj\Debug\res\values\strings.xml 1> Processing: obj\Debug\res\layout\main.xml 1> Processing: obj\Debug\res\values\strings.xml 2>Starting deploy VisualStudio_android-23_x86_phone ... 2>Starting emulator VisualStudio_android-23_x86_phone ... 2>C:\PROGRA~2\Android\ANDROI~1\tools\emulator.EXE -partition-size 512 -no-boot-anim -avd VisualStudio_android-23_x86_phone -prop monodroid.avdname=VisualStudio_android-23_x86_phone 2>PANIC: Cannot find AVD system path. Please define ANDROID_SDK_ROOT 2>Emulator VisualStudio_android-23_x86_phone cannot be started. ========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ========== ========== Deploy: 0 succeeded, 1 failed, 0 skipped ========== 。但是,错误没有改变。

请告知错误以及如何解决此问题。

提前致谢。

0 个答案:

没有答案