小编sit*_*ail的帖子

Ionic + Cordova Android 构建错误 - 找不到 tools.jar

今天我已将 MacBook 升级到 macOS Big Sur 版本 11.0.1。现在,当我尝试为 Android 构建项目时出现了一个问题。

Execution failed for task ':CordovaLib:compileDebugJavaWithJavac'.
> Could not find tools.jar. Please check that /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home contains a valid JDK installation.
Run Code Online (Sandbox Code Playgroud)

android cordova ionic-framework ionic3 macos-big-sur

17
推荐指数
4
解决办法
9229
查看次数

Android:禁用并启用以编程方式为API 19提取状态栏

我已经完成了隐藏状态栏的工作,但遗憾的是,一旦隐藏状态栏,我就没有找到显示它的方法.我做了很多解决方法,但仍然没有成功,无论是在这里还是在这里.

活动

 WindowManager manager = ((WindowManager) getApplicationContext()
                .getSystemService(Context.WINDOW_SERVICE));

 WindowManager.LayoutParams localLayoutParams = new WindowManager.LayoutParams();
 localLayoutParams.type = WindowManager.LayoutParams.TYPE_SYSTEM_ERROR;
 localLayoutParams.gravity = Gravity.TOP;
 localLayoutParams.flags = WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE|

 // this is to enable the notification to receive touch events
 WindowManager.LayoutParams.FLAG_NOT_TOUCH_MODAL |

 // Draws over status bar
 WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN;

 localLayoutParams.width = WindowManager.LayoutParams.MATCH_PARENT;
 localLayoutParams.height = (int) (50 * getResources()
                .getDisplayMetrics().scaledDensity);
 localLayoutParams.format = PixelFormat.TRANSPARENT;

 customViewGroup view = new customViewGroup(this);
 manager.addView(view, localLayoutParams);
Run Code Online (Sandbox Code Playgroud)

customViewGroup类

class customViewGroup extends ViewGroup {

    public customViewGroup(Context context) {
        super(context);
    }

    @Override
    protected void …
Run Code Online (Sandbox Code Playgroud)

android statusbar

1
推荐指数
1
解决办法
2284
查看次数