久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

向 Android Cordova 插件添加依賴項(xiàng)

Add a dependency to an Android Cordova plugin(向 Android Cordova 插件添加依賴項(xiàng))
本文介紹了向 Android Cordova 插件添加依賴項(xiàng)的處理方法,對(duì)大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

問題描述

我正在構(gòu)建一個(gè) Cordova Android 插件.我想在 由插件創(chuàng)建Intent 中使用第 3 方 View(特別是 剪刀).通常(在非 Cordova 項(xiàng)目中)我會(huì)轉(zhuǎn)到我的項(xiàng)目的 build.gradle 文件并像這樣添加它:

I'm building a Cordova Android plugin. I want to use a 3rd party View inside an Intent that is created by the plugin (specifically scissors). Normally (in non Cordova projects) I would go to my project's build.gradle file and add it like this:

dependencies {
compile 'com.lyft:scissors:1.0.1' }

但我的插件項(xiàng)目中的 build.gradle 文件似乎不應(yīng)該被觸及?向插件項(xiàng)目添加依賴項(xiàng)以支持通過 Cordova 構(gòu)建和通過 Android Studio 構(gòu)建的正確方法是什么?同樣的問題,但針對(duì)本地項(xiàng)目(未托管在 GitHub 上).

But it seems like the build.gradle file in my plugin's project wasn't meant to be touched? What is the proper way to add a dependency to a plugin project, to support both builds via Cordova and builds via Android Studio? Same question, but for a local project (not hosted on GitHub).

推薦答案

你必須使用你自己的 gradle 文件然后像這樣鏈接到 plugin.xml

You have to use your own gradle file then link it on the plugin.xml like this

<framework src="relative/path/your.gradle" custom="true" type="gradleReference" />

您必須將該標(biāo)簽放在 plugin.xml 上,因此在插件安裝時(shí)它會(huì)被讀取并由 cordova 處理(不確定它是如何在內(nèi)部工作的,但我想它會(huì)從您的自定義 .gradle 到主 build.gradle).

You have to put that tag on the plugin.xml, so on plugin install it's read and cordova handles it (not sure how it works internally, but I suppose that it copies the values from your custom .gradle to the main build.gradle).

所以你不能在你當(dāng)前的項(xiàng)目上測試它,你必須創(chuàng)建一個(gè)新項(xiàng)目并添加插件,看看它是否有效

So you can't test it on your current project, you have to create a new project and add the plugin and see if it works

這篇關(guān)于向 Android Cordova 插件添加依賴項(xiàng)的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

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

相關(guān)文檔推薦

IncompatibleClassChangeError after updating to Android Build Tools 25.1.6 GCM / FCM(更新到 Android Build Tools 25.1.6 GCM/FCM 后出現(xiàn) IncompatibleClassChangeError)
How to get current flavor in gradle(如何在 gradle 中獲取當(dāng)前風(fēng)味)
How to fix quot;unexpected element lt;queriesgt; found in lt;manifestgt;quot; error?(如何修復(fù)“意外元素lt;查詢gt;在“清單中找到錯(cuò)誤?)
Multi flavor app based on multi flavor library in Android Gradle(基于 Android Gradle 中多風(fēng)味庫的多風(fēng)味應(yīng)用)
Android dependency has different version for the compile and runtime(Android 依賴在編譯和運(yùn)行時(shí)有不同的版本)
Transitive dependencies for local aar library(本地 aar 庫的傳遞依賴)
主站蜘蛛池模板: 国产精品视频一二三区 | 欧美一级在线观看 | 亚洲国产精品一区二区第一页 | 久久久九九九九 | 九九九久久国产免费 | 精品久久香蕉国产线看观看亚洲 | 国产亚洲精品久久久优势 | 久久99久久 | 狠狠操电影 | 国产精品毛片一区二区在线看 | 自拍在线| 日韩精品a在线观看图片 | 日韩免费视频一区二区 | 成人免费在线 | 日韩精品一区二区三区中文在线 | 九九热最新地址 | 99热视 | 久久精品二区亚洲w码 | 五月综合激情在线 | 综合久久久 | 日本一区二区高清不卡 | 在线观看黄色电影 | 一区二区三区久久 | 羞羞午夜 | 日韩小视频在线 | 日日日干干干 | 欧美日韩一区在线播放 | 国产精品久久久久久一区二区三区 | 成人不卡 | 精品国产免费人成在线观看 | 秋霞精品| 国产高清视频一区 | 午夜日韩视频 | 欧美日韩专区 | 日韩在线精品视频 | 亚洲区中文字幕 | 亚洲天堂中文字幕 | 成人免费一区二区三区视频网站 | 8x国产精品视频一区二区 | 日韩欧美在线播放 | 欧美精品在线观看 |