feat(system):1.调整编译脚本. 2.用以下指令开启系统允许该程序浮窗功能:
adb shell appops set io.github.miuzarte.scrcpyforandroid SYSTEM_ALERT_WINDOW allow
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
param(
|
param(
|
||||||
[ValidateSet("debug", "release")]
|
[ValidateSet("debug", "release")]
|
||||||
[string]$BuildType = "release"
|
[string]$BuildType = "debug"
|
||||||
)
|
)
|
||||||
|
|
||||||
$ErrorActionPreference = "Stop"
|
$ErrorActionPreference = "Stop"
|
||||||
@@ -21,6 +21,11 @@ Write-Host ""
|
|||||||
Push-Location $ScriptDir
|
Push-Location $ScriptDir
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
# 停止旧 daemon(可能被 VS Code JRE 污染),失败也忽略
|
||||||
|
Write-Host ">>> Stopping old Gradle daemon..." -ForegroundColor Gray
|
||||||
|
.\gradlew.bat --stop 2>$null
|
||||||
|
Write-Host ""
|
||||||
|
|
||||||
if ($BuildType -eq "release") {
|
if ($BuildType -eq "release") {
|
||||||
Write-Host ">>> Building Release APK..." -ForegroundColor Green
|
Write-Host ">>> Building Release APK..." -ForegroundColor Green
|
||||||
.\gradlew.bat :app:assembleRelease --console=plain
|
.\gradlew.bat :app:assembleRelease --console=plain
|
||||||
|
|||||||
Reference in New Issue
Block a user