我在创建时遇到错误 Toast
Toast toast = Toast.makeText(this, text, duration);
Run Code Online (Sandbox Code Playgroud)
我得到无法解决的makeText()方法Toast.
我收到了这个错误
java:没有为makeText找到合适的方法(idtech.ESDN.ShapeData,java.lang.CharSequence,int)方法android.widget.Toast.makeText(android.content.Context,int,int)不适用(实际参数idtech. ESDN.ShapeData无法通过方法调用转换转换为android.content.Context方法android.widget.Toast.makeText(android.content.Context,java.lang.CharSequence,int)不适用(实际参数idtech.ESDN. ShapeData无法通过方法调用转换转换为android.content.Context)
我正在从Google获取Google Play API密钥,并要求输入SHA1指纹.我想知道什么是SHA1指纹?我也想知道天气这个API密钥可以从另一台计算机/ PC使用?
我正在使用intelliJ IDEA12.1.3进行Android开发.
我正在运行你好的世界应用程序,但是当启动模拟器时,命令行中会显示设备尚未就绪的消息等待20秒.
Uploading file
local path: C:\Users\Haseeb\IdeaProjects\untitled\out\production\untitled\untitled.apk
remote path: /data/local/tmp/com.example.untitled
Installing com.example.untitled
DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/com.example.untitled"
Device is not ready. Waiting for 20 sec.
DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/com.example.untitled"
Device is not ready. Waiting for 20 sec.
DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/com.example.untitled"
Device is not ready. Waiting for 20 sec.
DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/com.example.untitled"
Device is not ready. Waiting for 20 sec.
Run Code Online (Sandbox Code Playgroud) 我的文件夹层次结构如下所示:
我将选择该a.XML文件并阅读它。现在我有了b.XML文件的路径。
我的问题是如何将此文件推送到 a 中,FileList因为我没有通过它<input type="file">,因为我只有文件路径。我已经寻找了一个解决方案,但我没有找到任何帮助如何在FileList没有输入标签的情况下推送文件。我希望我的代码在谷歌浏览器中运行。
我当前通过输入标签读取a.XML文件的代码如下所示:
if(filePath.files && filePath.files[0])
{
reader.onload = function (e)
{
output = e.target.result;
console.log("file path");
console.log(output);
}
}
Run Code Online (Sandbox Code Playgroud)
如果b.xml放置在 中FileList,那么我可以轻松读取此文件,因此我只有b.xml路径,并且我想将此文件推送到FileList界面中。
我想要做的是从服务器获取文件.相同的代码使用sdcard运行f9,但是当我从thorugh线程获取文件时,我的logcat中出现以下错误.
我的代码如下:
public class Map extends Activity
{
//
private GraphicsView mGLView;
//private GisGLRenderer m_GisRenderer;
final static String RESULT_KEY="result";
final static int REQ_CODE=1001;
AlertDialog m=null;
public class LoadFile extends AsyncTask<String,String,String>
{
ProgressDialog Asycdialog = new ProgressDialog(Map.this);
@Override
protected void onPreExecute() {
//set message of the dialog
Asycdialog.setMessage("Loading File");
Asycdialog.setButton(DialogInterface.BUTTON_NEGATIVE,"Cancel",new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
//To change body of implemented methods use File | Settings | File Templates.
}
});
//show dialog
Asycdialog.show();
super.onPreExecute();
}
protected …Run Code Online (Sandbox Code Playgroud) 这是我的函数,它将所有项目放在数据库中.
public bool getUserProjects(ref List<erpAssets>userProjects)
{
string arguments = "{\"sessionId\":\"" + m_LoggedInUser.sessionId + "\"," +
"\"assetType\":\"" + PROJECT_ASSET_TYPE_NAME + "\"" +
"}";
string response = UrlParser(METHOD_GET_ASSETS, MODULE_ADMINISTRATION, arguments); //calling the function urlParse to get the response from that page
erpAPIResponse basicResponse = JsonConvert.DeserializeObject<erpAPIResponse>(response);
if (basicResponse.success.Equals("yes"))
{
try
{
erpAssets[] Projects = JsonConvert.DeserializeObject<erpAssets[]>(basicResponse.arguments);
userProjects.AddRange(Projects);
}
catch (Exception e)
{
}
}
else return false;
return true; // sending the response back to client
}
Run Code Online (Sandbox Code Playgroud)
我的erpAsset类如下:
class erpAssets
{
public string assetId …Run Code Online (Sandbox Code Playgroud) 我在我的数据库中安装了postgis.现在我在我的数据库中有1个区域((-79.4609576808001,43.9726680183837))我希望这个区域转换为几何类型.我在谷歌上搜索过,发现St_geomfromText会将文本转换为几何类型.
我的查询如下:
SELECT ST_GeomFromText(region,4326) from "erpAssets";
Run Code Online (Sandbox Code Playgroud)
但是它给出了错误,它说没有函数匹配st_geomfromtext