wjc
2 天以前 1c91b62ea573082581e72fd433d02e3dc52dbf51
2026年01月05日11:00:26 升级gradle和uni库

google新规,需要支持16kb页面:
1.升级gradle插件(8.7.3)和gradle(8.11.1);
2,升级uni库;
1个文件已添加
5个文件已删除
20个文件已修改
776 ■■■■■ 已修改文件
aa_chart_core/build.gradle 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/build.gradle 101 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/libs/android-gif-drawable-1.2.28.aar 补丁 | 查看 | 原始文档 | blame | 历史
app/libs/android-gif-drawable-1.2.29.aar 补丁 | 查看 | 原始文档 | blame | 历史
app/libs/breakpad-build-release.aar 补丁 | 查看 | 原始文档 | blame | 历史
app/libs/uniMPSDK-V2-release.aar 补丁 | 查看 | 原始文档 | blame | 历史
app/libs/uniapp-v8-release.aar 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/AndroidManifest.xml 95 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/hdl/photovoltaic/HDLApp.java 67 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/hdl/photovoltaic/other/HdlPushLogic.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/hdl/photovoltaic/push/VendorChannelActivity.java 122 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/hdl/photovoltaic/push/aliyun/MyAliYunMessageReceiver.java 136 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/hdl/photovoltaic/push/fcm/MyFirebaseMessagingService.java 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/hdl/photovoltaic/push/jpush/JPushReceiverService.java 80 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/hdl/photovoltaic/push/jpush/JpushService.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/hdl/photovoltaic/ui/BPowerStationActivity.java 58 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/hdl/photovoltaic/ui/CPowerStationActivity.java 58 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/hdl/photovoltaic/ui/StartActivity.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
build.gradle 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
countrypicker/build.gradle 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
gradle.properties 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
gradle/wrapper/gradle-wrapper.properties 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pickerview/build.gradle 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
sdk/build.gradle 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
third-zxing/build.gradle 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
wheelview/build.gradle 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
aa_chart_core/build.gradle
@@ -1,6 +1,7 @@
apply plugin: 'com.android.library'
android {
    namespace 'com.github.AAChartModel.AAChartCore'
    compileSdkVersion 33
    defaultConfig {
app/build.gradle
@@ -11,6 +11,7 @@
]
android {
    namespace 'com.hdl.photovoltaic'
    signingConfigs {
        debug {
            storeFile file('../keystore/Untitled')
@@ -63,10 +64,10 @@
        ]
    }
    // 保证其他的lib没有被preDex
    dexOptions {
        preDexLibraries = false
    }
//    // 保证其他的lib没有被preDex
//    dexOptions {
//        preDexLibraries = false
//    }
    repositories {
        flatDir {
            dirs 'libs'
@@ -85,7 +86,11 @@
//        abortOnError false
//    }
    packagingOptions {
        jniLibs {
            useLegacyPackaging true
        }
    }
    /**
     * 打包自动命名
     */
@@ -110,6 +115,7 @@
    buildFeatures {
        viewBinding true
        aidl true
        buildConfig = true
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
@@ -154,7 +160,7 @@
    //二维码库
    implementation project(path: ':third-zxing')
    //Link本地库(在线依赖网络库)
    implementation 'com.hdl.android:pmsdk:1.0.18'
    implementation 'com.hdl.android:pmsdk:1.0.22'
//    implementation 'com.hdl.android:debugsdk:1.0.71'
    implementation project(path: ':sdk')
    implementation 'androidx.activity:activity:1.2.3'
@@ -175,8 +181,7 @@
    //图片加载库
    implementation 'com.github.bumptech.glide:glide:4.13.0'
    annotationProcessor 'com.github.bumptech.glide:compiler:4.12.0'
    annotationProcessor 'com.github.bumptech.glide:compiler:4.9.0'
    //添加StatusBarUtil的依赖 状态栏适配
    implementation 'com.jaeger.statusbarutil:library:1.5.1'
@@ -185,13 +190,13 @@
    //********UniSDK必须添加的依赖 start********
    implementation "androidx.recyclerview:recyclerview:1.0.0"
    implementation 'com.alibaba:fastjson:1.2.66'//必须集成,fastjson功能需要
    implementation 'com.facebook.fresco:fresco:2.5.0'//必须集成,图片加载需要
    implementation 'com.facebook.fresco:animated-gif:2.5.0'//必须集成,图片加载需要
    implementation 'com.facebook.fresco:webpsupport:2.5.0'
    implementation 'com.facebook.fresco:animated-webp:2.5.0'
    implementation 'com.github.bumptech.glide:glide:4.9.0'//必须集成,图片加载需要
    implementation 'com.facebook.fresco:fresco:3.6.0'//必须集成,图片加载需要
    implementation 'com.facebook.fresco:animated-gif:3.6.0'//必须集成,图片加载需要
    implementation 'com.facebook.fresco:webpsupport:3.6.0'
    implementation 'com.facebook.fresco:animated-webp:3.6.0'
    implementation 'com.github.bumptech.glide:glide:5.0.5'//必须集成,图片加载需要
    implementation 'com.android.support:multidex:1.0.3'
    implementation 'androidx.webkit:webkit:1.3.0'//3.6.15版本之后 必须集成,用来支持暗黑模式
    implementation 'androidx.webkit:webkit:1.6.1'//3.6.15版本之后 必须集成,用来支持暗黑模式
    //********UniSDK必须添加的依赖 end********
    //NanoHTTPD搭建服务器
    implementation 'org.nanohttpd:nanohttpd:2.3.1'
@@ -203,82 +208,14 @@
    //通用适配器
    implementation 'com.github.CymChad:BaseRecyclerViewAdapterHelper:3.0.6'
    // 此处以JPush 5.0.3 版本为例,注意:从 5.0.0 版本开始可以自动拉取 JCore 包,无需另外配置
    implementation 'cn.jiguang.sdk:jpush-google:5.2.2'
    //分析和用户标签等功能(可选,集成极光分析SDK后,即可支持行为触发推送消息、推送转化率统计,用户行为分)
    implementation 'cn.jiguang.sdk:joperate:2.0.2'
    //若不集成厂商通道,可直接跳过以下依赖
    // 极光厂商插件版本与接入 JPush 版本保持一致,下同
    // 接入华为厂商
    implementation 'com.huawei.hms:push:6.9.0.300'
    implementation 'cn.jiguang.sdk.plugin:huawei:5.0.3'
    implementation 'com.huawei.agconnect:agconnect-core:1.9.1.301'
    // //友盟
    // implementation 'com.umeng.umsdk:common:9.5.6'// 必选
    // implementation 'com.umeng.umsdk:asms:1.6.3'// 必选
    // implementation 'com.umeng.umsdk:apm:1.7.0' // 错误分析
    //引入FCM(原生谷歌)
    implementation 'com.google.firebase:firebase-messaging:23.2.1'
    // 引入FCM
    implementation 'com.google.firebase:firebase-messaging:23.0.0' // 使用最新版本
    // 使用 ShortcutBadger 库,清除角标
    implementation 'me.leolin:ShortcutBadger:1.1.22@aar'
    // 阿里云推送核心库
    implementation 'com.aliyun.ams:alicloud-android-push:3.9.3'
    //辅助通道
    implementation 'com.aliyun.ams:alicloud-android-third-push:3.9.2'
////华为依赖
//    implementation 'com.aliyun.ams:alicloud-android-third-push-huawei:3.10.1'
//小米国内通道依赖
    implementation 'com.aliyun.ams:alicloud-android-third-push-xiaomi:3.9.2'
//OPPO依赖
    implementation 'com.aliyun.ams:alicloud-android-third-push-oppo:3.9.2'
////vivo依赖
//    implementation 'com.aliyun.ams:alicloud-android-third-push-vivo:3.10.1'
////魅族依赖
//    implementation 'com.aliyun.ams:alicloud-android-third-push-meizu:3.10.1'
////谷歌依赖
//    implementation 'com.aliyun.ams:alicloud-android-third-push-fcm:3.10.1'
////荣耀依赖
//    implementation 'com.aliyun.ams:alicloud-android-third-push-honor:3.10.1'
//    // 可选:如果你需要处理后台消息,可能需要以下依赖
//    implementation 'com.google.firebase:firebase-analytics:21.0.0'
//    // 接入 FCM 厂商
//    implementation 'com.google.firebase:firebase-messaging:23.1.2'
//    implementation 'cn.jiguang.sdk.plugin:fcm:5.0.3'
//    // 接入魅族厂商
//    implementation 'cn.jiguang.sdk.plugin:meizu:5.0.3'
//    // 接入 VIVO 厂商
//    implementation 'cn.jiguang.sdk.plugin:vivo:5.0.3'
//    // 接入小米厂商
//    implementation 'cn.jiguang.sdk.plugin:xiaomi:5.0.3'
//    // 接入 OPPO 厂商
//    implementation 'cn.jiguang.sdk.plugin:oppo:5.0.3'
//    // JPush Android SDK v4.6.0 开始,需要单独引入 oppo 厂商 aar ,请下载官网 SDK 包并把 jpush-android-xxx-release/third-push/oppo/libs 下的 aar 文件单独拷贝一份到应用 module/libs 下
//    implementation(name: 'com.heytap.msp-push-3.1.0', ext: 'aar')
//
//    //以下为 OPPO 3.1.0 aar需要依赖
//    implementation 'com.google.code.gson:gson:2.6.2'
//    implementation 'commons-codec:commons-codec:1.6'
//    implementation 'androidx.annotation:annotation:1.1.0'
//    // 接入荣耀厂商
//    implementation 'cn.jiguang.sdk.plugin:honor:5.0.3'
//    //需要单独引入荣耀厂商 aar ,请下载官网 SDK 包并把 jpush-android-xxx-release/third-push/honor/libs 下的 aar 文件单独拷贝一份到应用 module/libs 下
//    implementation(name: 'HiPushSdk-v7.0.41.301', ext: 'aar')
//    应用 Module 配置
//    如果选择的厂商通道包含了 Huawei 厂商通道和 FCM 厂商通道,则需要额外执行以下操作,若未选择可忽略本步骤。
//    FCM:在 Firebase 上创建和 JPush 上同包名的待发布应用,创建完成后下载该应用的 google-services.json 配置文件并添加到应用的 module 目录下。
//    Huawei:在 Huawei 上创建和 JPush 上同包名的待发布应用,创建完成后下载该应用的 agconnect-services.json 配置文件并添加到应用的 module 目录下。
    //可以使用CardView组件来为视图设置阴影效果
}
app/libs/android-gif-drawable-1.2.28.aar
Binary files differ
app/libs/android-gif-drawable-1.2.29.aar
Binary files differ
app/libs/breakpad-build-release.aar
Binary files differ
app/libs/uniMPSDK-V2-release.aar
Binary files differ
app/libs/uniapp-v8-release.aar
Binary files differ
app/src/main/AndroidManifest.xml
@@ -106,59 +106,6 @@
        android:supportsRtl="false"
        android:theme="@style/Theme.PhotovoltaicDebug"
        tools:replace="android:supportsRtl">
        <!-- 厂商通道专用Activity(透明中转页),创建一个透明的Activity来处理厂商通道点击 -->
        <!--        <activity-->
        <!--            android:name=".push.VendorChannelActivity"-->
        <!--            android:excludeFromRecents="true"-->
        <!--            android:exported="true"-->
        <!--            android:launchMode="singleTask"-->
        <!--            android:noHistory="true"-->
        <!--            android:screenOrientation="portrait"-->
        <!--            android:taskAffinity="">-->
        <activity
            android:name=".push.VendorChannelActivity"
            android:exported="true"
            android:screenOrientation="portrait">
            <!--            &lt;!&ndash; 小米通道 &ndash;&gt;-->
            <!--            <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:host="com.hdl.photovoltaic"-->
            <!--                    android:scheme="push" />-->
            <!--            </intent-filter>-->
            <!--            &lt;!&ndash; 华为通道 &ndash;&gt;-->
            <!--            <intent-filter>-->
            <!--                <action android:name="android.intent.action.VIEW" />-->
            <!--                <category android:name="android.intent.category.DEFAULT" />-->
            <!--                <data-->
            <!--                    android:host="com.hdl.photovoltaic.huawei"-->
            <!--                    android:scheme="push" />-->
            <!--            </intent-filter>-->
            <!--            &lt;!&ndash; OPPO通道 &ndash;&gt;-->
            <!--            <intent-filter>-->
            <!--                <action android:name="android.intent.action.VIEW" />-->
            <!--                <category android:name="android.intent.category.DEFAULT" />-->
            <!--                <data-->
            <!--                    android:host="com.hdl.photovoltaic.oppo"-->
            <!--                    android:scheme="push" />-->
            <!--            </intent-filter>-->
            <!--            &lt;!&ndash; vivo通道 &ndash;&gt;-->
            <!--            <intent-filter>-->
            <!--                <action android:name="android.intent.action.VIEW" />-->
            <!--                <category android:name="android.intent.category.DEFAULT" />-->
            <!--                <data-->
            <!--                    android:host="com.hdl.photovoltaic.vivo"-->
            <!--                    android:scheme="push" />-->
            <!--            </intent-filter>-->
        </activity>
        <activity
            android:name=".ui.me.NotificationSettingsActivity"
            android:exported="false" />
@@ -227,7 +174,6 @@
            android:name=".ui.me.CPersonalDataActivity"
            android:exported="false" />
        <service android:name=".widget.apkwgtupload.ApkDownLoadService" /> <!-- largeHeap="true" 临时缓解内存不足问题 -->
        <activity
            android:name=".ui.me.WebActivity"
            android:exported="false"
@@ -266,7 +212,6 @@
            android:name=".ui.LoginActivity"
            android:exported="false"
            android:theme="@style/login_Theme" />
        <activity android:name=".widget.apkwgtupload.AndroidPermissionActivity" />
        <activity
            android:name=".ui.StartActivity"
            android:exported="true"
@@ -297,31 +242,7 @@
            <meta-data
                android:name="android.support.FILE_PROVIDER_PATHS"
                android:resource="@xml/dcloud_file_provider" />
        </provider> <!-- Since JCore2.0.0 Required SDK核心功能 -->
        <!-- 可配置android:process参数将Service放在其他进程中;android:enabled属性不能是false -->
        <!-- 这个是自定义Service,要继承极光JCommonService,可以在更多手机平台上使得推送通道保持的更稳定 -->
        <service
            android:name=".push.jpush.JpushService"
            android:enabled="true"
            android:exported="false"
            android:process=":pushcore">
            <intent-filter>
                <action android:name="cn.jiguang.user.service.action" />
            </intent-filter>
        </service> <!-- Required since 5.2.0 -->
        <!-- 新的 tag/alias 接口结果返回需要开发者配置一个自定义的Service -->
        <!-- 5.2.0开始所有事件将通过该类回调 -->
        <!-- 该广播需要继承 JPush 提供的 JPushMessageService 类, 并如下新增一个 Intent-Filter -->
        <service
            android:name=".push.jpush.JPushReceiverService"
            android:enabled="true"
            android:exported="false">
            <intent-filter>
                <action android:name="cn.jpush.android.intent.SERVICE_MESSAGE" />
                <category android:name="com.hdl.photovoltaic" />
            </intent-filter>
        </service> <!-- uniMqtt必要的,开启mqtt1883端口一个服务 -->
        </provider>
        <service
            android:name="org.eclipse.paho.android.service.MqttService"
            android:exported="false" />
@@ -348,19 +269,7 @@
            android:enabled="true"
            android:exported="false"
            android:foregroundServiceType="dataSync" /> <!-- Android 10+ 需要指定类型 -->
        <receiver
            android:name=".push.aliyun.MyAliYunMessageReceiver"
            android:exported="false">
            <intent-filter>
                <action android:name="com.alibaba.push2.action.NOTIFICATION_OPENED" />
            </intent-filter>
            <intent-filter>
                <action android:name="com.alibaba.push2.action.NOTIFICATION_REMOVED" />
            </intent-filter>
            <intent-filter>
                <action android:name="com.alibaba.sdk.android.push.RECEIVE" />
            </intent-filter>
        </receiver>
        <meta-data
            android:name="design_height_in_dp"
app/src/main/java/com/hdl/photovoltaic/HDLApp.java
@@ -19,12 +19,6 @@
import androidx.multidex.MultiDex;
import com.alibaba.sdk.android.push.CloudPushService;
import com.alibaba.sdk.android.push.CommonCallback;
import com.alibaba.sdk.android.push.noonesdk.PushInitConfig;
import com.alibaba.sdk.android.push.noonesdk.PushServiceFactory;
import com.alibaba.sdk.android.push.register.MiPushRegister;
import com.alibaba.sdk.android.push.register.OppoRegister;
import com.google.android.gms.common.ConnectionResult;
import com.google.android.gms.common.GoogleApiAvailability;
import com.google.firebase.messaging.FirebaseMessaging;
@@ -193,18 +187,16 @@
//        //9.初始化网络工具
//        NetWorkUtil.init(this);
        initAutoSize();
//        //初始化极光推送
//        initJPush();
//        //谷歌原生fcm推送
//        // 检查 Google Play Services 后再初始化 FCM
//        if (isGooglePlayServicesAvailable(this)) {
//            initFCM();
//        } else {
//            HdlLogLogic.print("Google Play Services 不可用,无法使用 FCM", true);
//            // 可以在这里初始化备选推送方案(如阿里云自建通道)
//        }
        //阿里云推送
        initAliYunPush();
        //初始化极光推送
        initJPush();
        //谷歌原生fcm推送
        // 检查 Google Play Services 后再初始化 FCM
        if (isGooglePlayServicesAvailable(this)) {
            initFCM();
        } else {
            HdlLogLogic.print("Google Play Services 不可用,无法使用 FCM", true);
            // 可以在这里初始化备选推送方案(如阿里云自建通道)
        }
        initHDLLinkPMSdk();
        HDLLinkLocalSdk.getInstance().init(getInstance());
        initSocket();
@@ -221,45 +213,6 @@
    }
    /**
     * 初始化阿里云推送
     */
    private void initAliYunPush() {
        PushInitConfig pushInitConfig = new PushInitConfig.Builder()
                .application(this)
                .appKey("335628427") //请填写你自己的appKey,云端给的
                .appSecret("fd1dabe7ec494c878a5970d8646c83bc") //请填写你自己的appSecret,云端给的
                .build();
        PushServiceFactory.init(pushInitConfig);
        CloudPushService pushService = PushServiceFactory.getCloudPushService();
        pushService.register(this, new CommonCallback() {
            @Override
            public void onSuccess(String success) {
                String deviceId = pushService.getDeviceId();
                Log.d("com.aliyun.emas.pocdemo", "获取deviceId " + deviceId);
                saveToken(deviceId);
            }
            @Override
            public void onFailed(String errorCode, String errorMessage) {
                //错误码连接:https://help.aliyun.com/document_detail/434686.html?spm=a2c4g.11186623.0.0.62d3556dC2DqKJ#topic-1824037
                Log.d("com.aliyun.emas.pocdemo", "初始化失败,错误码: " + errorCode + "错误信息: " + errorMessage);
            }
        });
        if (AppConfigManage.isDebug()) {
            //仅适用于Debug包,正式包不需要此行
            pushService.setLogLevel(CloudPushService.LOG_DEBUG);
        }
        //小米
        //appKey/appSecret在小米开发者平台获取
        MiPushRegister.register(this, "2882303761520382032", "5612038223032");
        // OPPO通道注册
        //appKey/appSecret在OPPO开发者平台获取
        OppoRegister.register(this, "d80747c83e38442aaa2e5183c310bae0", "86afce21417b49a4984816024b15d4b9");
    }
    /**
     * 初始化友盟SDK,抓闪退日志
app/src/main/java/com/hdl/photovoltaic/other/HdlPushLogic.java
@@ -27,7 +27,6 @@
import java.util.Objects;
import cn.jpush.android.api.NotificationMessage;
/**
app/src/main/java/com/hdl/photovoltaic/push/VendorChannelActivity.java
File was deleted
app/src/main/java/com/hdl/photovoltaic/push/aliyun/MyAliYunMessageReceiver.java
File was deleted
app/src/main/java/com/hdl/photovoltaic/push/fcm/MyFirebaseMessagingService.java
@@ -20,24 +20,16 @@
import com.google.firebase.messaging.RemoteMessage;
import com.hdl.photovoltaic.R;
import com.hdl.photovoltaic.config.ConstantManage;
import com.hdl.photovoltaic.config.UserConfigManage;
import com.hdl.photovoltaic.enums.MessageStateType;
import com.hdl.photovoltaic.other.HdlPushLogic;
import com.hdl.photovoltaic.push.CustomNotification;
import com.hdl.photovoltaic.push.PushMessageInfoBean;
import com.hdl.photovoltaic.ui.BPowerStationActivity;
import com.hdl.photovoltaic.ui.StartActivity;
import com.hdl.photovoltaic.uni.HDLUniMPSDKManager;
import com.hdl.sdk.link.core.bean.eventbus.BaseEventBus;
import org.greenrobot.eventbus.EventBus;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import cn.jpush.android.api.NotificationMessage;
import java.util.List;
/**
 * 谷歌推送消息接收方法
app/src/main/java/com/hdl/photovoltaic/push/jpush/JPushReceiverService.java
File was deleted
app/src/main/java/com/hdl/photovoltaic/push/jpush/JpushService.java
File was deleted
app/src/main/java/com/hdl/photovoltaic/ui/BPowerStationActivity.java
@@ -85,7 +85,6 @@
import java.util.List;
import java.util.Objects;
import cn.jpush.android.api.JPushInterface;
/**
@@ -294,63 +293,6 @@
        portConflictDialog();
    }
    /**
     * 上传极光注册ID到云端
     */
    private void pushTokens() {
        String registrationId_tag = "registrationID_" + UserConfigManage.getInstance().getUserId();
        String is_registrationID = HDLApp.getInstance().getKey(registrationId_tag);
        if (is_registrationID.equals("true")) {
            //上过就没有必要在上传啦
            return;
        }
        HdlThreadLogic.runSubThread(new Runnable() {
            @Override
            public void run() {
                String registrationID = JPushInterface.getRegistrationID(_mActivity);
                int addCount = 0;
                while (TextUtils.isEmpty(registrationID)) {
                    SystemClock.sleep(1000);//1s休眠
                    registrationID = JPushInterface.getRegistrationID(_mActivity);
                    addCount++;
                    if (addCount > 5) {
                        //5s超时
                        break;
                    }
                }
                if (!TextUtils.isEmpty(registrationID)) {
//                    UserConfigManage.getInstance().setRegistrationID(registrationID);
//                    UserConfigManage.getInstance().Save();
                    String finalRegistrationID = registrationID;
                    HdlPushLogic.getInstance().pushAdd(new CloudCallBeak<String>() {
                        @Override
                        public void onSuccess(String pushId) {
                            if (!TextUtils.isEmpty(pushId)) {
                                UserConfigManage.getInstance().setPushToken(finalRegistrationID);
                                UserConfigManage.getInstance().setPushId(pushId);
                                UserConfigManage.getInstance().Save();
                            }
                            HDLApp.getInstance().setInfoMap(registrationId_tag, "true");//记录一下状态,后台杀死app会清空;
                            HdlLogLogic.print("添加极光ID到云端---registrationID:" + UserConfigManage.getInstance().getUserName() + "---" + finalRegistrationID, true);
                        }
                        @Override
                        public void onFailure(HDLException e) {
                            HDLApp.getInstance().setInfoMap(registrationId_tag, "false");//记录一下状态,后台杀死app会清空;
                            HdlLogLogic.print("添加极光ID到云端失败---registrationID:" + UserConfigManage.getInstance().getUserName() + "---" + finalRegistrationID, true);
                        }
                    });
                }
            }
        });
    }
    /**
     * 上传 token 到服务器
app/src/main/java/com/hdl/photovoltaic/ui/CPowerStationActivity.java
@@ -68,7 +68,6 @@
import java.util.List;
import java.util.Objects;
import cn.jpush.android.api.JPushInterface;
/**
 * C端-电站界面
@@ -438,63 +437,6 @@
        //移除监听
        HDLLinkLocalSdk.getInstance().removeAllTopicsListener(allTopicsListener);
//        stopService(mForegroundService);
    }
    /**
     * 上传极光注册ID到云端
     */
    private void pushTokens() {
        String registrationId_tag = "registrationID_" + UserConfigManage.getInstance().getUserId();
        String is_registrationID = HDLApp.getInstance().getKey(registrationId_tag);
        if (is_registrationID.equals("true")) {
            //上过就没有必要在上传啦
            return;
        }
        HdlThreadLogic.runSubThread(new Runnable() {
            @Override
            public void run() {
                String registrationID = JPushInterface.getRegistrationID(_mActivity);
                int addCount = 0;
                while (TextUtils.isEmpty(registrationID)) {
                    SystemClock.sleep(1000);//1s休眠
                    registrationID = JPushInterface.getRegistrationID(_mActivity);
                    addCount++;
                    if (addCount > 5) {
                        //5s超时
                        break;
                    }
                }
                if (!TextUtils.isEmpty(registrationID)) {
//                    UserConfigManage.getInstance().setRegistrationID(registrationID);
//                    UserConfigManage.getInstance().Save();
                    String finalRegistrationID = registrationID;
                    HdlPushLogic.getInstance().pushAdd(new CloudCallBeak<String>() {
                        @Override
                        public void onSuccess(String pushId) {
                            if (!TextUtils.isEmpty(pushId)) {
                                UserConfigManage.getInstance().setPushToken(finalRegistrationID);
                                UserConfigManage.getInstance().setPushId(pushId);
                                UserConfigManage.getInstance().Save();
                            }
                            HDLApp.getInstance().setInfoMap(registrationId_tag, "true");//记录一下状态,后台杀死app会清空;
                            HdlLogLogic.print("C端---添加极光ID到云端---registrationID:" + UserConfigManage.getInstance().getUserName() + "--->" + finalRegistrationID, true);
                        }
                        @Override
                        public void onFailure(HDLException e) {
                            HDLApp.getInstance().setInfoMap(registrationId_tag, "false");//记录一下状态,后台杀死app会清空;
                            HdlLogLogic.print("C端---添加极光ID到云端失败---registrationID:" + UserConfigManage.getInstance().getUserName() + "--->" + finalRegistrationID, true);
                        }
                    });
                }
            }
        });
    }
    /**
app/src/main/java/com/hdl/photovoltaic/ui/StartActivity.java
@@ -39,7 +39,6 @@
import java.util.List;
import java.util.Objects;
import cn.jpush.android.api.JPushInterface;
/**
@@ -263,19 +262,10 @@
        HDLApp.getInstance().isStartInitThirdSDK = true;
        //初始化友盟SDK
        // initUMengSDK();
//        //初始化极光推送
//        initJPush();
    }
    /**
     * 初始化极光SDK
     */
    private void initJPush() {
        JPushInterface.setDebugMode(true);
        JPushInterface.init(getBaseContext());
    }
    /**
     * 初始化友盟SDK,抓闪退日志
build.gradle
@@ -3,7 +3,7 @@
buildscript {
    ext {
        agp_version = '4.1.3'
        agp_version = '8.7.3'
    }
    repositories {
        google()
@@ -23,7 +23,7 @@
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
        //增加AGC插件配置,以便能同步“agconnect-services.json”文件中的信息.(华为极光推送)
        classpath 'com.huawei.agconnect:agcp:1.6.1.300'
        classpath 'com.huawei.agconnect:agcp:1.9.1.300'
        classpath 'com.google.gms:google-services:4.3.15'  // Google Services 插件
    }
}
countrypicker/build.gradle
@@ -1,6 +1,7 @@
apply plugin: 'com.android.library'
android {
    namespace 'com.sahooz.library.countrypicker'
    compileSdkVersion 33
    defaultConfig {
@@ -26,7 +27,7 @@
dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    androidTestCompile('androidx.test.espresso:espresso-core:3.1.0', {
    androidTestImplementation('androidx.test.espresso:espresso-core:3.1.0', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    implementation 'androidx.appcompat:appcompat:1.2.0'
gradle.properties
@@ -6,7 +6,7 @@
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
org.gradle.jvmargs=-Xmx4048m -Dfile.encoding=UTF-8
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
@@ -21,4 +21,4 @@
android.nonTransitiveRClass=true
# 可以将v4,v7库转成Android X
android.enableJetifier=true
android.bundle.enableUncompressedNativeLibs=false
#android.bundle.enableUncompressedNativeLibs=false
gradle/wrapper/gradle-wrapper.properties
@@ -1,6 +1,6 @@
#Wed Mar 19 11:08:39 CST 2025
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.3-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
pickerview/build.gradle
@@ -4,6 +4,7 @@
android {
    namespace 'com.bigkoo.pickerview'
    compileSdkVersion 33
    defaultConfig {
sdk/build.gradle
@@ -3,6 +3,7 @@
}
android {
    namespace 'com.hdl.sdk.link'
    compileSdkVersion 33
    defaultConfig {
@@ -26,7 +27,9 @@
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    buildFeatures {
        buildConfig = true
    }
    /**
     * 打包自动命名
     */
@@ -63,7 +66,7 @@
    publishing {
        publications {
            plugin(MavenPublication) {
                from components.release
                from components.findByName('release')
                groupId 'com.hdl.android'
                version "$android.defaultConfig.versionName"
                artifactId = 'debugsdk'
third-zxing/build.gradle
@@ -2,6 +2,7 @@
android {
    namespace 'com.zxing'
    compileSdkVersion 33
    buildToolsVersion "29.0.1"
wheelview/build.gradle
@@ -4,6 +4,7 @@
android {
    namespace 'com.contrarywind.view'
    compileSdkVersion 33
    defaultConfig {