전체 글 495

[Android java]How to solve the infinite git conflict remaining error !!!!!!!!

#Most of the time, I don't think the same problem as me occured, but I leave a message for someone just in case like me.There was an infinite conflict message, so I definitely controlled conflict , but there was a warning of conflict again!! . "Unresolved conflict remaining." The interesting part was that GraphFragment was definitely my part, so Modified has to come up, but nothing came up like ..

[Android java] Cannot access database on the main thread ERROR 에러 해결

Thread 한 프로세스 내에서 동작되는 실행 단위 ex) 크롬 브라우저라는 프로세스에서 유투브에 접속하여 동영상을 시청할 때 유투브 데이터를 다운 받으면서 시청하는 작업이 동시에 이루어 지는 것도 여러 Thread를 사용하기 때문입니다. Cannot access database on the main thread 에러 해결 하지만 이런 것은 실제로 어플리케이션을 배포했을 때는 사용하면 안됩니다. 데이터베이스와 연결해 이것저것 가져올 때 어플리케이션은 DB관련 태스크를 우선적으로 시행하므로 앱이 Freeze (멈춤) 될 수 있기 때문입니다. 따라서 MainThread가 아닌 BackGround Thread 에서 동작해야 합니다. Runnable과 Thread를 사용하여 이런 식으로 DB와 관련된 모든 코드..

[Android java] git 무한 conflict 문제 해결 Unresolved conflict remaining

대부분의 경우 저와 같은 문제는 발생하지 않을 것이라 생각하지만 혹시 모를 누군가를 위해 글을 남깁니다.무한 conflict가 발생해서 분명히 conflict를 수정해줬는데도 자꾸 conflict를 수정하라는 경고가 떴습니다. Unresolved conflict remaining. 신기한 부분은 분명히 저 GraphFragment는 제가 맡은 파트여서 Modified가 떠야하는데 저렇게 아무것도 뜨지 않았고 DB부분도 팀원분이 하신거라 Modified 등이 떠야하는데 뜨지 않았었습니다. 와 진짜 몇 시간째 미치는 줄 알았습니다.. git 관련해서 뭔가 오류가 난거같았습니다. 제 개인적인 생각으로는 머지 실패이후 이것저것 만지다가 머지가 중간에 취소되지 않은 채 넘어간 채로 다른 머지를 시도하게 되었기 때..

[Android java] SharedPreferrence nullPointerException Error 해결

SharedPreferrence nullPointerException Error 해결 PrefMgr 클래스를 만들어주고 SelectActivity 클래스에서 사용하려고 하였습니다. 그런데 NullPointerException 오류가 발생하였습니다. 원인 이렇게 전역변수로 설정은 해주었는데요 new 코드를 통해 객체 선언을 해주지 않았습니다. 따라서 null 에러가 발생하였습니다. 해결책 1.PrefMgr에 생성자를 만들어주고 객체 선언을 해줍니다. 2. 함수에 static을 선언해주고 직접 메소드를 사용합니다. 물론 정말 단순한 실수였지만, 이것때문에 3시간을 헤맸습니다 ^^ . 혹시나 이 단순한 문제 때문에 방황하고 있을 그 한 명을 위해 포스팅을 남깁니다.. ㅎㅎ

[Android java ] Room The columns returned by the query does not have the fields 에러 해결

The columns returned by the query does not have the fields 에러 해결 특정 컬럼의 데이터만 쿼리하기 위해 쿼리문을 작성해주었는데 위와 같은 에러가 발생하였습니다. 잘 보시면 제가 만든 쿼리의 date 컬럼은 String형으로 구성되어있습니다. 하지만 아래에서 저는 형으로 적어두었으니 오류가 난 것입니다. 따라서 이 부분을 다음과 같이 수정해주었습니다. 로그를 찍어보니 다음과 같이 컬럼의 데이터가 순서대로 잘 들어왔습니다.

나 퇴사할래 - 경제적 자유 계산기 개인정보처리방침

Privacy Policy KimTaeu && ParkEunsu built the 나 퇴사할래 - 경제적 자유 계산기 app as a Free app. This SERVICE is provided by KimTaeu && ParkEunsu at no cost and is intended for use as is. This page is used to inform visitors regarding my policies with the collection, use, and disclosure of Personal Information if anyone decided to use my Service. If you choose to use my Service, then you agree to the collec..

기타 2021.12.19

[Android java] Room 개념 및 예제(기초)

Room 개념 및 예제(기초) *Entity란? @Entity 데이터에서 테이블에 해당하는 것. 같은 형태의 데이터가 여러 개 저장될 수 있는 공간을 의미합니다. *Dao란? Direct access object 의 약자 데이터 베이스에서 데이터에 엑세스하기 위한 객체를 의미합니다. 예제 1. dependency에 Room 추가하기 2.UserProfile 이라는 클래스를 만듭니다. (데이터에 해당) 3.UserProfileDao를 만듭니다. 4.UserProfile 데이터를 관리할 Database 클래스를 만듭니다. entities 는 데이터에서 사용할 데이터 클래스를 넣어줍니다. version은 신경쓰지 않아도 됩니다. XML 5.Main에서 db 조작하기 package com.example.myap..

[Android java]Build was configured to prefer settings repositories over project repositories but repository 'Google' was added by build file 'build.gradle' 에러 해결

Build was configured to prefer settings repositories over project repositories but repository 'Google' was added by build file 'build.gradle' 그래들 지옥에서 벗어나기란 쉬운 일이 아닙니다.. 저의 삽질이 여러분에게 조금이라도 도움이 되었으면 좋겠습니다. build.gradle(Project) // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { repositories { google() jcenter() } dependencies { classp..

[Android java] 날짜를 milSec로 변환하기

날짜를 milSec로 변환하기 String parseDate = "2021-10-11"; try { format1 = new SimpleDateFormat("yyyy-MM-dd").parse(parseDate); } catch (Exception e){ } if(format1 != null){ millSec = format1.getTime(); } Log.d("milSec",String.valueOf(millSec)); 주의할 점 1.parse 함수는 try구문 안에서 사용해야 합니다. 그렇지 않으면 ParseException 오류가 발생합니다. milSec를 날짜로 변환하기 String day ; day = convertDate(millSec,"yyyy-MM-dd"); Log.d("day",day); ..