AS 问题汇总

作者: 努力学习的安同学 | 来源:发表于2018-06-08 16:01 被阅读0次

标注:本文为个人整理,仅做自己学习参考使用,请勿转载和转发
2018-06-06: 初稿

1. 集成module
  • compile project(':blemodule')
  • 该语句在主app的build.gradle中的dependencies中添加了该方法,表示主app程序依赖该blemodule名称的library。
1.1 问题1,make不成功
Error:Execution failed for task ':blemodule:processDebugManifest'.
> Manifest merger failed with multiple errors, see logs
  • 目的本事想着新建一个module,然后在app中启动module中的Service,但是遇到了显式调用和隐式调用的问题,在查明调用方法后,还是没有调用成功,经查明,如果主app要调用module中的service的话,需要将该module集成到service中,见上文
  • 集成的过程中,library的module的build.gradle和主app的build.gradle里面的minSdkVersion和compileSdkVersion版本必须一样,然后在主app中的dependencies添加上文的compile project(':blemodule')即可
  • 错误地方
<application
        android:allowBackup="true"
        android:supportsRtl="true">
        <service
            android:name="com.project.ankie.blemodule.BleService"
            android:process=":ble">
            // 本来想添加隐式调用的intent的action,但是显示调用了,这个地方我就空下了,然后编译不过去,调试了好久,好桑❤️
            <intent-filter>   
            </intent-filter>
        </service>
    </application>

相关文章

网友评论

    本文标题:AS 问题汇总

    本文链接:https://www.haomeiwen.com/subject/jprasftx.html