Closed ShejaEddy closed 3 years ago
Do a flutter pub get. Also make sure gradle is up to date
On Sep 19, 2021, at 3:05 PM, Sheja Eddy @.***> wrote:
mapbox_navigation-0.0.26\android\build.gradle' line: 31 * What went wrong: A problem occurred evaluating project ':flutter_mapbox_navigation'. > Basedir c:\flutter.pub-cache\hosted\pub.dartlang.org\firebase_core
I made flutter clean && flutter pub get && flutter run
still gives that error. Isn't it because of these configuration in build.gradle
I first removed flutter_pabox_navigation package because Gradle wouldn't run because of that missing android folder.
I added this gradle version
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip
I will let you know of any update if it works after the installation, Thanks for your fast replies Sir.
I updated Gradle but still the problem persists. I'm not using mac book. I'm running on windows, the android folder is still missing in the firebase core used by flutter_mapbox_navigation. I'm really stuck now, any more help would be highly appreciated.
Even After running on mac, I'm still getting the same response. I don't know why It is looking for a missing android folder here in https://github.com/FirebaseExtended/flutterfire/tree/master/packages/firebase_core/firebase_core_web
At last it finally built.
I changed this in /android/settings.gradle
include ':app'
def flutterProjectRoot = rootProject.projectDir.parentFile.toPath()
def plugins = new Properties()
def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins')
if (pluginsFile.exists()) {
pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) }
}
plugins.each { name, path ->
def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile()
include ":$name"
project(":$name").projectDir = pluginDirectory
}
To This code:
include ':app'
def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
def properties = new Properties()
assert localPropertiesFile.exists()
localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
def flutterSdkPath = properties.getProperty("flutter.sdk")
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
Thanks for all the help @eopeter . Such a great work with this.