A collection of obscure Android development issues and their solutions.
1. Android Studio Fails to Compile a New Project
| |
Root cause: In early versions of Android Studio, an incomplete resource directory structure could trigger this error.
Fix: Create a drawable-hdpi or drawable-xhdpi folder.
2. Meilan Note Cannot Connect via ADB
When your device won’t connect over USB despite all normal conditions being met, you may need to add the USB Vendor ID.
Solution (macOS):
- Find the Vendor ID via System Information or
system_profiler SPUSBDataType - Edit
~/.android/adb_usb.iniand append0x2a45(Meizu’s vendor ID) - Restart ADB and reconnect:
1 2adb kill-server adb start-server
See: Android ADB Documentation
3. App Installation Fails Due to Signature Mismatch
| |
Root cause: The installed version has a different signature than the one you’re trying to install. This commonly happens when switching between debug and release signing keys.
Fix: Uninstall the conflicting version first:
| |
Key notes:
adb -etargets an emulator; without the-eflag ADB picks the only connected device- To uninstall a system app from Google Play, use
adb shell pm uninstall -k --user 0 <pkg>(requires root)