안드로이드 슈튜디오 → Run → Edit Configurations.. → 실행하고자 하는 소스파일(.dart) 선택
→ Additional arguments: 항목에
--enable-software-rendering 입력 후 Apply → OK

Posted by afewgood
,

안드로이드 스튜디오 TERMINAL 에서
flutter build apk --release --target-platform=android-arm64 입력
[Project Forder]/build/app/outputs/apk/release/app-release.apk 생성
생성된 파일을 안드로이드 스마트폰으로 복사 해서 설치하면 완료!

출처: https://gamestory2.tistory.com/215


Posted by afewgood
,

안드로이드 스튜이오 또는 VS Code 없이 안드로이드 에뮬레이터 실행시키기

1. 에뮬레이터 장치 확인
콘솔 또는 PowerShell 실행 후 안드로이드 SDK 경로\emulator\로 가서 emulator.exe -list-avds 실행
C:\Users\afewgood\AppData\Local\Android\Sdk\emulator>.\emulator.exe -list-avds
Pixel_3a_API_29

2. 에뮬레이터 장치 실행
emulator.exe -avd "장치명" 실행
C:\Users\afewgood\AppData\Local\Android\Sdk\emulator>.\emulator.exe -avd "Pixel_3a_API_29"

bat파일 만들기
메모장을 열어서
안드로이드 SDK 경로\emulator\emulator.exe -avd "장치명" 작성 후 emulator.bat로 저장
ex) C:\Users\afewgood\AppData\Local\Android\Sdk\emulator\emulator.exe -avd Pixel_3a_API_29
 - 저장시 인코딩(E): ANSI 선택
→ emulator.bat 더블클릭
   콘솔창이 열림과 함께 안드로이드 에뮬레이터가 실행됨
   콘솔창이 닫히면 에뮬레이터도 종료됨

바로가기 만들기
바탕화면 → 마우스 우클릭 → 새로 만들기 → 바로가기
항목 위치 입력(T): 항목에
안드로이드 SDK 경로\emulator\emulator.exe -avd "장치명" 입력
ex) C:\Users\afewgood\AppData\Local\Android\Sdk\emulator\emulator.exe -avd Pixel_3a_API_29
다음 → 마침 클릭
생성된 바로가기 위에서 마우스 우클릭 → 속성 → 바로가기 탭 → 실행(R): 최소화 선택

Posted by afewgood
,

출처: https://jsikim1.tistory.com/133
1. Visual Studio Code --> Extensions --> flutter 검색 --> Flutter 설치
2. Visual Studio Code --> View --> Command Palette --> flutter 입력 --> Flutter: New Application Project 선택
   --> 프로젝트 폴더 선택 (ex. C:\Users\username\Documents\flutter_project\workspace) --> 프로젝트 명 입력
3. Visual Studio Code --> View --> Command Palette --> flutter 입력 --> Flutter: Launch Emulator 선택 --> Pixel 3a API 29 android 선택
   Run --> Start Debugging 선택 하거나 F5 입력
4. .dart 파일 만들기
   Visual Studio Code --> Explorer --> lib에서 마우스 우클릭 --> New File --> 파일명.dart 생성 --> 코드생성 후 --> 에디터 위에 Run|Debug 에서
   Run 클릭

※ Flutter 프로젝트는 Rainbow Brackets가 코드작성에 좋음

Posted by afewgood
,

flutter install

flutter & dart 2021. 7. 22. 23:38

1. flutter.zip 압축해제 후 c:\flutter에 해제
2. 시스템 고급시스템 설정 --> 환경변수 --> 시스템변수 --> Path선택(편집) --> 새로만들기
 --> C:\flutter\bin 추가 --> 확인

3. Android license not accepted 해결방법
C:\flutter> flutter doctor --android-licenses --> y --> y .... 끝

Visual Studio Code 에서 flutter 프로젝트 시작하기
출처: https://jsikim1.tistory.com/133

1. Visual Studio Code --> Extensions --> flutter 검색 --> Flutter 설치
2. Visual Studio Code --> View --> Command Palette --> flutter 입력 --> Flutter: New Application Project 선택
   --> 프로젝트 폴더 선택 (ex. C:\Users\username\Documents\flutter_project\workspace) --> 프로젝트 명 입력
3. Visual Studio Code --> View --> Command Palette --> flutter 입력 --> Flutter: Launch Emulator 선택 --> Pixel 3a API 29 android 선택
   Run --> Start Debugging 선택 하거나 F5 입력
4. .dart 파일 만들기
   Visual Studio Code --> Explorer --> lib에서 마우스 우클릭 --> New File --> 파일명.dart 생성 --> 코드생성 후 --> 에디터 위에 Run|Debug 에서
   Run 클릭

※ Flutter 프로젝트는 Rainbow Brackets가 코드작성에 좋음

Posted by afewgood
,

참고 사이트
https://sudarlife.tistory.com/entry/flutter-20-fvm%EC%9D%84-%EC%9D%B4%EC%9A%A9%ED%95%B4%EC%84%9C-%EC%B6%A9%EB%8F%8C%EC%97%86%EC%9D%B4-%ED%94%8C%EB%9F%AC%ED%84%B0-20-%EC%84%B8%ED%8C%85%ED%95%98%EA%B8%B0-VSCode?category=1176193
https://www.youtube.com/watch?v=Ank_4m5vwCc&t=14s

Windows PowerShell(관리자) 사용
 윈도우+x → a
 또는
 시작 → 마우스우클릭 → Windows PowerShell(관리자)(A) 선택

1) dart 버전확인
> dart --version¶

2) FVM install
> dart pub global activate fvm¶
Activated fvm 1.3.7 표시

3) FVM PATH 설정
사용자변수 → Path 추가
https://dart.dev/tools/pub/cmd/pub-global#running-a-script 참고
ex) C:\Users\afewgood\AppData\Local\Pub\Cache\bin

4) 터미널(Windows PowerShell) 재실행

5) fvm.bat help실행
> fvm.bat help¶
Run "fvm help <command>" for more information about a command. 표시

6) flutter 버전확인
> flutter --version¶
Flutter 1.22.6 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 9b2d32b605 (6 months ago) • 2021-01-22 14:36:39 -0800
Engine • revision 2f0af37152
Tools • Dart 2.10.5
표시됨

사용방법

7) flutter 버전설치
 - https://flutter.dev/docs/development/tools/sdk/releases 참고하여 원하는 버전 설치
ex) > fvm.bat install 2.0.2¶

Installing version: 2.0.2
Cloning into 'C:\Users\afewgood\fvm\versions\2.0.2'...
remote: Enumerating objects: 286632, done.
remote: Total 286632 (delta 0), reused 0 (delta 0), pack-reused 286632
Receiving objects: 100% (286632/286632), 131.62 MiB | 19.04 MiB/s, done.
Resolving deltas: 100% (220685/220685), done.
Updating files: 100% (5202/5202), done.
Version installed: 2.0.2
Checking Dart SDK version...
Downloading Dart SDK from Flutter engine ...
Building flutter tool...
Running pub upgrade...
Flutter 2.0.2 • channel unknown • unknown source
Framework • revision 8962f6dc68 (4 months ago) • 2021-03-11 13:22:20 -0800
Engine • revision 5d8bf811b3
Tools • Dart 2.12.1
표시됨(설치완료)

8) 설치 확인
> fvm.bat list¶
Versions path:  C:\Users\afewgood\fvm\versions
2.0.2
표시됨(설치완료)

9) 프로젝트 생성
  ex) fvm_test
프로젝트 생성 후
- Visual Studio Code ---------------------------------------------------------
File → Preference → Settings → Extensions → Dart & Flutter → Edit in settings.json → 편집
"dart.analyzerInstrumentationLogFile": null 윗줄에 위의 7)의 Versions path 내용 추가
"dart.flutterSdkPaths":["C:\\Users\\afewgood\\fvm\\versions"], 추가 후 저장 //윈도우는 경로지정시 \\ 해야함.
View → Command Palette.. → Flutter: Change SDK 선택 → Flutter SDK 2.0.2 표시됨 → Flutter SDK 2.0.2선택
자동으로 소스 analysing 진행(?)됨
Visual Studio Code 하단에 Flutter:2.0.2 확인

- 안드로이드 스튜디오 -----------------------------------------------------
File → Settings → Languages & Frameworks →
 Dart → Dart SDK path: C:\Users\afewgood\fvm\versions\2.0.2\bin\cache\dart-sdk 경로선택
 Flutter → Flutter SDK path: C:\Users\afewgood\fvm\versions\2.0.2 경로선택

10) pubspec.yaml 파일 수정
environment:
  sdk: ">=2.7.0 <3.0.0" 을
  sdk: ">=2.12.0 <3.0.0" 로 변경 후 저장

11) main.dart 오류 수정 (원인은 Null Safety)
MyHomePage({Key key, this.title}) : super(key: key); 를
MyHomePage({Key? key, this.title=""}) : super(key: key); 으로 변경

Posted by afewgood
,

리눅스 usb mount 예제

c 2021. 7. 20. 15:02

[afewgood@ubuntu]# mount -t vfat /dev/sda1 /mnt/usbmem
[afewgood@ubuntu]## cd /mnt/usbmem/

{
    int result;
    char chCmd[128];

    //mount
    result = mount("/dev/sda1", "/mnt/usbmem", "vfat", MS_RDONLY, NULL);
    memset(chCmd, 0x00, sizeof(chCmd));
    strcpy(chCmd, "cp /mnt/usbmem/5.png /images/blue/default_type.png");
    system(chCmd);
    sync();

    //umount
    result = umount("/mnt/usbmem");
}

'c' 카테고리의 다른 글

리눅스 IP충돌 체크  (7) 2022.09.08
리눅스 정규식을 이용한 IP / Email 주소 체크  (0) 2022.09.06
구조체 배열 인자로 넘겨서 채우기  (0) 2022.08.11
ASCII & 한글 완성형(KSC5601) 출력 소스  (0) 2021.07.08
C관련Etc...  (0) 2021.06.17
Posted by afewgood
,

관리자페이지 접속방법
PC의 IP가 192.168.55.35 이면 192.168.55.1로 접속
ID: admin
암호: WAN주소뒤6자리_admin [7B153B_admin]

브릿지모드로 변경
[네트워크] → [WAN] 페이지에서 NAT를 브릿지로 변경 → [모뎀자동재시작]
이후 관리자 페이지 접속 불가

복구
초기화버튼을 핀으로 몇초간 꾸욱 눌렀다 떼면 원상태로 복구됨

'etc' 카테고리의 다른 글

teraterm에서 sz/rz 사용법  (0) 2022.07.04
안드로이드스튜디오 맞춤법 검사 해제  (0) 2021.08.13
VirtualBox 관련  (0) 2021.07.19
libpng warning: 해결방법  (0) 2021.06.17
VirtualBox Guest OS 바로가기 생성  (0) 2019.12.26
Posted by afewgood
,

01_ifconfig 명령으로 사용가능한 네트워크 장치 확인
[afewgood@ubuntu]# ifconfig

02_유선 랜 장치를 비활성화하고 무선 랜 장치를 활성화 한다. 
[afewgood@ubuntu]# ifconfig eth0 down
[afewgood@ubuntu]# ifconfig wlan0 up

03_wpa_supplicant 명령을 사용하려면 wpa_supplicant.conf가 필요하다. 
이를 위해 우선 psk키를 생성한다.(최초 1회)
- wpa_passphrase ssid_name ssid_password > wpa_supplicant.conf
[afewgood@ubuntu]# wpa_passphrase AFewGood 12345 > /etc/wpa_supplicant.conf

04_SSID 접속
[afewgood@ubuntu]# iwconfig wlan0 essid "AFewGood"

05_wpa_supplicant 실행
[afewgood@ubuntu]# wpa_supplicant -D wext -B -i wlan0 -c /etc/wpa_supplicant.conf
 -D wext = Linux wireless extensions (generic)
 -B = run daemon in the background
 -i = interface name
 -c = Configuration file

06_ifconfig 명령으로 사용가능한 네트워크 장치 확인
[afewgood@ubuntu]# ifconfig

07_dhcp실행
[afewgood@ubuntu]# udhcpc -i wlan0

'linux' 카테고리의 다른 글

특정 이름을 가진 프로세스 죽이기  (0) 2022.04.14
ssh dns disable  (0) 2022.01.12
VirtualBox Ubuntu14.04 설치 시 참고사항  (0) 2021.07.08
cross compiler 설치 후  (0) 2020.08.27
sudo 명령어 패스워드 없이 사용하기  (0) 2019.12.30
Posted by afewgood
,

VirtualBox 관련

etc 2021. 7. 19. 22:40

01) Guest OS 바로가기 생성 virtualbox를 실행하지 않고, 바로 GuestOS를 실행시킬수 있는 방법
바탕화면 --> 마우스우클릭 --> 바로가기 만들기 ->
대상 "C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" startvm Image_Name ->
  ex)"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" startvm "Ubuntu14.04"
시작위치 "C:\Program Files\Oracle\VirtualBox"
출처: http://blog.bagesoft.com/867

03) VirtualBox 가상디스크(.vdi) 사이즈 확장 시키기
환경: C:\Users\mjLee\VirtualBox VMs\Windows7\Windows7.vdi
C:\Program Files\Oracle\VirtualBox> VBoxManage modifyhd "C:\Users\mjLee\VirtualBox VMs\Windows7\Windows7.vdi" --resize 40960
==> 가상디스크의 형식이 고정크기인 경우
Progress state: VBOX_E_NOT_SUPPORTED
VBoxManage.exe: error: Resize medium operation for this format is not implemented yet! 
오류 메시지 발생

04) 가상 디스크 형식 변환
고정에서 동적으로 변환하는 명령
//VBoxManage.exe clonemedium disk "C:\path\to\source.vdi" "C:\path\to\destination.vdi" -variant Standard
Ex) C:\Program Files\Oracle\VirtualBox> VBoxManage.exe clonemedium disk "C:\Users\mjLee\VirtualBox VMs\Windows7\Windows7.vdi" "C:\Users\mjLee\VirtualBox VMs\Windows7_Variant\Windows7_Variant.vdi" -variant Standard
출처: http://slic.tistory.com/1381

 ※ 가상디스크의 사이즈 확장 실행

동적에서 고정으로 변환하는 명령
//VBoxManage.exe clonemedium disk "C:\path\to\source.vdi" "C:\path\to\destination.vdi" -variant Fixed
Ex) C:\Program Files\Oracle\VirtualBox> VBoxManage.exe clonemedium disk "C:\Users\mjLee\VirtualBox VMs\Windows7_Variant\Windows7_Variant.vdi" "C:\Users\mjLee\VirtualBox VMs\Windows7_Fixed\Windows7_Fixed.vdi" -variant Fixed

※ Oracle VM VirtualBox 실행 → 이미지선택 → 우클릭 → 설정 → 저장소 → 새로생성된 .vdi파일로 교체

가상OS: 제어판 → 시스템 및 보안 → 관리도구 → 하드 디스크 파티션 만들기 및 포맷 → C드라이브 선택 → 우클릭 → 볼륨확장 → 볼륨확장 마법사 시작 → 다음 → 다음 → 마침

virtual box에 기존 vdi 사용하기
새로만들기 → 이름(ex. Ubuntu14.04) → 다음 → 기존 가상 하드디스크 파일 사용→ 기존 vdi파일 복사 (위치: C:\Users\afewgood\VirtualBox VMs\Ubuntu14.04\ 복사)  → 기존vdi파일 불러오기

Posted by afewgood
,