Skip to content

Commit f4aeb7f

Browse files
Copilotkirklandsign
andcommitted
Fix workflow script syntax and Android build warnings
- Consolidated multi-line bash script to avoid shell syntax errors - Removed deprecated package attribute from AndroidManifest.xml - Removed uses-sdk element (minSdkVersion managed in build.gradle.kts) - Removed android:extractNativeLibs attribute - Removed unused context variable from MainActivity.kt All Android manifest attributes are now properly managed in build.gradle.kts following modern Android development practices. Co-authored-by: kirklandsign <107070759+kirklandsign@users.noreply.github.com>
1 parent 210272b commit f4aeb7f

3 files changed

Lines changed: 3 additions & 27 deletions

File tree

.github/workflows/android-emulator.yml

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -99,40 +99,23 @@ jobs:
9999
working-directory: ${{ env.DEMO_PATH }}
100100
script: |
101101
set -ex
102-
103102
DEMO_NAME=$(basename "$PWD")
104103
LOGCAT_FILE="/tmp/logcat-${DEMO_NAME}.txt"
105-
106104
echo "=== Emulator Memory Info ==="
107105
adb shell cat /proc/meminfo | head -5
108-
109106
echo "=== Emulator Disk Space ==="
110107
adb shell df -h /data
111-
112-
# Start logcat capture
113108
adb logcat -c
114109
adb logcat > "$LOGCAT_FILE" &
115110
LOGCAT_PID=$!
116-
117111
echo "=== Starting Gradle ==="
118112
./gradlew connectedCheck
119113
TEST_EXIT_CODE=$?
120-
121-
# Stop logcat
122-
if [ -n "$LOGCAT_PID" ]; then
123-
kill $LOGCAT_PID 2>/dev/null || true
124-
fi
125-
114+
if [ -n "$LOGCAT_PID" ]; then kill $LOGCAT_PID 2>/dev/null || true; fi
126115
echo "=== Test completion status ==="
127-
if [ $TEST_EXIT_CODE -eq 0 ]; then
128-
echo "Tests passed successfully"
129-
else
130-
echo "Tests failed with exit code $TEST_EXIT_CODE"
131-
fi
132-
116+
if [ $TEST_EXIT_CODE -eq 0 ]; then echo "✅ Tests passed successfully"; else echo "❌ Tests failed with exit code $TEST_EXIT_CODE"; fi
133117
echo "=== Checking for test results in logcat ==="
134118
grep -E "SanityCheck|UIWorkflowTest" "$LOGCAT_FILE" || echo "No test logs found"
135-
136119
exit $TEST_EXIT_CODE
137120
138121
- name: Upload logcat

dl3/android/DeepLabV3Demo/app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3-
xmlns:tools="http://schemas.android.com/tools"
4-
package="org.pytorch.executorchexamples.dl3">
5-
6-
<uses-sdk android:minSdkVersion="19"
7-
android:targetSdkVersion="34"
8-
android:maxSdkVersion="40" />
3+
xmlns:tools="http://schemas.android.com/tools">
94

105
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
116
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />
@@ -20,7 +15,6 @@
2015
android:roundIcon="@mipmap/ic_launcher_round"
2116
android:supportsRtl="true"
2217
android:theme="@style/Theme.DeepLabV3Demo"
23-
android:extractNativeLibs="true"
2418
tools:targetApi="34">
2519

2620
<activity

dl3/android/DeepLabV3Demo/app/src/main/java/org/pytorch/executorchexamples/dl3/MainActivity.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@ class MainActivity : ComponentActivity() {
109109
var isDownloading by remember { mutableStateOf(false) }
110110
var canReset by remember { mutableStateOf(false) }
111111
val scope = rememberCoroutineScope()
112-
val context = LocalContext.current
113112

114113
// Load initial sample image
115114
LaunchedEffect(Unit) {

0 commit comments

Comments
 (0)