Android 记录一个调试了半天的非技术性的问题,深坑
AndroidStudio 4.0,华为手机 Android 版本10 华为版本10.1 通过androidstudio 编译出现如上图问题;
经过网上查询诸多方法 1、Cleaned the Project 2、Deleted the Build directory 3、Restarted Android Studio 4、Rebuild the Project 5、Run Optionally (Go to the files menu on android, click on "Invalidate Caches / Restart..." uninstall the app on your phone and try again) 等等都不奏效; 其实根本原因就是:华为手机上删除了这个apk,但是studio 认为你没删除
最终解决方法: 手机连接studio, 在termianl输入栏,输入gradle uA,(或./gradlew uA),执行成功后, 重新启动studio run apk, 即可成功
ps: 如果提示
改成 gradle uninstallAll