local.properties is not being found #2047
-
If you are looking for help, please confirm the following...
Which mobile framework are you using?Flutter (Dart) Steps to reproduceI'm dealing now with Android's new policy, and I need to update the minSdkVersion and targetSdkVersion.
I'm using Codemagic Workflow editor instead of the .yaml file, so my question for you is: How can I add these local.properties values to Codemagic? I tried to add this according to the post in the Post-clone script:
But I'm getting an error. Expected resultsI'm expecting to build the app with the updated minSdkVersion and targetSdkVersion values. Actual resultsIm getting this error from Codemagic tool: /var/folders/w2/rrf5p87d1bbfyphxc7jdnyvh0000gn/T/build_script_3_1_jhddagae: line 3: /Users/builder/clone/android/local.properties: No such file or directory Build failed :| Build id (optional)650379923886b4868392bb72 |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
hey @belensaacastro, why are you using local.properties file to set the minSdkVersion and targetSdkVersion? can you try directly changing inside your android/app/build.gradle file? |
Beta Was this translation helpful? Give feedback.
-
Hello David! That's a really good question...
According to this post
<https://www.woolha.com/tutorials/flutter-change-android-minsdkversion-targetsdkversion-compilesdkversion>
using
the local.properties was recommended instead of hardcoding the values when
you are using a Flutter version greather than 2.8...
I will try and I'll let you know.
By the way, if I would need to use some values from a file. What would be
the best approach to do that using the Workflow editor?
Why is not working the script I added on the Post cloning script?
Thank you for your early response!
Cheers,
Belen.
El vie, 15 sept 2023 a las 5:17, David Maldonado ***@***.***>)
escribió:
… hey @belensaacastro <https://github.com/belensaacastro>, why are you
using local.properties file to set the minSdkVersion and targetSdkVersion?
can you try directly changing inside your android/app/build.gradle file?
—
Reply to this email directly, view it on GitHub
<#2047 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ANONDAMRRMTERFMY5XOCUS3X2QFJHANCNFSM6AAAAAA4Y5ALCI>
.
You are receiving this because you were mentioned.Message ID:
<codemagic-ci-cd/codemagic-docs/repo-discussions/2047/comments/7011260@
github.com>
|
Beta Was this translation helpful? Give feedback.
-
I'm tentatively closing the discussion since we haven't heard back from you. You can open the discussion again by replying to this message or opening a new discussion. |
Beta Was this translation helpful? Give feedback.
hey @belensaacastro, probably because
local.properties
file hasn't been created yet.Try adding
echo "sdk.dir=$ANDROID_SDK_ROOT" > "$CM_BUILD_DIR/android/local.properties"
before setting up other properties, like this