1.android studio 目录结构改变了。为什么会报R 资源文件找不到。
在写项目的时候经常需要改到。
gradle文件里的域名名字要改变下。
2.Caused by: android.app.BackgroundServiceStartNotAllowedException: Not allowed to start service Intent { cmp=com.zjtzsw.sbkDevice/.readCard.SbkReadCardService }: app is in background uid UidRecord{9353cdf u0a88 TPSL idle change:idle|cached procs:0 seq(0,0,0)}
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
3.adb: failed to install D:\AS\APP\scanhead\app\build\outputs\apk\debug\posHelper-1.1-2024.06.04_10_49_25.2_-2024.06.04_10_49_25-debug.apk: Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE: Package com.example.decodeTest signatures do not match previously installed version; ignoring!]
换个签名文件。系统应用需要签名的
4.Task :app:lintDebug FAILED Lint found 1 errors, 276 warnings. First failure: D:\AS\APP\scanhead\app\src\main\res\menu\main.xml:8: Error: Should use app:showAsAction with the appcompat library with xmlns:app="http://schemas.android.com/apk/res-auto" [AppCompatResource] android:showAsAction="never"
删除!
app:showAsAction="never"
5.绑定服务失败,<manifest xmlns:android="http://schemas.android.com/apk/res/android"
清单文件里package="com.centerm.cpay">这句话必须加上。