-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild_debug.sh
More file actions
executable file
·38 lines (30 loc) · 1.05 KB
/
build_debug.sh
File metadata and controls
executable file
·38 lines (30 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/bash
echo "=== 构建v8a手机测试版 ==="
# 清理之前的构建
echo "清理之前的构建..."
./gradlew clean
# 构建mobile arm64-v8a debug版本
echo "构建mobile arm64-v8a debug版本..."
./gradlew assembleMobileArm64_v8aDebug
# 检查构建结果
if [ $? -eq 0 ]; then
echo "=== 构建成功 ==="
# 查找生成的APK文件
APK_PATH=$(find app/build/outputs/apk/mobile/arm64-v8a/debug -name "*.apk" 2>/dev/null | head -1)
if [ -n "$APK_PATH" ]; then
echo "APK文件位置: $APK_PATH"
echo "文件大小: $(ls -lh "$APK_PATH" | awk '{print $5}')"
echo "文件信息:"
ls -la "$APK_PATH"
# 显示APK详细信息
echo ""
echo "=== APK详细信息 ==="
aapt dump badging "$APK_PATH" | grep -E "(package|application-label|native-code|sdkVersion|targetSdkVersion)"
else
echo "未找到生成的APK文件"
find app/build/outputs -name "*.apk" 2>/dev/null
fi
else
echo "=== 构建失败 ==="
echo "请检查错误信息"
fi