android 删除系统原有的debug.keystore,系统运行的时候,重新生成新的debug.keystore,来完成App的运行。

1、先上一个图:这个是keystore无效的原因

之前在安装这个旧版本android studio的时候呢,安装过一版最新的android studio,然后通过模拟器跑过测试的demo。

2、运行旧的项目到模拟器的时候,就报错了:

Execution failed for task ':app:packageDebug'.

> A failure occurred while executing com.android.build.gradle.tasks.PackageAndroidArtifact$IncrementalSplitterRunnable

> com.android.ide.common.signing.KeytoolException: Failed to read key AndroidDebugKey from store "C:\Users\xxx\.android\debug.keystore": Invalid keystore format

* Try:

Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

打开上面信息中的目录:

发现有二个debug的文件,我们删除它们。删除不了,那么先关了android studio,再删除就行。

3、再次运行程序的时候,发现这二个文件自动生成了:

其实这样运行就成功了。只是App还是直接运行后报错,所以将原来的模拟器删除了,然后再次建一个新的模拟器试一下:

下载一个11的版本的。

最好,发现再次运行App还是一闪就退了,晚点再去找问题吧。到运行到模拟器的层面应该是可以了。

相关推荐
峥嵘life17 小时前
Android EDLA 搭建Linux测试环境简介
android·linux·运维
李坤林18 小时前
Anroid Perfetto
android
2501_9159090618 小时前
深度解析 iOS 内存占用,构建多工具协同的内存诊断、监控与优化体系
android·ios·小程序·https·uni-app·iphone·webview
sang_xb18 小时前
深入解析 HashMap:从存储架构到性能优化
android·java·性能优化·架构
啃火龙果的兔子19 小时前
android studio运行下载gradle特别慢怎么处理
android·ide·android studio
qq_2965446519 小时前
安卓手机投屏电脑端教程,手机投屏教程,可以手机和电脑互传文件。电脑管理手机文件和APP等操作
android·智能手机·电脑
我的offer在哪里19 小时前
MySQL 高频细节问题(覆盖性能、存储、运维、故障排查,补充前文未深入的核心细节)
android·运维·mysql
qq_7174100119 小时前
删除设置-声音-有来电时响铃并振动,手机铃声
android
dazhong201219 小时前
Android Studio 安装之历史版本下载问题解决
android·ide·android studio
灰度少爷19 小时前
安卓手机投屏软件——QtScrcpy!
android·智能手机·安卓手机投屏软件