Android 台灣中文網

標題: Android studio import library 失敗,不知原因 [打印本頁]

作者: y30103123    時間: 2015-2-26 19:39
標題: Android studio import library 失敗,不知原因
前幾天買了一組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是
擷取.JPG
登錄/註冊後可看大圖