[英]How can I Integrate my Widget Application into my another Application
Hi guy's Please See the question asked on this link[ Integration of my widget with my application ][1] 嗨,大家好,请参阅此链接上的问题[ 我的小部件与我的应用程序集成 ] [1]
[1]: My problem is exactly same as the question asked on this link. [1]:我的问题与此链接上的问题完全相同。 Very first I have tried this Ans=>
首先,我尝试过这个Ans =>
1] i) Turn the Widget project into a Library project : properties -> Android -> and tick Is Library ii) Go to the original project and import the Widget project : properties -> Android -> Add iii)In the original project's Manifest, add the text between the (...) , including and , into the (...) But this didn't work for me.. Then I tried second ans ie--- 1] i)将Widget项目转换为Library项目:properties-> Android->并勾选Is Library ii)转到原始项目并导入Widget项目:properties-> Android-> Add iii)在原始项目的Manifest中,将(...)之间的文本(包括和)添加到(...)中,但这对我不起作用。。然后我尝试了第二个答案,即
2] Copy all code from one package to 2nd one and merge AndroidManifest.xml ... 2]将所有代码从一个包复制到第二个包并合并AndroidManifest.xml ...
But in this case My both application ie widget App and Another app has MainActivity.. So there is ambiguity between them.. ! 但是在这种情况下,我的两个应用程序(即小部件应用程序和另一个应用程序)都具有MainActivity ..因此它们之间存在歧义。 Please help..!
请帮忙..!
Finally I've solved my problem, what I did is-- 终于我解决了我的问题,我所做的是-
I have copied all Activities, Classes and Services form my widget app to my another app. 我已将所有活动,类和服务从我的窗口小部件应用程序复制到另一个应用程序。 After that I have merged the both Manifest files (One from widget app. and one from my another app) into my another app, so that it is a single Manifest file.
之后,我将两个清单文件(一个来自小部件应用程序,一个来自另一个应用程序)合并到另一个应用程序中,因此它是一个清单文件。 And the main problem was my widget app and another app both had the activity with same name ie MainActivity, so to resolve this problem I've just renamed MainActivity from my widget app to StartActivity, and problem got solved, now application is running fine.!
而且主要的问题是我的窗口小部件应用程序和另一个应用程序都具有相同名称的活动,即MainActivity,因此为了解决此问题,我将MainActivity从我的窗口小部件应用程序重命名为StartActivity,问题得以解决,现在应用程序可以正常运行。 !
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.