Deon
Posts: 0
Joined: Sun Jun 30, 2013 6:00 am

Android Build Error

Hi
I am trying to create an apk.
I created a backup of an app A and then created a new app B from the backup of A.

When I try and compile the APK, I get this error.....
(Bear in mind App A compiles to APK just fine, so why does the exact same app bomb with this error???

Build error

Most likely build error cause:

(node:26647) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: /app/platforms/android/gradlew: Command failed with exit code 1 Error output:
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

FAILURE: Build failed with an exception.

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

Android Build Error

Hello Deon,

  1. Please check your Push Notification settings, did you set a new set of project ID, json config files and so on for the new app?

  2. Do you use Barcode Scanner in your app? If yes, please disable it and run the build again

Deon
Posts: 0
Joined: Sun Jun 30, 2013 6:00 am

Android Build Error

Hi Serhii

Thank you. I did create a new firebase project and also created new database and with new push notification api.
I only use app to receive push messages. I do not send messages, so there is no reference to push api key from the app. Project db ID is set to new db as well.

I dont use barcode scanner in app.

Galyna Abramovych
Site Admin
Posts: 84
Joined: Tue Mar 22, 2016 6:03 pm

Android Build Error

Deon,

Generally, to troubleshoot issues with pushes, first of all, you need to check if the settings for Push for Android in your project have been configured correctly and with all the steps as described in our documentation: https://docs.appery.io/docs/pushnotif...

You should also know that for the correct functioning of the Push option, the Device and Notification Cordova plugins should be enabled in the App Settings of your project (I have no doubts you know it, though).

As for the error that you get with your binary build, please increase the Target SDK version in your Android binary settings to 8.1 and try again.
One more thing that can help resolve the issue:
Removing the "SENDER_ID" property from your PushPlugin, generating new JSON config files for Firebase, and uploading them to Appery.io platform: https://docs.appery.io/docs/pushnotif....

Please let us know the result.

PS
Such an error might also indicate that you have two plugins enabled in your app that are conflicting.
To troubleshoot, uncheck all the plugins until the build successes then you add plugins one by one with the build checks to understand what plugins give you this error.
You can find all the plugins you are using now in your App Settings interface.

Deon
Posts: 0
Joined: Sun Jun 30, 2013 6:00 am

Android Build Error

Thank you for your reply.

Quite a while ago I brought it to Appery's attention that the Push Services in the Server backend loses its settings for no reason. The uploaded certificates would simply vanish. This issue was acknowledged and fixed by Appery support.

It seems this issue has returned. The Google Services JSON file as well as the Firebase AdminSDK file is disappearing by itself after adding it to Push Settings.

I then created brand new Firebase files and uploaded, just for good measure. For now I am able to create the APK. I will let you know if the settings reset again.

Deon
Posts: 0
Joined: Sun Jun 30, 2013 6:00 am

Android Build Error

Ok, It continually loses it settings. I pop the files in. I compile APK fine. Next compile settings are gone and I have to uploaded the Firebase files again. Please can you check why the settings keep getting lost.

Deon
Posts: 0
Joined: Sun Jun 30, 2013 6:00 am

Android Build Error

Now its not retaining the settings at all. Why is there no confirmation that settings are saved. Maybe provide a button to click to save settings?
To top it, I cant use my existing firebase files that I created. I have to create new ones everytime the settings are lost.

This is de-ja-vu.

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

Android Build Error

Could you please share your application with a href="mailto:support@appery.io" rel="nofollow"support@appery.io/a and provide us with it's name?

JSON configs are not included in the app backup, because of security reasons. Please generate a new pair of them for each your application (even, created from the backup)

Chris6743166
Posts: 1
Joined: Tue Mar 18, 2014 11:50 am

Android Build Error

I'm getting this issue too.

Background to the problem, I need to make manual small changes to config.xml during development. Once ready to build the release version, clicking the 'release' checkbox causes the push JSON files to be lost from the push settings.

Deleting and regenerating config.xml does not resolve the problem. The only solution appears to be repeatedly closing and reopening the entire builder once config.xml and the push settings have been restored, though it appears this sometimes has to be done repeatedly.

Galyna Abramovych
Site Admin
Posts: 84
Joined: Tue Mar 22, 2016 6:03 pm

Android Build Error

Chris,

Could you please share your application with a href="mailto:support@appery.io" rel="nofollow"support@appery.io/a and provide us with its name?

Return to “Issues”