简体   繁体   English

如何在新的android项目中使用整个android项目

[英]How can I use whole android project inside a new android project

I have source code of indic-keyboard , and I want to use functionality of this project in my app, I have tried converting indic-project into a library, but that seems tough, so I am looking for some other workaround for this thing. 我有indic-keyboard的源代码,并且我想在我的应用程序中使用该项目的功能,我曾尝试将indic-project转换为库,但这似乎很困难,因此我正在寻找针对此问题的其他解决方法。

What can/have I try/tried- 我可以/尝试/尝试过什么?

  1. I try to change "apply plugin: 'com.android.application'' to "apply plugin: 'com.android.library", then synced the gradle and got this some errors( check this issue ), there I got confirmation developer of indic-keyboard that it will be tough to convert it into a library as this project is an input-method which relies on system settings. 我尝试将“应用插件:'com.android.application”更改为“应用插件:'com.android.library”,然后同步gradle,并得到了一些错误( 检查此问题 ),在那里我得到了开发人员的确认indic-keyboard,很难将其转换为库,因为此项目是一种依赖于系统设置的输入法。
  2. So now I am thinking to use whole the project within my app, such that it will compile just after the installation of my app, but I am not sure where to start, I mean what things should I remove from build.gradle of indic-keyboard so that it stop generating apk, if somehow I am able to do that then it may not be that tough,I need just the idea how should I proceed, so if you have worked on these type of things then please provide your valuable suggestions. 因此,现在我正在考虑在应用程序中使用整个项目,以便在安装应用程序后立即进行编译,但是我不确定从哪里开始,我的意思是我应该从build.gradle中删除哪些内容,键盘,这样它就可以停止生成apk,如果我能够做到这一点,那么可能就不那么难了,我只需要我应该怎么做就可以了,因此,如果您从事过这类工作,请提供宝贵的建议。

*edit - I have also tried importing as module(suggested by zgc7009) but that produces error as shown in following images *编辑-我也尝试导入作为模块(由zgc7009建议),但是会产生错误,如下图所示 在此处输入图片说明 在此处输入图片说明

印度键盘已经可以在Play商店中使用了,我建议在运行时检查用户是否拥有该软件包( 在此处查看详细信息),并采取相应的措施:如果用户拥有该软件包就可以了,否则,您可以打开Play商店(详细信息) 在这里

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM