Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

发布到bintray打包so #8

Closed
chendongMarch opened this issue Dec 23, 2016 · 7 comments
Closed

发布到bintray打包so #8

chendongMarch opened this issue Dec 23, 2016 · 7 comments

Comments

@chendongMarch
Copy link

so文件是必须打包进去吗?

@shaohui10086
Copy link
Owner

是问的这个项目?这些so文件都是微博的SDK添加的,我也不知道这些是不是必须的,不过我可以不负责任的告诉你,我之前没有添加这些so文件的时候也是可以分享的,可能是为了照顾某些机型,所以最好还是加上吧

@chendongMarch
Copy link
Author

是这样的,我是想问像这种so文件可不可以不打包发布到bintray.而是使用者需要哪个平台自己添加。

另外一个问题,我编译你的demo工程(不是运行,只是编译)提示:
Error:Execution failed for task ':shareutil:processDebugAndroidTestManifest'.

Manifest merger failed : Attribute data@scheme at manifestMerger7161687073138699374.xml requires a placeholder substitution but no value for <qq_id> is provided.

example/build.gradle中明明添加了
defaultConfig {
manifestPlaceholders = [
// 替换成你的qq_id
qq_id: "123456789"
]
}

@shaohui10086
Copy link
Owner

额,这个确实欠考虑,当时只是想让用的人省点心,所以就直接打包进去了,以后有机会我再把它踢出来。

这个报错,不是example报的,是library那个module报的,因为那个build.gradle文件里没有写manifestPlaceholders

@chendongMarch
Copy link
Author

那在module/build.gradle下定义了manifestPlaceholders,使用的人在app/build.gradle下做同样定义就会覆盖?我在两个build.gradle文件中都加了但是没有覆盖,用的还是module/build.gradle下的写死的。怎么在app下动态配置呢?

@shaohui10086
Copy link
Owner

manifestPlaceholders 不能在library这个module中配置,因为一旦配置,最后生成的AndroidManifest文件就是合成之后的,即<data android:scheme="tencent${qq_id}" />被替换成<data android:scheme="tencent1234" />
这就是最后生成aar中的AndroidManifest文件:

        <activity
            android:name="com.tencent.tauth.AuthActivity"
            android:launchMode="singleTask"
            android:noHistory="true" >
            <intent-filter>
                <action android:name="android.intent.action.VIEW" />

                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />

                <data android:scheme="tencent1234" />
            </intent-filter>
        </activity>

${qq_id}消失了,替换成了你在librarybuild.gradle中所配置的值,所以最后libraryappAndroidManifest文件合并的时候也就不会发生替换。关于AndroidManifest文件合并,可以看下我的另一篇文章:传送门

@chendongMarch
Copy link
Author

但是module里面不配置manifestPlaceholders编译不通过,报我上面说的那个问题
Manifest merger failed : Attribute data@scheme at manifestMerger7161687073138699374.xml requires a placeholder substitution but no value for <qq_id> is provided.
方便加个联系方式吗?这个效率好低

@shaohui10086
Copy link
Owner

编译是不过,但是是可以跑起来的

我微信:shaohui10086

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants