Quantcast
Channel: User Sourav Kannantha B - Stack Overflow
Viewing all articles
Browse latest Browse all 60

BuildConfig.java is not configuring properly in flutter

$
0
0

When I run my flutter project, I get the following error:

C:\Users\Sourav Kannantha B\Documents\AndroidProjects\ecommercestore\build\app\generated\source\buildConfig\debug\com\skbsmk\ecommercestore\BuildConfig.java:14: error: illegal escape character  public static final String fluttersdk = "C:\Users\Sourav Kannantha B\Documents\Flutter";                                              ^...

I can see why that is error, because BuildConfig.java contains this line:

public static final String fluttersdk = "C:\Users\Sourav Kannantha B\Documents\Flutter";

But my local.properties file contains the path in correct format:

flutter.sdk=C:\\Users\\Sourav Kannantha B\\Documents\\Flutter

I don't know why, while building it is skipping one backslash. I even tried to edit local.properties to this:

flutter.sdk=C:\\\\Users\\\\Sourav Kannantha B\\\\Documents\\\\Flutter

and this:

flutter.sdk=C:/Users/Sourav Kannantha B/Documents/Flutter

But as soon as I run the project, android studio is automatically changing these to as it was before.

EDIT: Project was running properly before. This all started when I added com.google.android.libraries.mapsplatform.secrets-gradle-plugin to my android gradle file. But I'm not sure if this has to do anything with this error.

EDIT: My bad, error was indeed related to com.google.android.libraries.mapsplatform.secrets-gradle-plugin. After removing that, error got resolved. Can someone explain this behaviour.


Viewing all articles
Browse latest Browse all 60

Trending Articles