綁定帳號登入

Android 台灣中文網

打印 上一主題 下一主題

[求助] Android studio import library 失敗,不知原因

[複製連結] 查看: 2837|回覆: 1|好評: 0
跳轉到指定樓層
樓主
y30103123 | 收聽TA | 只看該作者 回帖獎勵 |倒序瀏覽 |閱讀模式
發表於 2015-2-26 19:39
20碎鑽
前幾天買了一組nordic Beacon的開發套件
使用了官方提供的Android Library 內容是這樣的

nRF Beacon
==========

The source code for nRF Toolbox has been separated into 3 projects. The DFU service has been moved to a new library project which may now be easily
integrated with your application. To keep the Android support v4 library up-to-date we have created another project with just one jar file in
the libs folder.

The nrf-logger-v2.0 library has been moved to DFULibrary.
The android-support-v4 library has been moved to AndroidSupportLibrary.

Usage:
Import all projects: nRFToolbox, AndroidSupportLibrary and DFULibrary into Eclipse ADT.
The projects should compile without any changes if Android 5 SDK (API 21) is installed.

nRF Beacon Service
==================

nrf-beacon-lib.v2.0.jar library is used to:
- on Android 4.3 and 4.4: to communicate with the required nRF Beacon Service application (https://play.google.com/store/apps/details?id=no.nordicsemi.android.beacon.service).
- on Android 5: scan for beacons. Since Android 5 the service application is deprecated and is not being used. It may be uninstalled from the device.

See nRF Beacon Service API documentation for details.

裡面有三個project library
分別是 AndroidSupportLibrary ,DfuLibrary,nRFBeacon (文中的nRFToolbox)

我做法是新開一個專案
然後File -> project structure -> 左上角+號 -> Import Existing Project -> 選擇nRFBeacon 它會自動import AndroidSupportLibrary 跟DFULibrary 兩個專案  ->  在到app的Dependencies 把nRFBeacon 新增進去

是這樣就可以了嗎? 還是我的順序錯誤了?
因為最後的error是

最佳答案

查看完整內容

程式應該不是用 Android Studio 開發的,當然不能直接匯入. 看起來是資源檔內容 (xml) 沒有對應到,應該都是空的吧! (請看看,空的就要把原始碼補進 Android Studio 架構中), 右上方的圖告知有用到的定數沒有出現在 dimen.xml 中. 所以問題就是,程式匯入後在 Resource 下 (res) 下有沒有 dimen.xml ? 如果沒有就手動建立及填入原始檔中的內容,copy 起來貼上吧! ...
「用Android 就來APK.TW」,快來加入粉絲吧!
Android 台灣中文網(APK.TW)
收藏收藏 分享分享 分享專題
用Android 就來Android 台灣中文網(https://apk.tw)
回覆

使用道具 舉報

沙發
0948217712 | 收聽TA | 只看該作者
發表於 2015-2-26 19:39
程式應該不是用 Android Studio 開發的,當然不能直接匯入.

看起來是資源檔內容 (xml) 沒有對應到,應該都是空的吧! (請看看,空的就要把原始碼補進 Android Studio 架構中), 右上方的圖告知有用到的定數沒有出現在 dimen.xml 中. 所以問題就是,程式匯入後在 Resource 下 (res) 下有沒有 dimen.xml ? 如果沒有就手動建立及填入原始檔中的內容,copy 起來貼上吧!

評分

參與人數 1碎鑽 +1 幫助 +1 收起 理由
y30103123 + 1 + 1 非常讚

查看全部評分

用Android 就來Android 台灣中文網(https://apk.tw)
回覆

使用道具 舉報

您需要登錄後才可以回帖 登錄 | 註冊

本版積分規則