HMS-Core / hms-flutter-plugin

This repo contains all of Flutter HMS plugins.
https://developer.huawei.com/consumer/en/doc/overview/HMS-Core-Plugin?ha_source=hms1
Apache License 2.0
293 stars 147 forks source link

[huawei_ads]: Package com.huawei.android.hms.ppskit does not exist #396

Open deakjahn opened 2 weeks ago

deakjahn commented 2 weeks ago

Description

When building an app with huawei_ads the following error occurs:

huawei_ads-13.4.72+300\android\src\main\java\com\huawei\hms\flutter\ads\installreferrer\PpsChannelInfoService.java:28: error: package com.huawei.android.hms.ppskit does not exist
import com.huawei.android.hms.ppskit.IPPSChannelInfoService;

(plus a few others for the same issue).

Expected behavior

Build without error. Remove reference if obsolete.

Environment

deakjahn commented 2 weeks ago

The interface referenced seems to be in huawei_ads-13.4.72+300\android\src\main\aidl\com\huawei\android\hms\ppskit\IPPSChannelInfoService.aidl so it might be some toolchain error.

Also, removing PpsChannelInfoService.java completely makes the app buildable. I don't know the ramifications.

Andrey-Katyushin commented 2 days ago

@deakjahn I had same problem yesterday. The your last message prompted me to look at the source. After investigation =), i added a code to project gradle file in my app:

allprojects {
    subprojects {
        afterEvaluate { project ->
            if (project.group == 'com.huawei.hms.flutter.ads') {
                project.android {
                    buildFeatures {
                        aidl true
                    }
                }
            }
        }
    }
}

It enables aidl in huawei_ads package and helped me