Eclipse导入android项目出现很多错误
2023-09-11 14:17:47 时间
Eclipse导入android项目出现很多错误
【问题描述】
使用Eclipse导入别人正确的android项目,会出现很多未知的错误。如下面的AndroidTest项目,在别人的Eclipse上是完全正常,而当导入到其他版本的Eclipse就会出现错误
The import android.support.v7 cannot be resolved错误,ActionBarActivity cannot be resolved to a type错误,error: Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'等错误。
这主要是版本配置的问题。主要原因是未导入该Android项目依赖的支持库文件:appcompat_v7
【appco
mpat_v7】
appcompat_v7是Google自己的一个兼容包,就是一个支持库,能让2.1以上全使用上4.0版本的界面。一般在创建新项目时,会自动导入。如果想要不要它,可在新建项目时直接把最小SDK(Minimum Required SDK)选在Android4.0以上即可。
由于导入别人
的Android
项目的最小SDK小于4.0,而本地导入项目时,并未把appcompat_v7导入,因此会出现错误。解决办法多种:
【解决方法1】在本地Eclipse,新建一个Android项目,最小SDK版本(Minimum Required SDK)小于4.0即可。这时新建完成后,会自动生成一个appcompat_v7文件,这时Project-->clean一下就没有错误啦。
【解决方法2】导入appcompat_v7文件即可:下载地址http://download.csdn.net/detail/guyuealian/9548401
然后点击:File-->Import导入后,再Clean即可~!
【转载请注明出处】http://blog.csdn.net/guyuealian/article/details/51659793
相关文章
- Android开发之Fragment传递参数的几种方法
- Android性能调优
- Android Studio错误提示:Gradle project sync failed. Basic functionality (eg. editing, debugging) will not work properly
- [Android] 解析android framework下利用app_process来调用java写的命令及示例
- [Android Pro] android 禁用和开启四大组件的方法(setComponentEnabledSetting )
- Android API之android.provider.ContactsContract.Contacts
- android配置文件详解
- 【已解决】unity4.2.0f4 导出Android工程报错:Error building Player: ArgumentException: Illegal characters in path. [unity导出android工程 报错,路径含有非法字符]
- 【VLC-Android】vlc-android简例
- 【Android】android镜像翻转
- Atitit.反编译apk android源码以及防止反编译apk
- Android问题笔记 - 还没解决CreateProcess error=206 文件名或扩展名太长的错误?
- android源码分析
- android 证书验证流程分析_Android签名机制之---签名验证过程详解
- Android 长按Button出现一个菜单
- Android报错提示:Failed to resolve: com.android.support.constraint:constraint-layout:1.1.3
- Android 11.0 12.0SystemUI增加低电量弹窗功能
- Android 12.0 屏蔽FallbackHome机制去掉android正在启动直接进入默认Launcher功能实现
- android 9.0 Launcher3长按拖拽时最后一屏未满时不让拖拽到后一屏(二)
- Android 10.0 软硬键盘同时使用的兼容(软键盘与内置物理键盘共存)
- Android 9.0 10.0 去掉开机提示 android is starting 的对话框
- android 10.0 selinux权限冲突解决
- 【错误记录】Android Studio 编译报错 ( The minCompileSdk (33) specified in a dependency‘s AAR metadata META-I )
- 【Android Gradle 插件】build.gradle 中的 android 配置 ( 配置项 | compileSdkVersion 配置 | buildToolsVersion 配置 )
- Android 监听SMS短信
- Eclipse正在使用Ant扑灭Android数据包错误的解决方案 – Perhaps JAVA_HOME does not point to the JDK
- android HDMI 清晰度 分辨率
- Android开展:ADT+Eclipse使用错误:Text editor does not have a document provider
- Android培训班(76)Dalvik虚拟机的CallStaticVoidMethod函数
- iled to read key AndroidDebugKey from store “D:路经.androiddebug.keystore“: Invalid keystore format
- The Android Gradle plugin supports only Kotlin Gradle plugin version 1.5.20 and higher