Android helloword demo程序不能运行
16lz
2021-01-23
问题: Android Studio 创建 的新helloword demo 程序不能运行,
一编译就出错,
Error:(2) Error retrieving parent for item: No resource found that matches the given name 'android:Theme.Material.Light'.Error:Execution failed for task ':app:processDebugResources'.> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Users\ocean\AppData\Local\Android\sdk\build-tools\23.0.1\aapt.exe'' finished with non-zero exit value 1
根据Error 提示, 编译器找不到对应的类,所以报错。
分析原因:为编译时使用的SDK 版本太低导致。
解决方法:升高引用SDK的版本。
方法如下: 1,打开Android Studio File -> Project Structure 菜单
2,选择 左侧 App ITem ,然后选择Properties Tab
3, Compile sdk Version 选择 高版本 5.x
更多相关文章
- android 开启本地相册选择图片并返回显示
- Android获取 应用程序大小,数据大小,缓存大小
- 在4.0以上系统中应用出现2.3版本的系统UI
- Android 异步任务加载图片代码
- Android应用程序键盘(Keyboard)消息处理机制分析(26)
- android通过程序收起通知栏
- Android中NDK各版本下载
- android 开发上传图片遇到返回 FileNotFoundException
- Android ListView(Selector 背景图片 全选 Checkbox等按钮)