pbootcms网站模板|日韩1区2区|织梦模板||网站源码|日韩1区2区|jquery建站特效-html5模板网

包 android.support.v4.app 不存在;在安卓工作室 0.8

package android.support.v4.app does not exist ; in Android studio 0.8(包 android.support.v4.app 不存在;在安卓工作室 0.8)
本文介紹了包 android.support.v4.app 不存在;在安卓工作室 0.8的處理方法,對(duì)大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

問題描述

我最近將 android studio IDE 更新到 0.8 以使用新的 android L SDK.首先,我導(dǎo)入了一個(gè)完成的 android 項(xiàng)目,該項(xiàng)目在舊版本的 android studio 中沒有收到任何錯(cuò)誤.在 0.8 版 i 行如

I've recently updated the android studio IDE to 0.8 to work with the new android L SDK. To start I imported a finished android project that receives no errors in the older version of android studio. In version 0.8 i lines such as

導(dǎo)入android.support.v4.app.Fragment;
獲取:無法解決支持,導(dǎo)致其余代碼出現(xiàn)錯(cuò)誤.logcat 返回 101 個(gè)

import android.support.v4.app.Fragment;
get: Support cannot be resolved causing the rest of the code to have errors. The logcat returns 101 instances of

Error:(8, 30) error: package android.support.v4.app does not exist

每次我在導(dǎo)入語句中調(diào)用支持庫時(shí)為 1.

1 for each time I call the support library in an import statement.

我試過了

  • 重新安裝 IDE
  • 刪除idea文件夾的內(nèi)容
  • 正在安裝所有 SDK - 包括支持庫
  • 同步 gradle
  • 手動(dòng)將支持庫復(fù)制到 libs 文件夾中
  • 重建項(xiàng)目
  • 以及創(chuàng)建一個(gè)新項(xiàng)目來測(cè)試庫

不完全確定還需要做什么.

not entirely sure what's left to do.

推薦答案

[由于某些原因,此答案與 Eclipse 相關(guān),而不是 Android Studio!]

您是否嘗試過將支持庫設(shè)置為您的類路徑?這個(gè)鏈接來自 Android 開發(fā)者的網(wǎng)站有一些關(guān)于如何做到這一點(diǎn)的信息.

Have you tried setting the support libraries to your class path? This link from the Android Developer's website has some info on how to do that.

嘗試從網(wǎng)站上執(zhí)行以下步驟:

Try following these steps from the website:

根據(jù)支持庫代碼創(chuàng)建庫項(xiàng)目:

Create a library project based on the support library code:

  • 確保您已使用 SDK 管理器下載了 Android 支持庫.
  • 創(chuàng)建一個(gè)庫項(xiàng)目并確保所需的 JAR 文件包含在項(xiàng)目的構(gòu)建路徑中:

  • Make sure you have downloaded the Android Support Library using the SDK Manager.
  • Create a library project and ensure the required JAR files are included in the project's build path:

  • 選擇文件>導(dǎo)入.
  • 選擇 Eexisting Android Code Into Workspace 并點(diǎn)擊下一步.
  • 瀏覽至 SDK 安裝目錄,然后瀏覽至 Support Library 文件夾.例如,如果您要添加 appcompat 項(xiàng)目,請(qǐng)瀏覽到/extras/android/support/v7/appcompat/.
  • 單擊完成"導(dǎo)入項(xiàng)目.對(duì)于 v7 appcompat 項(xiàng)目,您現(xiàn)在應(yīng)該會(huì)看到一個(gè)名為 android-support-v7-appcompat 的新項(xiàng)目.
  • 在新的庫項(xiàng)目中,展開 libs/ 文件夾,右鍵單擊每個(gè) .jar 文件并選擇 Build Path > Add to Build Path.例如,在創(chuàng)建 v7 appcompat 項(xiàng)目時(shí),將 android-support-v4.jar 和 android-support-v7-appcompat.jar 文件都添加到構(gòu)建路徑中.
  • 右鍵單擊庫項(xiàng)目文件夾并選擇構(gòu)建路徑>配置構(gòu)建路徑.
  • Order and Export 選項(xiàng)卡中,檢查您剛剛添加到構(gòu)建路徑的 .jar 文件,以便它們可用于依賴此庫項(xiàng)目的項(xiàng)目.例如,appcompat 項(xiàng)目要求您同時(shí)導(dǎo)出 android-support-v4.jar 和 android-support-v7-appcompat.jar 文件.
  • 取消選中 Android 依賴項(xiàng).
  • 單擊確定"完成更改.
  • Select File > Import.
  • Select Existing Android Code Into Workspace and click Next.
  • Browse to the SDK installation directory and then to the Support Library folder. For example, if you are adding the appcompat project, browse to /extras/android/support/v7/appcompat/.
  • Click Finish to import the project. For the v7 appcompat project, you should now see a new project titled android-support-v7-appcompat.
  • In the new library project, expand the libs/ folder, right-click each .jar file and select Build Path > Add to Build Path. For example, when creating the the v7 appcompat project, add both the android-support-v4.jar and android-support-v7-appcompat.jar files to the build path.
  • Right-click the library project folder and select Build Path > Configure Build Path.
  • In the Order and Export tab, check the .jar files you just added to the build path, so they are available to projects that depend on this library project. For example, the appcompat project requires you to export both the android-support-v4.jar and android-support-v7-appcompat.jar files.
  • Uncheck Android Dependencies.
  • Click OK to complete the changes.

您現(xiàn)在擁有一個(gè)用于所選支持庫的庫項(xiàng)目,您可以將其與一個(gè)或多個(gè)應(yīng)用程序項(xiàng)目一起使用.

You now have a library project for your selected Support Library that you can use with one or more application projects.

  • 將庫添加到您的應(yīng)用程序項(xiàng)目中:
  • Project Explorer 中,右鍵單擊您的項(xiàng)目并選擇 Properties.
  • 在對(duì)話框左側(cè)的類別面板中,選擇Android.
  • 窗格中,點(diǎn)擊添加按鈕.
  • 選擇庫項(xiàng)目并單擊確定".例如,appcompat 項(xiàng)目應(yīng)列為 android-support-v7-appcompat.
  • 在屬性窗口中,單擊確定".
  • Add the library to your application project:
  • In the Project Explorer, right-click your project and select Properties.
  • In the category panel on the left side of the dialog, select Android.
  • In the Library pane, click the Add button.
  • Select the library project and click OK. For example, the appcompat project should be listed as android-support-v7-appcompat.
  • In the properties window, click OK.

這篇關(guān)于包 android.support.v4.app 不存在;在安卓工作室 0.8的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請(qǐng)聯(lián)系我們刪除處理,感謝您的支持!

相關(guān)文檔推薦

Why would you choose Android API over Google APIs in the SDK on Eclipse?(為什么在 Eclipse 的 SDK 中選擇 Android API 而不是 Google API?)
Couchbase Bucket authentication error(Couchbase 存儲(chǔ)桶身份驗(yàn)證錯(cuò)誤)
admob 6.2.1 nullpointer exception(admob 6.2.1 空指針異常)
How to setup SDK in IntelliJ IDEA?(如何在 IntelliJ IDEA 中設(shè)置 SDK?)
My phone cannot be detected in eclipse to test run(eclipse 無法檢測(cè)到我的手機(jī)進(jìn)行試運(yùn)行)
platform-toolsaapt.exe directory missing in android SDK(android SDK 中缺少 platform-toolsaapt.exe 目錄)
主站蜘蛛池模板: 广西教师资格网-广西教师资格证考试网 | 防爆型气象站_农业气象站_校园气象站_农业四情监测系统「山东万象环境科技有限公司」 | 山东PE给水管厂家,山东双壁波纹管,山东钢带增强波纹管,山东PE穿线管,山东PE农田灌溉管,山东MPP电力保护套管-山东德诺塑业有限公司 | VOC检测仪-甲醛检测仪-气体报警器-气体检测仪厂家-深恒安科技有限公司 | 成都热收缩包装机_袖口式膜包机_高速塑封机价格_全自动封切机器_大型套膜机厂家 | 东莞爱加真空科技有限公司-进口真空镀膜机|真空镀膜设备|Polycold维修厂家 | 1000帧高速摄像机|工业高速相机厂家|科天健光电技术 | 哈尔滨京科脑康神经内科医院-哈尔滨治疗头痛医院-哈尔滨治疗癫痫康复医院 | 步进_伺服_行星减速机,微型直流电机,大功率直流电机-淄博冠意传动机械 | 派财经_聚焦数字经济内容服务平台 | 上海单片机培训|重庆曙海培训分支机构—CortexM3+uC/OS培训班,北京linux培训,Windows驱动开发培训|上海IC版图设计,西安linux培训,北京汽车电子EMC培训,ARM培训,MTK培训,Android培训 | 警用|治安|保安|不锈钢岗亭-售货亭价格-垃圾分类亭-移动厕所厂家-苏州灿宇建材 | KBX-220倾斜开关|KBW-220P/L跑偏开关|拉绳开关|DHJY-I隔爆打滑开关|溜槽堵塞开关|欠速开关|声光报警器-山东卓信有限公司 | 交流伺服电机|直流伺服|伺服驱动器|伺服电机-深圳市华科星电气有限公司 | 渗透仪-直剪仪-三轴仪|苏州昱创百科 | 承插管件_不锈钢承插管件_锻钢高压管件-温州科正阀门管件有限公司 | 变位机,焊接变位机,焊接变位器,小型变位机,小型焊接变位机-济南上弘机电设备有限公司 | 铝箔袋,铝箔袋厂家,东莞铝箔袋,防静电铝箔袋,防静电屏蔽袋,防静电真空袋,真空袋-东莞铭晋让您的产品与众不同 | MTK核心板|MTK开发板|MTK模块|4G核心板|4G模块|5G核心板|5G模块|安卓核心板|安卓模块|高通核心板-深圳市新移科技有限公司 | 北京中创汇安科贸有限公司| 底部填充胶_电子封装胶_芯片封装胶_芯片底部填充胶厂家-东莞汉思新材料 | 咖啡加盟,咖啡店加盟连锁品牌-卡小逗 | 上海律师咨询_上海法律在线咨询免费_找对口律师上策法网-策法网 广东高华家具-公寓床|学生宿舍双层铁床厂家【质保十年】 | 森旺-A级防火板_石英纤维板_不燃抗菌板装饰板_医疗板 | 谷歌关键词优化-外贸网站优化-Google SEO小语种推广-思亿欧外贸快车 | 武汉刮刮奖_刮刮卡印刷厂_为企业提供门票印刷_武汉合格证印刷_现金劵代金券印刷制作 - 武汉泽雅印刷有限公司 | 开业庆典_舞龙舞狮_乔迁奠基仪式_开工仪式-神挚龙狮鼓乐文化传媒 | app开发|app开发公司|小程序开发|物联网开发||北京网站制作|--前潮网络 | 胜为光纤光缆_光纤跳线_单模尾纤_光纤收发器_ODF光纤配线架厂家直销_北京睿创胜为科技有限公司 - 北京睿创胜为科技有限公司 | 青岛美佳乐清洁工程有限公司|青岛油烟管道清洗|酒店|企事业单位|学校工厂厨房|青岛油烟管道清洗 插针变压器-家用电器变压器-工业空调变压器-CD型电抗器-余姚市中驰电器有限公司 | 线粒体膜电位荧光探针-细胞膜-标记二抗-上海复申生物科技有限公司 | PTFE接头|聚四氟乙烯螺丝|阀门|薄膜|消解罐|聚四氟乙烯球-嘉兴市方圆氟塑制品有限公司 | 自动配料系统_称重配料控制系统厂家 | 沈阳激光机-沈阳喷码机-沈阳光纤激光打标机-沈阳co2激光打标机 | 无缝钢管-聊城无缝钢管-小口径无缝钢管-大口径无缝钢管 - 聊城宽达钢管有限公司 | 牛奶检测仪-乳成分分析仪-北京海谊| 书信之家_书信标准模板范文大全| 恒温恒湿试验箱_高低温试验箱_恒温恒湿箱-东莞市高天试验设备有限公司 | 短信通106短信接口验证码接口群发平台_国际短信接口验证码接口群发平台-速度网络有限公司 | 动力配电箱-不锈钢配电箱-高压开关柜-重庆宇轩机电设备有限公司 聚天冬氨酸,亚氨基二琥珀酸四钠,PASP,IDS - 远联化工 | 苏州工作服定做-工作服定制-工作服厂家网站-尺品服饰科技(苏州)有限公司 |