-
Notifications
You must be signed in to change notification settings - Fork 565
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
Could not find method flavorDimensions() for arguments [tier] on object of type org.gradle.api.internal.initialization.DefaultScriptHandler. #176
Comments
Can you please try create it on new project:
|
I think this issue comes if you try to compile with com.android.tools.build:gradle 3+. I am also facing this as my project uses both react-native-maps and your plugin. Latest version of react-native-maps wants gradle 3+ but not able to compile. Following is the log of run-android:
Thanks |
@shashanksinghal this was helpful. |
Just realized you can already fix this by adding following into root
Edit: This will fix probably the warning only and not flavor error. |
What are your version of I have tried |
In build.gradle:
In gradle-wrapper.properties:
buildToolsVersion 25.0.2 will be ignored anyways as minimum required for gradle plugin 3.1.0 is 27 and gradle plugin 3.0.1 is 26. I tried both but same error Please also refer Declare flavor dimensions section in Gradle 3 migration |
@shashanksinghal ok I can reproduce it now with those versions. |
After reading Gradle 3 migration and some testing I have bad feeling that making this work on gradle3 will require more work that I expected. Gradle 3 dropped option to specify build flavor via
which this plugin is using to create oreo and normal flavors. But will try to finding replacement that would be be still easy to use. |
Any status on this? |
@kruyvanna Thanks for you work, maybe you can submit it as a pull request here? |
Just published 0.5.0-alpha.31 with experimental gradle3 support.
|
Example project using gradle3 https://github.com/mauron85/react-native-mauron85-background-geolocation-skeleton |
@kruyvanna sorry I somehow missed your comment. Thank you for your effort, but I would like to keep support for preoreo builds and react-native project template defaults. |
@mauron85 No problem. thanks for the great work :) |
@mauron85 I'm not seeing the release 0.5.0-alpha.31, am I missing something? |
@equesteo i used 0.5.0-alpha.34 |
@mauron85 @dengue8830 I use react native firebase and React-native-Maps with gralde 4.4, these two libraries are important in my project, and now I want to use them with native native background locations mauron85, but here it does not support 4 .x. This is the problem I encountered! |
no it should work with gradle4. Actually gradle3 is just tag name for the issue and gradle3 in my experience is not working with Android. |
@mauron85 Unfortunately :( |
@xuanduy96 try using skeleton project https://github.com/mauron85/react-native-mauron85-background-geolocation-skeleton It's using gradle 4. EDIT: Gradle 4.4 to be exact |
@xuanduy96 im using the same stack, |
@mauron85 thanks, it worked with gradle 4.4. |
@dengue8830 Can you show me the config in the project that you have successfully implemented with: |
@mauron85 , @dengue8830 . I install and work ok in gradle 4.4. But when install react-native-firebase v4.2.0 then app crash. I tried doing it again many times but it still does not work. When i run react-native-firebase, no use Background thì it still work. |
this dependencies app/build.gralde config |
@xuanduy96 @nguyensythinhk7 Sorry for the delay, here is my config: i'm not fully tested the background location yet, but it sends location to the server on foreground and background mode, i checked that |
@dengue8830 thank you ! Although I have tried config according to you but still not. I configed vs gradle and firebase v3, it's work. I thing i should use this version. thank you for enthusiastic support. |
my build.gradle working file `// Top-level build file where you can add configuration options common to all sub-projects/modules.
} allprojects {
} subprojects {
} |
@mauron85 Thanks |
gradle3EXPERIMENTAL = true |
Sorry for confusion. I was wrong (even though I wrote the gradle scripts myself). Actually OREO support is automatically enabled with GRADLE3. |
ok thanks for the info
…On Mon, Jul 16, 2018 at 10:03 AM Marián Hello ***@***.***> wrote:
Just small warming. You cannot have both GRADLE3 and OREO support enabled
(react-native build script doesn't support specifying build flavor in
command line).
If you need GRADLE3 and OREO support you need to edit
android/lib/build.gradle:
// EDIT following line from (change 'preoreo' to 'oreo')
def projectFlavor = "oreo"
if (rootProject.hasProperty('oreoEXPERIMENTAL')) {
projectFlavor = "oreo"
}
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#176 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AjCNJ_V9eBownsYZohpazD1Ij9i_9ps-ks5uHFb7gaJpZM4TPNQB>
.
|
I've got this happening with Gradle 4.4 :/ |
@rewieer check this |
@dengue8830 thanks mate, adding gradle3EXPERIMENTAL fixed it for me through |
Fixed by downgrading Gradle from 4.4 and linked again. |
i have a general purpose skeleton project, you could check the config, run it or use it directly (using react-native-rename project) |
in May 2021, this is impossible to install from expo project to raw react-native, I have tried too many manual configurations from all over the place and nothing seems to work. A new error keeps popping up. Is there anyone using this in 2021 and if so, whats a solution please. _FAILURE: Build failed with an exception.
|
Your Environment
Context
Cant install onto my project with simple react-native link 'name'
Expected Behavior
project should be linked.
Actual Behavior
Got a flavor issue with the build gradle. Added a flavorDimension as specified and it does not work.
Possible Fix
Steps to Reproduce
Context
Debug logs
The text was updated successfully, but these errors were encountered: