Android10(API 29)getExternalStorageDirectory没权限

在AndroidManifest.xml文件中application节点中加上android:requestLegacyExternalStorage="true"属性就可以了,如下:

参考官方文档:  https://developer.android.google.cn/training/data-storage/compatibility

andoird studio 运行的模拟器跑到了侧边栏,Emulator,想让他单独运行

This Activity already has an action bar supplied by the window decor. Do not request Window.FEATURE_SUPPORT_ACTION_BAR and set windowActionBar to false in your theme to use a Toolbar instead.

Toolbar toobar = findViewById(R.id.toolbar);setSupportActionBar(toobar);

取消主题的bar样式

方法1

values/styles.xml 

    

方法2

修改style标签的 parent 属性,为无 actionBar 的主题