2018년을 정리하며

2018. 12. 31. 22:37
지내다 보니 어찌어찌연말이고 마지막 날이네

오늘은
아내가 먹고 싶다던 치킨을
아이가 먹고 싶다던 군고구마를
내가 먹고 싶은 빵을 사서 집으로 왔다.

다 먹고나니 과식이네...
내년에는 살 좀 빼고 건강하게 잘 지내길 바라고
뭔가 한 두개는 결과물을 만들기를 바라

잘하자
728x90

보고있는데 계속 보게됨
728x90

T01.01-Exercise-CreateLayout 프로젝트를 열면

맨 아래 TODO 탭을 클릭해 보면 다음과 같이 보인다.

먼저

layout > activity_main.xml 을 수정한다

TODO(1)부터 순서대로 고쳐가면 되기 때문에


exercise code

solution code 

 

<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2016 The Android Open Source Project

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!--TODO (1) Change the ConstraintLayout to a FrameLayout.
Note that you don't need to use the fully qualified name for FrameLayout. Replace
"android.support.constraint.ConstraintLayout" with "FrameLayout"-->
<!--TODO (6) Remove the line that declares the id, we don't need it-->
<android.support.constraint.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/activity_main"
android:layout_width="match_parent"
android:layout_height="match_parent">

<!--TODO (2) Remove all attributes with the word constraint in them-->
<!--TODO (3) Remove the default text-->
<!--TODO (4) Give the TextView 16dp of padding-->
<!--TODO (5) Set the text size to 20sp-->
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hello World!"
app:layout_constraintBottom_toBottomOf="@+id/activity_main"
app:layout_constraintLeft_toLeftOf="@+id/activity_main"
app:layout_constraintRight_toRightOf="@+id/activity_main"
app:layout_constraintTop_toTopOf="@+id/activity_main" />

</android.support.constraint.ConstraintLayout>
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2016 The Android Open Source Project

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!--COMPLETED (1) Change the ConstraintLayout to a FrameLayout-->
<!--COMPLETED (6) Remove the line that declares the id, we don't need it-->
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"

android:layout_width="match_parent"
android:layout_height="match_parent">

<!--COMPLETED (2) Remove all attributes with the word constraint in them-->
<!--COMPLETED (3) Remove the default text-->
<!--COMPLETED (4) Give the TextView 16dp of padding-->
<!--COMPLETED (5) Set the text size to 20sp-->
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="16dp"
android:textSize="20sp" />
</FrameLayout>

 

주석으로 된 TODO를 완료하면 COMPLETED로 바꿔주면 확인이 된다.


build.gradle 파일

: constraint-layout을 사용하지 않으므로 모듈을 사용한다는 정의는 제거(제거안해도 되지만 깔끔하게)

exercise

 solution

 

apply plugin: 'com.android.application'

android {
compileSdkVersion 25
buildToolsVersion '25.0.2'

defaultConfig {
applicationId "com.android.example.favoritetoys"
minSdkVersion 10
targetSdkVersion 25
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
}
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:25.1.0'

// TODO (7) Remove the ConstraintLayout dependency
// as we aren't using it for these simple projects
compile 'com.android.support.constraint:constraint-layout:1.0.0-beta4'
}
apply plugin: 'com.android.application'

android {
compileSdkVersion 25
buildToolsVersion '25.0.2'

defaultConfig {
applicationId "com.android.example.favoritetoys"
minSdkVersion 10
targetSdkVersion 25
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
}
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:25.1.0'
}

 


TODO를 모두 처리하고 App Build를 하면

다음과 같이 프로젝트 화면이 나온다. 별다른 특이점은 없다.

기본 layout을 framelayout으로 바꾼 것 뿐


Project Setup으로 나오는 것은 string.xml 에 app_name이 그리 되어있어서 임.


728x90
P2P 대출상품으로 렌딧이 있다
개인에게 돈을 빌려주는것인데
금리는 시중은행보다 당연히 높아야겠지.

하지만 고려해야할 사항들이.있다


채권 상태를 보면
중도상환 - 약속 된 날짜보다 일찍 갚음
특수채권 - 개인회생으로 추심 중지
90일 미만 연체 - 돈 안갚음 초기단계

즉 돈을 빌려주고 못받을 확률이 좀 있다

현재 투자 상태

최소 투자금액이 5천원이므로 많은곳에 분산투자가 가능하나 누구에게 투자되는지는 알 수없고 이자율만 알 수 있다.
연체도 좀 있다. 장기연체가 지속되면 채권을 팔아버린다.(=손실)


이자율 높은 것 위주로 했는데...
연체가 자꾸 나온다...

한번 투자하면 3년으로 원금+이자를 매월 상환받는데 여기에서 렌딧이 수수료를 먹는다
또 중간에 투자금 화수도 어렵다.
해당 채권을 다른사람이 사 줘야하는데
이 부분은 아직 안해봐서 모르겠다.

투자전이면 이런 부분 감안해서 소액부터 시작해도 될 듯.
728x90
첫인상
주차장이 불편함
바로앞에 무료 주차장이 있으나 만차
처음에 주차장이 널널한 줄 알고 차가 기다리길래 뒤에 있었는데 안움직여서
멀리 보이는 주차장으로 갔더니
일주차 2천원임

주차하고 수영장을 삥~~돌아 입구에 들어 섬
(전철로 오면 바로 앞임)

입구에 문이 열리자 마자 비화원용 일일 이용권 발매기가 있다
성인.6000원
영수증에 락커 키 번호가 있으니 확인해야한다

락카키 번호= 신발장 번호
신발장에서 해당번호가 동작함
아무 신발장에 넣었더니... 잠기지가 않는다.
관리인이 와서 영수증에 번호 있다고 해서 확인하고 해당번호에 신발을 넣고 입장
락카번호도 마찬가지

샤워하는데 비누가 없네
싸가야 함.

수영장으로 입장
찬바람이 슈욱 불네 공기는 좀 찬 편인 듯

정시가 되니 체조를 시작한다.
강습이 있어서인지 모르겠으나 아무튼
몸풀고 들어가는데 물도 살짝 찬듯
일단 운동시작하면 물온도는 문제가 안되니까

몇 개 레인은 반을 잘라서 초급, 중급들이 쓰느데 부담이 없게 되어있다
50미터 풀인데 25미터 이후에 뚝 떨어짐

1시 50분까지인데 배고파서... 12시 30분에 나옴

같은 50m풀인 오정동 수영장
주차 무료, 이용료 3500원

그냥 보통.
같은 값이면 오정동으로
728x90
며칠전 딸아이가 아빠랑 결혼한다고 했다
참으로 뿌듯한 말이 아닐 수 없네 ㅎ
'아빠는 엄마랑 결혼했잖아'라고 했는데도
그래도 아빠랑 한댄다.
크하하하하

하지만 말이다.
아빠는 친구같은 아빠가 아니라 친구가 되고 싶어.

728x90
$ adb push app-debug.apk /data/local/tmp/com.beanandyu.myapplication

com.android.ddmlib.AdbCommandRejectedException: device unauthorized.

This adb server's $ADB_VENDOR_KEYS is not set

Try 'adb kill-server' if that seems wrong.

Otherwise check for a confirmation dialog on your device.

Error while Installing APK



위의 에러는 Android Device에서 USB Debugging을 허용하지 않았을 때에 발생한다.

해결방법은
Android device의 usb 연결을 뺏다가 다시 연결하면 pop up menu가 뜨면서
usb debugging 허용을 물어본다.

이 때, YES 를 선택하면 된다.

--
최초 debuggin 모드 설정 방법

- Settings 앱을 엽니다.
(Android 8.0 이상에만 해당) System을 선택합니다.
-아래로 스크롤하여 About phone을 선택합니다.
-아래로 스크롤하여 Build number를 7번 탭합니다.
-이전 화면으로 돌아가서 아래쪽의 Developer options를 찾습니다.
 Developer options 화면 상단에서 옵션 켜기와 끄기를 전환할 수 있습니다(그림 1). 이 기능을 계속 켜두고 싶을 수도 있습니다. 꺼진 경우에는, 기기와 개발용 컴퓨터 간에 통신이 필요없는 옵션을 제외한 대부분의 옵션이 비활성화됩니다.

그 다음 아래로 약간 스크롤하여 USB debugging을 활성화해야 합니다. 이렇게 하면 기기가 USB를 통해 연결될 때 Android Studio와 기타 SDK 도구들이 이 기기를 인식할 수 있기 때문에 개발자가 디버거와 기타 도구를 사용할 수 있습니다.

참고 : 개발자모드 활성
https://developer.android.com/studio/debug/dev-options?hl=ko

참고 : 위치서비스
https://developer.android.com/guide/topics/location/strategies#MockData

참고 : 에뮬레이터에 기본위치 설정
https://developer.android.com/studio/run/emulator#console




728x90

KAKAO Navi를 이용한 Application을 만드는 준비편


참조 : https://developers.kakao.com/docs/android/kakaonavi-api


카카오내비 앱을 호출하여 목적지까지 길안내를 할 예정인데

설정할 것듯이 좀 있다.


-- KAKAO Developer 에서 앱추가를 하여 application_key를 생성해야 한다.

-- open ssl 설치 필요

http://code.google.com/p/openssl-for-windows/downloads/list 접속
자신에 윈도우 비트에 맞는 최신버전 zip 파일 다운로드 (예: openssl-0.9.8k_X64.zip )
압축해제

openssl-0.9.8k_X64 폴더를 C:\로 이동

path설정: 내컴퓨터 오른쪽 버튼 > 속성 > 고급 시스템 설정 > 환경변수

 - JAVA_HOME

 - OPENSSL_HOME


커맨드창 open : 윈도우키 +R -> cmd 엔터

release_key_alias : myTestApp

release_keystore_path : C:\Users\내컴퓨터\.android\debug.keystore

keytool -exportcert -alias <release_key_alias> -keystore <release_keystore_path> | openssl sha1 -binary | openssl base64


keytool -exportcert -alias myTestApp -keystore C:\Users\내컴퓨터\.android\debug.keystore | openssl sha1 -binary | openssl base64

위 명령을 실행시키면

키저장소 비밀번호를 입력하라고 나오고

입력하면 해쉬키가 생성된다.

이것을 kakao developer의 해당 어플내 플랫폼을 클릭하면

키해쉬에 붙여넣고 저장.


위에서 생성한 것은 개발용이므로 배포할 때에는 release용으로 생성하여 추가하면 된다.




1. kakao_strings.xml 추가

app\src\main\res\values\kakao_strings.xml

내용

<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="kakao_app_key">카카오 api에서 생성한 app_key</string>
</resources>


2. Gradle Scripts

gredle.properties

KAKAO_SDK_GROUP=com.kakao.sdk
KAKAO_SDK_VERSION=1.15.1


build.gradle(Project:app이름)에 추가

subprojects {
repositories {
mavenCentral()
maven { url 'http://devrepo.kakao.com:8088/nexus/content/groups/public/' }
}
}


build.gradle(Module:app)에 추가 - 필요한 kakao 서비스 추가

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.0.0-beta01'
implementation 'android.arch.navigation:navigation-fragment:1.0.0-alpha08'
implementation 'androidx.constraintlayout:constraintlayout:1.1.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.0-alpha4'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0-alpha4'

// 카카오 로그인 sdk를 사용하기 위해 필요.
compile group: 'com.kakao.sdk', name: 'usermgmt', version: KAKAO_SDK_VERSION
//compile group: 'com.kakao.sdk', name: 'usermgmt', version: 1.15.1

// 카카오내비 sdk를 사용하기 위해 필요.
compile group: 'com.kakao.sdk', name: 'kakaonavi', version: KAKAO_SDK_VERSION
//compile group: 'com.kakao.sdk', name: 'kakaonavi', version: 1.15.1

}

 


준비는 끝남.

이후로는 Kakao developer의 가이드 대로 manifest.xml 추가 및 activity 추가해서 만들면 됨.


728x90
볼 만 하다.
예전에 드림 걸즈를 봤을 때만큼의 감동은 아니지만 보는내내 들려오는 퀸의 노래가 좋았고
영화가 끝난 후 'Queen forever'를 계속 듣고 있는 나.
728x90
하하하
보헤미안 랩소디 보러 왔다

간만에 혼자놀기

(사진 설명 : 스크린까지 단 한명도 앉아있지 않음 ㅡ.ㅡ)

사람이 없다 ㅋㅋ

어쨌거나
오늘 밤
좋은 시간 가질테야


728x90
BLOG main image
"그게 뭐 어쨌다는 거냐?" 늘 누가 나에게 나에대한 말을할 때면 이말을 기억해라. by nobang

카테고리

nobang이야기 (1933)
Life With Gopro (7)
Life With Mini (79)
Diary (971)
너 그거 아니(do you know) (162)
난 그래 (159)
Study (290)
속지말자 (10)
Project (34)
Poem (15)
Song (0)
Photo (113)
낙서장 (45)
일정 (0)
C.A.P.i (2)
PodCast (0)
nobang (27)
고한친구들 (4)
recieve (0)
History (0)
android_app (2)

최근에 올라온 글

최근에 달린 댓글

최근에 받은 트랙백

Total :
Today : Yesterday :