我收到一个错误“无法解析方法'maketext(android.content.Context,java.lang.String,java.lang.String,int')”。我认为海拔部分(int)有问题。有人可以告诉我如何解决此问题吗? @OnClick(R.id.btn_get_last_location) public void showLastKnownLocation() { if (mCurrentLocation != null) { Toast.makeText(getApplicationContext(), "Lat: " + mCurrentLocation.getLatitude() + ", Lng: " + mCurrentLocation.getLongitude(), ", Alt: " + mCurrentLocation.getAltitude(), Toast.LENGTH_LONG).show(); } else { Toast.makeText(getApplicationContext(), "Last known location is not available!", Toast.LENGTH_SHORT).show(); } }
添加回答
举报
0/150
提交
取消