.gitignore 설정 후 적용되지 않는 문제 해결
git 사용 도중 gitignore 파일을 수정한 뒤 적용이 되지 않을 때 아래 명령 입력
git rm -r --cached .git add .git commit -m "fixed untracked filess"
React Native에서 사용 중인 gitignore 파일
[React Native] Androidd에서 GIF 이미지 출력하기
React Native 에서 GIF 이미지를 출력할때 일반 이미지 출력과 동일하게 Image를 이용하여 출력을 하면 됩니다.
<Image source={require('이미지 경로(local)')} />
<Image source={{url : '이미지 경로(web)'}} />
이렇게 넣었는데 화면에 공간만 차지하고 이미지가 나오지 않는 문제가 있습니다.
이 때 android/app/src/build.gradle 파일에 아래 내용을 추가 해주어야 합니다.
dependencies {
..................
compile "com.facebook.fresco:animated-gif:0.10.0"
..................
}
그리고 다시 build를 하면 정상적으로 출력되는 이미지를 확인 할 수 있습니다.
'Programing > ReactNative' 카테고리의 다른 글
[React Native-Android] Could not resolve all dependencies for configuration ':*** :_debugCompile'. (0) | 2017.06.26 |
---|---|
[React Native - iOS] Apple Mach-O Linker failure (0) | 2017.01.24 |
[React Native] Multiple dex files define (0) | 2016.08.25 |
[React Native] 특정 버전으로 Project 초기화하기 (0) | 2016.07.31 |
[React Native] Android에서 Wifi AP 검색 (0) | 2016.07.20 |
git에서 cache 제거하기
.gitignore를 설정한 뒤에 commit를 하는데 설정한 파일이 계속해서 있다면 cache를 제거를 해 줘야 합니다.
git rm -r --cached .
git add .
git commit -m "message"
.gitignore에서 설정한 파일이 보이지 않은 것을 확인하면 됩니다.
'Programing' 카테고리의 다른 글
[Eclipse] Big sur 업데이트 후 이클립스 실행 오류 (0) | 2020.11.16 |
---|---|
Android / iOS Icon & Splash Image Size 정리 (0) | 2017.08.23 |
SSH로 파일 다운로드 (0) | 2015.01.26 |
유니티에서 소프트 키 숨기기 (2) | 2014.10.26 |
github에서 ignore 안되는 파일 제거하기~~~ (0) | 2011.11.23 |