This is the error I am getting while I’m trying to get an app to debug on the android emulator from android studio on visual studio code :
Could not get unknown property ‘FLIPPER_VERSION’ for object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
What went wrong was:
- What went wrong:
A problem occurred evaluating project ‘:app’.
Could not get unknown property ‘FLIPPER_VERSION’ for object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
Where? :
Build file ‘C:UsersdmdplOneDriveDesktopcitas3androidappbuild.gradle’ line: 270
This is what is along the line 270 on app.build.gradle:
debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") {
exclude group:'com.facebook.fbjni'
}
2
Answers
${FLIPPER_VERSION}
is meant to act as a placeholder for whatever the latest version is of the libraryReplace
with
ensure you have your
gradle.properties
file in yourandroid/
folder, if that file exists you should already see the version ofFLIPPER
defined in there already.I had this error while I was trying to move my project to another computer, the
gradle.properties
file was not included, so I had to copy it manually to the new computer.Then, all I needed to do, was to open the app on my Android studio and ran:
Sync project with gradle files
.