Android 安卓吐司问题

Android 安卓吐司问题,android,Android,我收到以下错误。请告诉我如何删除此错误。我收到此错误是因为我的应用中存在Toast。如果我取下这个吐司,一切正常。请帮帮我 日志: 08-17 20:12:23.753: E/(7381): file /data/data/com.nvidia.NvCPLSvc/files/driverlist.txt: not found! 08-17 20:12:23.753: I/(7381): Attempting to load EGL implementation /system/lib//egl

我收到以下错误。请告诉我如何删除此错误。我收到此错误是因为我的应用中存在Toast。如果我取下这个吐司,一切正常。请帮帮我

日志:

08-17 20:12:23.753: E/(7381): file /data/data/com.nvidia.NvCPLSvc/files/driverlist.txt:  not found!
08-17 20:12:23.753: I/(7381): Attempting to load EGL implementation /system/lib//egl/libEGL_tegra_impl
08-17 20:12:23.758: I/(7381): Loaded EGL implementation /system/lib//egl/libEGL_tegra_impl
08-17 20:12:23.793: I/(7381): Loading GLESv2 implementation /system/lib//egl/libGLESv2_tegra_impl
我正在测试htc1x

下面是我使用Toast的完整方法

public long putvalues(String event_name,String event_date,String event_time,String event_location){


    String anArray[] = new String[] {Column_Id,name,date,time,location};
    Log.d("in is duplicate","ere");
    Cursor c = ourSQLiteDatabase.query(Table_Name, anArray,name+" =?"+" AND "+date+" =?"+" AND "+time+" =?"+" AND "+location+" =?" ,
            new String[] {event_name,event_date,event_time,event_location}, null, null, null);

    if(c != null){
        Log.d("in if","in if");
        Toast.makeText(getBaseContext(), "already exist",Toast.LENGTH_SHORT).show();

    } 
ContentValues cv = new ContentValues();
    cv.put(name, event_name);
    cv.put(date, event_date);
    cv.put(time, event_time);
    cv.put(location, event_location);
    Log.d("in reminder", "put values1");
    return ourSQLiteDatabase.insert(Table_Name, null, cv);  
}

不要使用
getBaseContext()
。只需使用
这个


如果您试图从
服务中显示
土司
,请使用
getApplicationContext()

嘿,您应该使用以下代码:

Toast.makeText(getApplicationContext(), "already exist",Toast.LENGTH_SHORT).show();

你的吐司代码在哪里?你能提供相关的代码片段吗?@JustWork伟人所见略同!这是我的toast代码toast.makeText(getBaseContext(),“已经存在”,toast.LENGTH\u SHORT.show();我想这不是你的应用程序的问题。检查其他应用程序是否在logcat中显示相同错误。不,我没有使用任何线程。我刚刚创建了一个数据库,现在我想在用户尝试保存相同数据时显示toast。