WhatsApp / stickers

This repository contains the iOS and Android sample apps and API for creating third party sticker packs for WhatsApp.
Other
2.73k stars 1.7k forks source link

Generate Signed APK error #356

Closed kinorth closed 5 years ago

kinorth commented 5 years ago

in build.gradle(APP) the line: "throw new GradleException("applicationId in defaultConfig cannot start with com.kijooj, please change your applicationId in app/build.gradle");" (checkRelease)

This is an error when it comes to generating Signed APK, I can simply remove it? or can I have any future problems?

@simonzhexu

sorry for my bad English

MarvinJWendt commented 5 years ago

Hey @kinorth, The code you posted isn't actually in the repo. There are two GradleExceptions of this kind:

First:

if (android.defaultConfig.applicationId.startsWith("com.whatsapp")) {
  throw new GradleException("applicationId in defaultConfig cannot start with com.whatsapp, please change your applicationId in app/build.gradle");
}

Second:

if (android.defaultConfig.applicationId.startsWith("com.example")) {
  throw new GradleException("applicationId in defaultConfig cannot start with com.example, please change your applicationId in app/build.gradle");
}

Those two checks are used so that you won't publish your app with the package name of WhatsApp or an template example.

To me it seems like you used replace all for your applicationId.

To fix your issue, make sure that those lines are not changed!

  1. https://github.com/WhatsApp/stickers/blob/1a9f00222f96779e50b0269e58a9bb79b10221fa/Android/app/build.gradle#L44-L46
  2. https://github.com/WhatsApp/stickers/blob/1a9f00222f96779e50b0269e58a9bb79b10221fa/Android/app/build.gradle#L68-L70

If they are changed, just copy the original and overwrite them.

Let me know if you have any further questions :)

kinorth commented 5 years ago

Thank you