-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build Development APK File Failed After Enabling PushKit #517
Comments
Thank you for reporting this issue/advice. |
Hello Developer @qinhanlei The problem is with multidex builder. Actually, this often happens when you have imported a lot of packages in your yaml file which cannot fit into a single .dex built hence you have to enable multidex. Go to android/app/build.gradle and add the following lines of code
|
Package name
second one is
and guess is that release build seems to succeed because it does not generate a buildconfig
I don't know how to fix this, but I think this is the cause. |
Hi @qinhanlei We did not encounter such a problem when we tested it on our end. Can you try clearing the caches? You can try the following method: Manually Cleaning Unity Cache Folders: Can you then go to Assets > Reimport All and try again? |
Hi @Aziz-T Sorry for my late reply. I’ve been quite busy with company tasks. This problem has also recurred in several different projects when I used 2022.3.50f1 recently. I cleared the caches many times, but it didn’t work. Thank you, @qwes348. That sounds reasonable. Have no idea how to fix the issue either. |
Hi @qinhanlei I was able to get the problem on my side and the solution should be like this. You should go to the Assets\Huawei\Plugins\Android\HMSUnityPushKit.plugin\build.gradle directory and put the following code.
So the new afterEvaluate script should be like this.
In this way, we prevent the push kit plugin from creating a second build config. Don't forget to clear the caches after placing this code. I suggest you delete the Library folder. Because if there are still conflicting files in the caches, it prevents the build. It will already occur automatically. Thank you to @qwes348 for making the above explanation and helping me see the problem. |
Here are the logs from the console:
The build for the release version was successful.
The text was updated successfully, but these errors were encountered: