小编Tom*_*Tom的帖子

Android系统覆盖窗口

我正在尝试创建一个系统覆盖.但我一直得到"许可被拒绝".我正在使用SDK版本23.

我的清单文件:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.test" >

<uses-permission android:name="android.permission.SYSTEM_OVERLAY_WINDOW" />

<application
    android:allowBackup="true"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >
    <activity
        android:name=".activity.MainActivity"
        android:label="@string/app_name" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
</application>

</manifest>
Run Code Online (Sandbox Code Playgroud)

我用来创建叠加层的代码:

    //mView = new HUDView(this);
    mButton = new Button(this);
    mButton.setText("Overlay button");
    mButton.setOnTouchListener(this);

    WindowManager.LayoutParams params = new WindowManager.LayoutParams(
            WindowManager.LayoutParams.WRAP_CONTENT,
            WindowManager.LayoutParams.WRAP_CONTENT,
            WindowManager.LayoutParams.TYPE_SYSTEM_ALERT,
            WindowManager.LayoutParams.FLAG_WATCH_OUTSIDE_TOUCH,
            PixelFormat.TRANSLUCENT);
    params.gravity = Gravity.RIGHT | Gravity.TOP;
    params.setTitle("Load Average");
    WindowManager wm = (WindowManager) getSystemService(WINDOW_SERVICE);
    wm.addView(mButton, params);
Run Code Online (Sandbox Code Playgroud)

java android android-permissions

17
推荐指数
2
解决办法
2万
查看次数

Visual Studio团队服务构建.net核心1.1

我正在尝试在vsts上构建一个.net核心1.1项目.该项目是在vs2017中开发的,它使用csproj而不是project.json.我已经尝试了多个选项来使用托管代理(Windows和Linux)在vsts上构建id.

我尝试了以下构建步骤

Visual Studio构建

设置为使用vs 2017,但我收到警告"未找到Visual Studio版本'15 .0'.正在寻找最新版本." 然后我得到错误,因为它不能包含.net核心包.

.NET核心(预览)

找不到project.json.当我将其设置为使用csproj文件时,它会出现错误"文件类型无法识别"

命令构建步骤

我尝试使用命令构建步骤运行命令."dotnet build"给出了无法找到project.json文件的错误.

有人用csproj构建dotnet 1.1的任何人可以帮助我如何做到这一点吗?

.net-core azure-devops

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