|
/

安卓 使用社会化分享 微信分享 返回app崩溃

Dd*
发布于 5 年前
558
社会化分享 U-Share
SDK集成与升级
功能使用

例如包名com.umeng.soexample

WXEntryActivity的路径为 com.umeng.soexample.share.wxapi.WXEntryActivity

报错

java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.umeng.soexample/com.umeng.soexample.wxapi.WXEntryActivity}: java.lang.ClassNotFoundException: Didn't find class "com.umeng.soexample.wxapi.WXEntryActivity" on path: DexPathList[[zip file "/system/framework/android.test.mock.jar", zip file "/system/framework/android.test.runner.jar", zip file "/system/framework/com.google.android.maps.jar", zip file "/data/app/com.umeng.soexample-oRyp2tbvH_VHVIHuMtvFng==/base.apk"],nativeLibraryDirectories=[/data/app/com.umeng.soexample-oRyp2tbvH_VHVIHuMtvFng==/lib/arm64, /data/app/com.umeng.soexample-oRyp2tbvH_VHVIHuMtvFng==/base.apk!/lib/arm64-v8a, /system/lib64, /system/vendor/lib64]]

我使用

<activity
android:name=".share.wxapi.WXEntryActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:exported="true"
android:theme="@android:style/Theme.Translucent.NoTitleBar" />

<activity-alias
android:name="${applicationId}.wxapi.WXEntryActivity"
android:exported="true"
android:targetActivity=".share.wxapi.WXEntryActivity"
/>

请问我是activity-alias 用的不对 ?

还是sdk微信分享不支持使用activity-alias ?

如果不对 我友盟分享sdk是集成在module中的应该如何去做 ?

5个回答
 
5 年前

您好,这个WXEntryActivity不能写在modle下,必须写在主工程下。 不然找不到这个activity , 另外不支持配置activity-alias。

 
5 年前

你这个应该是依赖的库吧,这个类只能在包名目录下,不能这样设置

<activity

android:name=".share.wxapi.WXEntryActivity"

android:configChanges="keyboardHidden|orientation|screenSize"

android:exported="true"

android:theme="@android:style/Theme.Translucent.NoTitleBar"/>

 
5 年前

你好,测试demo可以吗

Loading ...
登录社区,分享你的经验