first commit
This commit is contained in:
47
.vscode/check_emulator.sh
vendored
Executable file
47
.vscode/check_emulator.sh
vendored
Executable file
@@ -0,0 +1,47 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Skript zum Prüfen ob Emulator läuft
|
||||
|
||||
YELLOW='\033[1;33m'
|
||||
GREEN='\033[0;32m'
|
||||
RED='\033[0;31m'
|
||||
NC='\033[0m'
|
||||
|
||||
echo "🔍 Prüfe auf Android Emulator..."
|
||||
|
||||
# Prüfe ob Emulator läuft
|
||||
DEVICE=$(flutter devices 2>/dev/null | grep "emulator" | head -1)
|
||||
|
||||
if [ -n "$DEVICE" ]; then
|
||||
echo -e "${GREEN}✅ Emulator läuft:${NC}"
|
||||
echo " $DEVICE"
|
||||
exit 0
|
||||
else
|
||||
echo -e "${RED}❌ Kein Emulator gefunden!${NC}"
|
||||
echo ""
|
||||
echo "Verfügbare Emulatoren:"
|
||||
flutter emulators
|
||||
echo ""
|
||||
echo -e "${YELLOW}Starte Emulator...${NC}"
|
||||
flutter emulators --launch Pixel_8_Pro_API_29 2>/dev/null &
|
||||
|
||||
echo ""
|
||||
echo "Warte auf Emulator-Start (ca. 30-60 Sekunden)..."
|
||||
|
||||
# Warte bis Emulator verfügbar ist
|
||||
for i in {1..30}; do
|
||||
sleep 2
|
||||
DEVICE=$(flutter devices 2>/dev/null | grep "emulator" | head -1)
|
||||
if [ -n "$DEVICE" ]; then
|
||||
echo -e "${GREEN}✅ Emulator bereit!${NC}"
|
||||
echo " $DEVICE"
|
||||
exit 0
|
||||
fi
|
||||
echo -n "."
|
||||
done
|
||||
|
||||
echo ""
|
||||
echo -e "${YELLOW}⚠️ Emulator startet noch...${NC}"
|
||||
echo " Bitte warten und dann nochmal versuchen."
|
||||
exit 1
|
||||
fi
|
||||
Reference in New Issue
Block a user