我跟着this guide将ArcGIS地图添加到我的应用中,但它不起作用。我收到以下错误:
Error: Failed to resolve: com.esri.arcgis.android:arcgis-android:10.2.6-2
我做错了什么?
答案 0 :(得分:4)
从屏幕截图中,您将String urlParameters =
"request=item_search&item_num=" + barcode + "&ou=" + OU + "&user_tag=" + initials + "&version=" + version + "&scan_point=return";
URL url = null;
try {
if (testMode == true)
{
url = new URL("http://URL/api.php");
}
else
{
url = new URL("http://URL/api.php");
}
}
catch (MalformedURLException e)
{
e.printStackTrace();
}
StringBuilder output = new StringBuilder();
try
{
assert url != null;
URLConnection conn = url.openConnection();
conn.setDoOutput(true);
OutputStreamWriter writer = new OutputStreamWriter(conn.getOutputStream());
writer.write(urlParameters);
writer.flush();
writer.close();
String line;
BufferedReader reader = new BufferedReader(new InputStreamReader(conn.getInputStream()));
while ((line = reader.readLine()) != null)
{
output.append(line);
}
writer.close();
reader.close();
}
catch (IOException e)
{
e.printStackTrace();
}
String outputString = output.toString();
块放在错误的位置。您将其置于maven
下,但根据https://developers.arcgis.com/android/guide/install-and-set-up.htm,它应位于buildscript -> repositories
下:
allprojects -> repositories
您在屏幕截图中的操作方式会导致您看到的错误。