参考文档:
https://www.android-doc.com/guide/topics/manifest/uses-library-element.html
报错:
java.lang.NoClassDefFoundError: Failed resolution of: Lorg/apache/http/conn/scheme/SchemeRegistry;
解决方法
在AndroidManifest文件下的application节点里,添加 <uses-library android:name=”org.apache.http.legacy” android:required=”false”/>
<application
android:name=".base.BaseApplication"
android:allowBackup="true"
android:icon="@mipmap/icon"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<uses-library android:name="org.apache.http.legacy"
android:required="false"/>
<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" />
<!--注意,这里的222222要换成app自己的appid-->
<data android:scheme="tencent222222" />
<!-- 100380359 100381104 222222 -->
</intent-filter>
</activity>
<activity
android:name="com.tencent.connect.common.AssistActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:screenOrientation="behind"
android:theme="@android:style/Theme.Translucent.NoTitleBar" />
</application>
版权声明:本文为jingzz1原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。