我知道这已经被问过很多次了,没有答案,但我仍然希望有人终于解决了这个问题.
问题:我有一个运行Android 2.3的非root设备.我需要创建一个服务:
像许多其他人一样,我已经陷入了#2.以下是有史以来建议的解决方案的摘要:
com.android.internal.telephony.CallManager及其方法registerForPreciseCallStateChanged(例如,这一个):不起作用,没有电话在其中注册,因此事件不会触发.com.android.internal.telephony.PhoneFactory获得com.android.internal.telephony.Phone实例(这是一切的关键):不工作,工厂没有被初始化; 尝试makeDefaultPhones使用安全异常中的调用结果初始化它(如此处).看起来已经尝试了所有东西,但仍然可能还有一个技巧可以拯救我:)
我需要在 Windows 10(最新版本)下使用 VS2017 构建旧的 .NET 项目的小帮助。
我的问题是我需要以某种方式引用的“MSHTML”组件。通过References - Add - COM - Microsoft HTML Object Library这样做会导致以下构建错误:
warning MSB3283: Cannot find wrapper assembly for type library "MSHTML".
Verify that (1) the COM component is registered correctly and (2) your
target platform is the same as the bitness of the COM component.
For example, if the COM component is 32-bit, your target platform
must not be 64-bit.
Run Code Online (Sandbox Code Playgroud)
当我尝试直接引用C:\Windows\system32\mshtml.tlb时,会发生同样的错误。
我找到的唯一解决方案(例如,http : //techninotes.blogspot.ru/2016/08/fixing-cannot-find-wrapper-assembly-for.html)假设mshtml已经在 GAC 中我的情况:我在 …