Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- analizer
- matplotlib
- del
- 분류 결과표
- list
- count()
- nan
- 최댓값
- elbow method
- Python
- data
- insert()
- Machine Learning
- 반복문
- dendrogram
- string
- len()
- hierarchical_clustering
- sklearn
- numpy
- 덴드로그램
- wcss
- append()
- DataFrame
- pandas
- 최솟값
- DataAccess
- function
- IN
- Dictionary
Archives
- Today
- Total
개발공부
[Android] Retrofit2 라이브러리 사용을 위한 설정 방법 본문
build.gradle
아래 코드를 추가합니다.
dependencies {
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation 'com.squareup.retrofit2:converter-gson:2.9.0'
implementation("com.squareup.okhttp3:logging-interceptor:4.9.0")
}
res/xml
network_security_config.xml

<?xml version="1.0" encoding="utf-8" ?>
<network-security-config>
<domain-config cleartextTrafficPermitted="false">
<domain includeSubdomains="true">*.허용할 도메인</domain>
</domain-config>
</network-security-config>
AndroidMenifest.xml
아래 코드를 추가합니다.
android:targetSandboxVersion="1"
<uses-permission android:name="android.permission.INTERNET"/>
android:networkSecurityConfig="@xml/network_security_config"
android:usesCleartextTraffic="true"
예시
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.fullspringwater.memo"
android:targetSandboxVersion="1">
<uses-permission android:name="android.permission.INTERNET"/>
<application
android:networkSecurityConfig="@xml/network_security_config"
android:usesCleartextTraffic="true"
android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/backup_rules"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.Memo"
tools:targetApi="31">
<activity
android:name=".RegisterActivity"
android:exported="false" />
<activity
android:name=".MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
'Android' 카테고리의 다른 글
[Android] Progress Dialog 프로그레스 다이얼로그 생성/제거 (0) | 2022.07.25 |
---|---|
[Android] Retrofit2 라이브러리를 이용한 POST로 API 호출하여 처리하는 방법 (0) | 2022.07.21 |
[Android] 카메라 / 앨범 처리 (0) | 2022.07.21 |
[Android] 리사이클러뷰 스크롤 위치 찾기, 페이징 처리 (0) | 2022.07.20 |
[Android] 이미지 처리를 위한 Glide 라이브러리 사용법 (0) | 2022.07.20 |