Android studio开发遇到的问题及解决方法
1.building xxxx(你的项目名称)gradle project info
解决办法:
以本机为例,在本机的C:\Users\xxxx.gradle\wrapper\dists
2. Unable to get the CMake version located at
解决办法:
到sdk manager中下载cmake。如图所示:
这里写图片描述
3.Error:java.util.concurrent.ExecutionException: com.android.toolsxxx
解决办法:
在工程的gradle.properties文件中添加以下命令:
android.enableAapt2=false
4.Installation failed with message INSTALL_FAILED_USER_RESTRICTED.
It is possible that this issue is resolved by uninstalling an existing version of the apk if it is present, and then re-installing.
WARNING: Uninstalling will remove the application data!
Do you want to uninstall the existing application?
解决办法:
在File —— Settings——Build,Execution,Deployment——Instant Run
中把Enable Instant Run to hot swap code/resource changes on deploy(default enabled)取消勾选,应用即可。
如果手机真机测试(魅族MX6测试):去手机管家里面的权限管理的USB安装管理取消应用,安装即可。
5.Error parsing XML: XML or text declaration not at start of entity
解决办法:
布局中xml 必须在第一行第一列开始。并且只能出现一次。所以是前面有空格,或者是否出现两个xml
网友评论