Android App Bundle 报错 ‘other‘ has different root

上线 应用,记得上次打包是一个月前,使用 Android App Bundle 方式,没有报错,今天出现错误了

Errors while building Signed Android App Bundle file. Execution failed for task ':app:signReleaseBundle' > 'other' has different root

很是郁闷,尝试 clean ,打包还是出错,rebuild,重启As还是不行,
网上百度了,说是让关闭 install run ,关闭了还是不行,
万能的google ,人家说的如下:


Well, I've got the solution to this problem. Android Studio 4.0 has this weird bug that you've to select the KeyStore path and release destination folder in the root directory (C:/ or D:/ or E:/, whatever) same as where your project resides in order to generate the Signed App Bundle.

Like suppose you've got your project in the C:/ directory. Then, during selecting path for keystore and release destination folder for your signed app bundle, you've to be sure that the root directory for these paths should be C:/.

Why they have done this, there's no idea about that. But, this error is there in Android Studio 4.0, although only in case of Signed App Bundles. With Signed APKs, it is working pretty normal.

意思就是说,你的项目(project),你的签名文件(.jks文件),还有你的打包生成abb文件(要上架的abb包)要放在相同的根目录下,无论是 c盘d盘e 盘都行,但是必须一致,然后clean下,打包就能成功了!!!

实在不懂看图1,和图2

图1
图2

stackoverflow 地址,猛戳

  • 10
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 3
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值