修改包名遇到的问题

修改包名的步骤

  1. 选中 ‘Compact Middle Packages’,右击想要改的名字,‘Refactor->Rename’ 即可
  2. 修改 build.gradle(Module:app) 中的 applicationId如果只需要修改apk的包名,只进行这一项就可以了

遇到的问题

修改完applicationId 控制台出现如下问题

Some file crunching failed, see logs for details

在这里插入图片描述
点击如上Toggle View 按钮可以查看具体的问题出在哪里。
我出现的问题是在xml文件中

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:gravity="center_horizontal"
    android:orientation="vertical" >

xmlns:app=“http://schemas.android.com/apk/res-auto
'res-auto’写的是以前的包名,这个位置在编译的时候会和applicationId进行对比,所以会报错,修改成res-auto就可以了

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值