导入一个android项目报错的解决办法
16lz
2021-01-26
一、可能是设置不对,选择菜单window>preferences弹出对话框
1.单击Android,设置android-sdk的安装目录
2.单击java>installed jres,添加jdk的安装目录
二、可能是string.xml中的含有百分号%导致整个项目都是红叉:
Multiple annotations found at this line:
- error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false"attribute?
- error: Unexpected end tag string
- error: Unexpected end tag string
有两个办法可供选择
1.用%%来表示1个%,和转意符号 \ 的用法相同
2.如果你的字符串不需要格式化,可以在你的<string 标签上增加一个属性:formatted="false"例如 <string name="test" formatted="false">%test%</string> 即可。
修改之后,单击选中项目,然后选择菜单project下的clean...ok
三、运行时报错
Re-installation failed due to different application signatures.
Poc]Please execute 'adb uninstall com.ims.poc.ui' in a shell.
解决方法:在模拟器中选择settings〉application manage〉uninstall
1.单击Android,设置android-sdk的安装目录
2.单击java>installed jres,添加jdk的安装目录
二、可能是string.xml中的含有百分号%导致整个项目都是红叉:
Multiple annotations found at this line:
- error: Multiple substitutions specified in non-positional format; did you mean to add the formatted="false"attribute?
- error: Unexpected end tag string
- error: Unexpected end tag string
有两个办法可供选择
1.用%%来表示1个%,和转意符号 \ 的用法相同
2.如果你的字符串不需要格式化,可以在你的<string 标签上增加一个属性:formatted="false"例如 <string name="test" formatted="false">%test%</string> 即可。
修改之后,单击选中项目,然后选择菜单project下的clean...ok
三、运行时报错
Re-installation failed due to different application signatures.
Poc]Please execute 'adb uninstall com.ims.poc.ui' in a shell.
解决方法:在模拟器中选择settings〉application manage〉uninstall
更多相关文章
- Android(安卓)之 下拉(Spinner) 组件示例
- Android(安卓)学习(1)——AndroidStudio安装以及Helloworld
- Android(安卓)Studio2.0导入PullToRefresh
- Android(安卓)自定义数字选择器,可以根据自己的需求更改
- android 的NDK在Windwos环境搭建(一)
- The source attachment does not contain the source for the fi
- SlidingMenu库的导入以及Jar mismatch问题
- Spinner的功能和用法-通过XML生成
- 安装Android(安卓)studio 出现的问题及解决办法