Your project contains error(s), please fix it before running it

Your project contains error(s), please fix it before running it

   


如题的问题很常见,经常出现在导入一个已有工程的情况,当常用办法:clean theproject解决不了的时候不妨试一下下面的方法:


在系统盘符下找到当前用户目录: %USERPROFILE%,该目录下有个文件夹 .android,删掉它再通过上面的办法:清除工程再编译就行了。(linux的路径在~/.android/debug.keystore)

这种解决办法也适用下面的问题:
 
Rcannot be resolved to a variable  
 cannot find R.layout.main 


不知道上面问题的根源是不是在于debug的KeyStore过期,因为
在preference->android->build中找到Defaultdebug KeyStore的地址,然后把debug keystore删除就行了
最后一样clean、build也能成功(其实Default debug KeyStore就在.android文件夹内)

你可能感兴趣的:(linux,Build)