Software Archive
Read-only legacy content
17061 Discussions

Error build failed

ben4
Beginner
1,116 Views

Hello,

 

I am lost on this one, I have only changed me version number to +1 and now I cannot build my Android app, the error is:

FAILURE: Build failed with an exception.

* Where:
Build file '.../builds/build.2016-09-27.10-22-40.PE5ytX.tmp/cordova_project/platforms/android/build.gradle' line: 166

* What went wrong:
A problem occurred evaluating root project 'android'.
> For input string: "10001299930"

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 24.625 secs
Error: Error code 1 for command: .../builds/build.2016-09-27.10-22-40.PE5ytX.tmp/cordova_project/platforms/android/gradlew with args: cdvBuildRelease,-b,.../builds/build.2016-09-27.10-22-40.PE5ytX.tmp/cordova_project/platforms/android/build.gradle,--no-daemon,-Pandroid.useDeprecatedNdk=true

 

 

Any idea why please?

 

Thank you.

 

Ben

 

0 Kudos
10 Replies
ben4
Beginner
1,116 Views

Ok, no idea if this is a bug in intelsdk but here is hwat I have found:

My APK version in the Android shop is:

1000129992

ion Now the reason that number is big is because I made a mistake months ago when I added my first number.

Today I tried to generate my app using this version:

1000129993 Which is the one above +1

But I receive the error you see at the top of this thread.

 

I have then tried to regenerate my app with a lower number as:

100012999

 

And the app is built correctly..... but the problem is that I need to generate that 1000129993 number for Android to accept the upload.

 

What can I do now please? Why would intel sdk bug on this number?

1000129993

 

Thanks,

 

Ben

0 Kudos
Hamilton_Tenório_da_
Valued Contributor I
1,116 Views

Ben,

Are you building for Android, right? The last number is always inserted by the compiler in order to create a number to ARM and another to Intel processor.

For example, in one app, my version number is 60007, but in Google Play I have the versions 600074 and 600072 (the 2 and 4 is added during the compile process.

If your version on Google Play is 1000129992, you can use the number 100013000.

Try it.

 

0 Kudos
ben4
Beginner
1,116 Views

You were right Hamilton, this works! thanks!

 

But why? In my example I added +1 as 1000129993 compared to the app in the market rigt now that is 1000129992.

 

Weird.....no?

0 Kudos
Hamilton_Tenório_da_
Valued Contributor I
1,116 Views

That is right. See https://software.intel.com/en-us/xdk/articles/android-and-crosswalk-cordova-version-code-issues

If your version code is 1, the build will create the versions 12 (ARM) and 14 (x86).

The next version will be 2 and the versions 22 and 24, and so on.

About it, see that part of that post:

Here's what Cordova CLI 5 (Cordova-Android 4.x) does with the android:versionCode (App Version Code) number when you perform a Crosswalk build:

  • multiplies your android:versionCode by 10
  • adds 2 to the android:versionCode for Crosswalk ARM builds
  • adds 4 to the android:versionCode for Crosswalk x86 builds
0 Kudos
ben4
Beginner
1,116 Views

I got it now, thanks again!

0 Kudos
Amjad_K_
Beginner
1,116 Views

Hello
I have the same issue and the build works if I put 1 in App Version Code but none of the following worked;
1999899819
2000000000

Here are Google Play Developer Console versions that worked till the latest, but now I am unable to go further;

BETA TESTING
VERSION
1999899818
19998998 (0.0.8)
1999898 (0.0.7)
199988 (0.0.6)
19998 (0.0.5)
1998 (0.0.4)
198 (0.0.3)
18 (0.0.1)

 

Build Log attached.
Thanks!

BUILD FAILED

Build Log

  • Building a Cordova 6.2.0 application.
  • Using platform cordova-android 5.1.1.
  • The application name is "Almuzamil Travel"
  • The package name is "com.souqalhijaz.almuzamiltravel"
  • Preference android-signed set to true. Application will be signed.
  • Plugin "cordova-plugin-compat" (1.0.0) installed.
  • Plugin "cordova-plugin-camera" (2.3.0) installed.
  • Plugin "cordova-plugin-device" (1.1.2) installed.
  • Plugin "cordova-plugin-geolocation" (2.2.0) installed.
  • Plugin "cordova-plugin-whitelist" (1.2.2) installed.
  • App name updated to [Almuzamil Travel]
  • Updated "minSdkVersion" with "14"
  • Updated "targetSdkVersion" with "23"
  • Updated "installLocation" to "auto"
  • Updated "versionCode" to "2000000000"
  • Updated "versionName" to "0.1.1"
  • Added "debuggable" to "false"
  • Error: A build error occurred. Check the build log.
0 Kudos
Hamilton_Tenório_da_
Valued Contributor I
1,116 Views

Add 1 is enough. You are inserting a new digit every time!

After 1999899818 you can use 1999899819 (1999899818 + 1). 

0 Kudos
Amjad_K_
Beginner
1,116 Views

Dear Hamilton
The problem still persists however, the build is successful if app version is 1, 189 or some smaller number, But for 1999899819, it simply fails.

Did the following without any luck.
Tried it on Win10 32/64 bit.
Removed XDK related files from the project and readded.
Reinstalled XDK.

Do I have to start over and make a new app in Google Play Developer Console?

0 Kudos
Hamilton_Tenório_da_
Valued Contributor I
1,116 Views

Amjad> Maybe there is a limit inside the compiler. What is the last app version that you compile successfully? Do not consider the number generated by the compiler.

For example, if you put 1999899818, the compiler must generated 2 files like 19998998182 and 19998998184 (or others final digits). Forget the final digit.

Use your number (1999899818) and add 1 (1999899819). Try it.

Hamilton

0 Kudos
PaulF_IntelCorp
Employee
1,116 Views

Amjad -- I do not know what the limit on the size of that number is, but your number (1,999,899,819) translates to (0x77340CAB) which is getting near the limit of a 32-bit int, especially once you consider that a multiplication by 10 is going to happen when the number gets modified by Cordova. If I multiply that number by ten, I get (0x2541FB9D0) or (10,001,299,920) which exceeds the bounds of a 32-bit integer and is probably why this number is failing for you.

I'm guessing that the limit on those numbers is a signed 32-bit int; which would imply that the conservative limit, due to the changes made by Cordova to the number that you can specify, would be (13,421,772) or (0xCCCCCC).

Since your last successful push the store shows a number like (1,000,129,992), which corresponds to (0x3B9CC5C8). If you divide the number in the store by 10 and then add one, you should be good (I'm assuming that the number in the store is from the x86 image). So what you should be specifying in the build settings would be (100013000), without the parenthesis.

 

0 Kudos
Reply