Android(安卓)helloword demo程序不能运行
16lz
2021-12-04
问题: 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(安卓)运行 Linux 可执行程序
- 10.10笔记,android通知栏兼容性,matches the given name 'android
- android 开启本地相册选择图片并返回显示
- android的ndk编译时错误__android_log_print无法找到定义
- Android获取apk的版本及包名等信息
- 2012.08.23——— android ndk 编译多个so
- RHEL5 CENTOS5上编译Android内核的步骤
- Android中NDK各版本下载
- Android(安卓)Studio编译中“png-cruncher_*”异常的解决方案