显示消息提醒
Toast.makeText(getApplicationContext(), "默认Toast样式",
Toast.LENGTH_SHORT).show();
自定义位置toast
toast = Toast.makeText(getApplicationContext(),
"自定义位置Toast", Toast.LENGTH_LONG);
toast.setGravity(Gravity.CENTER, 0, 0);//定位置
toast.show();//显示
----------------------------------------------------------------------------------------------------------------------
chmod +x gradlew - 给权限
./gradlew assembleDebug -编译成APK apk文件在app/build/apk
----------------------------------------------------------------------------------------------------------------------
Log.v(this.toString(), "This is Verbose."); 什么都输出
Log.d(this.toString(), "This is Debug."); 仅仅输出DEBUG调试信息
Log.i(this.toString(), "This is Information"); 提示信息
Log.w(this.toString(), "This is Warnning."); 警告
Log.e(this.toString(), "This is Error."); 错误
第一个字符串一般填来自哪里,比如什么类,第二个是什么什么信息。