targetSdkVersion 升级,出现的问题

https://chinagdg.org/2016/01/picking-your-compilesdkversion-minsdkversion-targetsdkversion/

原来的是 targetSdkVersion = 25,因vivo应用市场提醒需要升级到 28,可能出现一系列问题,现记录如下:

升级到26

不允许注册静态广播

Android8.0后,当App targetSDK >= 26,几乎禁止了所有的隐式广播的静态注册监听。

toast 引起的崩溃

Android7.1.1Toast 大范围崩溃
解决方案:
https://github.com/GrenderG/Toasty

升级到 28

1.微信登录异常错误

Only fullscreen opaque activities can request orientation
点击微信登录,确定授权后提示“应用程度崩溃”,后台报错如上。

stackoverflow解决方法:# java.lang.IllegalStateException: Only fullscreen opaque activities can request orientation

The problem seems to be happening when your target sdk is 28.
So after trying out many options finally this worked.

 <activity
        android:name=".activities.FilterActivity"
        android:theme="@style/Transparent"
        android:windowSoftInputMode="stateHidden|adjustResize" />
style:-

<style name="Transparent" parent="Theme.AppCompat.Light.NoActionBar">
        <item name="android:windowIsTranslucent">true</item>
        <item name="android:windowBackground">@android:color/transparent</item>
        <item name="android:windowContentOverlay">@null</item>
        <item name="android:windowNoTitle">true</item>
        <item name="android:windowIsFloating">true</item>
        <item name="android:backgroundDimEnabled">false</item>
    </style>
Note:parent="Theme.AppCompat.Light.NoActionBar" is needed for api 28. 
Previously had something else at api 26. Was working great but started to give problem at 28. 
Hope it helps someone out here.