我的Android进阶之旅------>解决:Failed to create 'build\outputs\apk\watch-debug-unaligned.apks': 拒绝访问。
1. 错误描述
今天用Android Studio进行项目编译的时候,报错如下所示:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':watch:packageDebug'.
> Failed to create 'D:\BBK_SVN\XTC_SSO\watch\build\outputs\apk\watch-debug-unaligned.apks': 拒绝访问。
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 2.538 secs
编译不了,然后我打算重新Clean一遍后再重新打包编译。于是去点击Build–>Clean Project,结果clean都报错,如下所示:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':watch:clean'.
> Unable to delete directory: D:\BBK_SVN\XTC_SSO\watch\build\outputs\apk
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 5.217 secs
2. 解决方法
方法1:重启Android Studio
首先我尝试重启Android Studio,但是这个方法失效。 无效!方法2:重启电脑
我进入到D:\BBK_SVN\XTC_SSO\watch\build\outputs\apk目录去进行手动删除该目录,发现删除不了,提示如下:
您需要来自administrator的权限才能对此文件进行更改
但是我的用户名就是administrator啊,无语了。
只能把Win7电脑重启了,重启后重新打开Android Studio 发现可以正常编译打包了。好吧,重启电脑用账户名为Administrator再重新登录一次即可。
重启电脑后,用Administrator账户重新登录,再重启Android Studio。有效!
- 方法3:使用腾讯的电脑管家或者360等软件的文件粉碎功能,对文件夹进行粉碎,然后重新编译,有效!
作者:欧阳鹏 欢迎转载,与人分享是进步的源泉!
转载请保留原文地址:http://blog.csdn.net/ouyang_peng
我的Android进阶之旅------>解决:Failed to create 'build\outputs\apk\watch-debug-unaligned.apks': 拒绝访问。的更多相关文章
- 我的Android进阶之旅------>解决Jackson等第三方转换Json的开发包在开启混淆后转换的实体类数据都是null的bug
1.错误描述 今天测试人员提了一个bug,说使用我们的app出现了闪退的bug,后来通过debug断点调试,发现我们的app转换服务器发送过来的json数据后,都是为null.而之前已经提测快一个月的 ...
- 我的Android进阶之旅------>解决Android Studio编译后安装apk报错:The APK file does not exist on disk
1.错误描述 今天用Android Studio编译应用后安装APK的时候,报错了,错误如下所示: The APK file build\outputs\apk\OYP_2.3.4_I2Base_64 ...
- 我的Android进阶之旅------>解决Android Studio全局搜索搜不到结果的问题
1.问题描述 今天使用Android Studio时,想通过使用快捷键Ctrl+Shift+F来进行全局搜索指定字符串,如下图所示:想搜索字符串"码农偷懒了", 打开string. ...
- 我的Android进阶之旅------>解决:Execution failed for task ':app:transformResourcesWithMergeJavaResForDebug'.
错误描述 今天在Android Studio项目中加入了jackson的开发包,编译运行时候,引发了如下的错误: Error:Execution failed for task ':app:trans ...
- 我的Android进阶之旅------>解决如下错误failed to copy 'Settings2.apk' to '/system/app//Settings2.apk': Read-only
push apk的时候报错 ouyangpeng@oyp-ubuntu:~/apk升级$ adb push Settings2.apk /system/app/ failed to copy 'Set ...
- 我的Android进阶之旅------>解决DownloadManager报错java.lang.SecurityException: Invalid value for visibility: 2
1.问题描述 今天使用Android系统的DownloadManager进行下载操作时,爆了如下所示的错误: java.lang.RuntimeException: Unable to start s ...
- 我的Android进阶之旅------>解决Error: specified for property 'mergedManifest' does not exist.
错误描述 刚运行从Github上面下载而来的代码时,爆了如下所示的bug,错误描述如下所示: Error:A problem was found with the configuration of t ...
- 我的Android进阶之旅------>解决Error:Unable to find method 'org.gradle.api.internal.project.ProjectInternal.g
错误描述 今天在Github上面下载了一份代码,然后导入到Android Studio中直接报了如下图所示的错误: 错误描述如下: Error: Unable to find method 'org. ...
- 我的Android进阶之旅------>解决Error:Could not find property 'compile' on org.gradle.api.internal.artifacts.
1错误描述 解决方法 1错误原因 2解决方法 1.错误描述 刚刚,Android Studio突然编译不了了,报了如下错误: Error:Could not find property 'compil ...
随机推荐
- Ubuntu下键盘输入错乱问题,输入双引号输出的是@符号,输入#号输出的是未知语言的字符
装完搜狗后,键盘开始出现混乱,切换到英文输入法,输入双引号输出的是@符号,输入#号输出的是未知语言的字符. 网上有的说在 system - keyboard - Input Source 下看看是否是 ...
- 基于numpy的随机数构造
class numpy.random.RandomState(seed=None) RandomState 是一个基于Mersenne Twister算法的伪随机数生成类 RandomState 包含 ...
- root-me web server 20-30 writeup
Remote File Inclusion-远程文件包含 Get the PHP source code. ctrl+u 进行RFI攻击需要同时具备三个条件(被攻击机器): allow_url_fop ...
- css断句 word-break
word-break:break-all;word-wrap:break-word; 兼容IE6 火狐 chrome
- cadence制作封装要素
cadence中封装制作完成后必须包含的元素: 1. 引脚. 2. 零件外形,轮廓线.package geometry->silkscreen_top, assembly_top. 3. 参考编 ...
- 【Mac + GitHub】之在另一台Mac电脑上下载GitHub的SSH链接报错
当输入git命令github项目时报错: ⇒ git clone git@github.com:/TX-Class.git Cloning into 'TX-Class'... Warning: Pe ...
- [Tips]Fix node.js addon build error: "gyp: binding.gyp not found"
基于node-gyp写Node.js native addon的时候,碰到一个很恶心的问题. 调用“node-gyp configure”能成功,再调用“node-gyp”时总会报错,最后发现时系统时 ...
- php 相同的产品 一个背景色
Array ( [0] => 12 [1] => 17 [2] => 17 [3] => 17 [4] => 17 [5] => 3 [6] => 3 [7] ...
- .NET学习笔记(1)
把 DataSet 绑定到 Repeater 控件 Repeater 控件用于显示重复的项目列表,这些项目被限制在该控件.Repeater 控件可被绑定到数据库表.XML 文件或者其他项目列表. 获取 ...
- 多线程之使用读写锁ReentrantReadWriteLock实现缓存系统
简单地缓存系统:当有线程来取数据时.假设该数据存在我的内存中.我就返回数据.假设不存在我的缓存系统中,那么就去查数据库.返回数据的同一时候保存在我的缓存中. 当中涉及到读写问题:当多个线程运行读操作时 ...