-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Build error in getBuildVersion function in gitutils.gradle file. #1157
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
Comments
This error never happens with me. What version of the studio are you using? |
I am using Studio 3.0.1 This error occurred only when I first pulled the project from Github and tried to build the gradle in my system. For the first time, gradle built successfully only after I have added try-catch block there. Now it's not showing any error even if I remove try-catch block. However, its a good practice to introduce try-catch block there. |
I am not sure if it actually a good practice to have a try catch here. A Open for discussion. |
@maskaravivek what is your opinion for this discuttion? |
As I said,
We should rather debug issues which come because of these util methods. :) |
Closing it then |
I just set up the project on a new PC - can confirm that this issue happened to me as well, and @SaiKrishna1827 's fix solved it. I am on Android Studio 3.2.1. We may want to consider fixing this (if not through the try catch block, then through other methods), as it may discourage new contributors. |
… in gitutils.gradle … (#1158) * Added try-catch block in getBuildVersion function in gitutils.gradle file. * Formatting fix * Add comment
I suppose this is fixed. So, closing it. Do reopen if I closed it incorrectly. |
A try-catch block is missing int getBuildVersion function in the file gitutils.gradle : https://github.com/commons-app/apps-android-commons/blob/master/gitutils.gradle, due to which following error is occurring
Gradle sync failed: CreateProcess error=2, The system cannot find the file specified
A try-catch block is used in the function getBranchName which is declared exactly below the getBuildVersion function, but I think it's not declared here by mistake.
The text was updated successfully, but these errors were encountered: