Skip to content
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

Error:Cannot access private library #35150

Closed
abhishekchaubey opened this issue Nov 13, 2018 · 6 comments
Closed

Error:Cannot access private library #35150

abhishekchaubey opened this issue Nov 13, 2018 · 6 comments
Labels
needs-info We need additional information from the issue author (auto-closed after 14 days if no response)

Comments

@abhishekchaubey
Copy link

Trying to access a web-service but added dependecies

http: ^0.12.0
But getting below error message from compiler

Compiler message:
lib/login_web_service.dart:1:8: Error: Can't access platform private library.
import 'dart:_http';
       ^
Compiler failed on D:\GitApps\vattendance\flutter_app\lib/main.dart
Gradle task 'assembleDebug'... Done                         22.3s
Gradle task assembleDebug failed with exit code 1
@kevmoo kevmoo added the needs-info We need additional information from the issue author (auto-closed after 14 days if no response) label Nov 14, 2018
@kevmoo
Copy link
Member

kevmoo commented Nov 14, 2018

Which version of Flutter are you using?

@zoechi
Copy link
Contributor

zoechi commented Nov 15, 2018

Might be related to #35009, #32300

@vsmenon
Copy link
Member

vsmenon commented Nov 29, 2018

That's an intentional error. That file can't be imported. Where is the import? I don't see a lib/login_web_service.dart in package:http.

Closing as this hasn't been updated for a couple weeks. Please re-open if further info.

@vsmenon vsmenon closed this as completed Nov 29, 2018
@hsul4n
Copy link

hsul4n commented Feb 9, 2019

you can use import 'dart:convert';

@adelbenhamadi
Copy link

fixed with import 'dart:io' to use HttpHeaders

@malibayram
Copy link

fixed with flutter clean

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-info We need additional information from the issue author (auto-closed after 14 days if no response)
Projects
None yet
Development

No branches or pull requests

7 participants