apps-android-commons
apps-android-commons copied to clipboard
A problem occurred evaluating project ':app'. local.properties (No such file or directory)
Steps to reproduce
git clone [email protected]:commons-app/apps-android-commons.git
cd apps-android-commons
./gradlew installProdDebug
Error
Expected: Project builds. Actually: Error below:
FAILURE: Build failed with an exception.
Reproduces for me every time on macOS.
* Where:
Build file '/[...]/app/build.gradle' line: 350
* What went wrong:
A problem occurred evaluating project ':app'.
> /[...]/local.properties (No such file or directory)
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.9/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 1s
Workaround
touch local.properties
then build again. This time it works.
@nicolas-raoul Worked for me even without the touch command. 😕
Interesting! Might depend on the environment. No need to worry about it, I mostly put it here for the workaround in case someone encounters the same issue. 🙂
That file is automatically included in the project when opened in Android Studio. However, as you said we need to manually add this file when directly cloning and building from the terminal.
That's why we should change the tag. It's not a bug, right?
I faced a similar issue after cloning & the workaround helped. Thanks!