天天看點

Android------ 騰訊tbs适配Android Q啦~~

       首先說聲抱歉,去年更新App目标版本到Android Q,使用騰訊tbs時在一加7plus,華為mate20上報錯了,還吐槽了他們,不過最後還是通過降低版本到28解決了,最近發現騰訊tbs已經适配到Android Q了,于是嘗試了一下,發現真的不報錯了,小夥伴們可以愉快的玩耍啦~~大廠更新就是快,以下我的使用方式:

1.在App的build.gradle目錄下更換tbs版本:

沒更新之前是43697

Android------ 騰訊tbs适配Android Q啦~~

更新後版本為43903

Android------ 騰訊tbs适配Android Q啦~~
代碼如下:
dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'androidx.appcompat:appcompat:1.1.0'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test.ext:junit:1.1.1'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
    implementation "com.tencent.tbs.tbssdk:sdk:43903"
}
           

2.目标版本升到29後記得适配外部存儲權限,這裡就不詳細說了,參考如下文章:

https://www.cnblogs.com/xiaxveliang/p/12395913.html

https://blog.csdn.net/singwhatiwanna/article/details/90835549

3.在模拟器Pixel 3a上面實作的效果圖如下:

Android------ 騰訊tbs适配Android Q啦~~

 4.真機目前測試過華為、一加7plus、小米等,小夥伴們如有問題,可以給我回報,我會及時更新.

最後,項目完整位址如下:https://gitee.com/jackning_admin/X5WebViewDemo

繼續閱讀