AndroidManifest.xml 의 모든 application, activity, service 태그에 android:process=":location" 속성을 추가한다


<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.package.test">

    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

    <application
        android:process=":location"
        android:allowBackup="true"
        android:icon="@mipmap/icon"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/icon"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">
        <activity android:name=".MainActivity"
            android:process=":location"
            android:screenOrientation="portrait">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <service
            android:process=":location"
            android:name=".LocationService"
            android:enabled="true" />
    </application>

</manifest>


* 출처

https://stackoverflow.com/questions/25049176/java-lang-classcastexception-android-os-binderproxy-cannot-be-cast-to-localbind


* Android Studio 의 터미널에서 아래 명령어를 실행한다 - 삼성 기계는 가능하다고 한다!

adb backup -f data.ab <my.package>

adb.exe의 위치는? http://sjuu.tistory.com/71


* abe(Android Backup Extractor) 를 다운로드 받는다

https://sourceforge.net/projects/adbextractor/

다운로드 후 압축을 풀고, 필요한 abe.jar가 있는 디렉토리 경로를 파악한다.

\android-backup-tookit\android-backup-extractor\android-backup-extractor-20180521-bin\ 에 abe.jar가 있었다


* 백업된 데이터를 추출한다

- (그럴 일은 없겠지만) java가 설치되어 있지 않은 경우 설치 한다.

- 아래 명령어를 실행

java.exe -jar abe.jar unpack data.ab data.tar ""


* 출처

https://stackoverflow.com/questions/37413667/run-as-could-not-set-capabilities-operation-not-permitted

https://stackoverflow.com/questions/18533567/how-to-extract-or-unpack-an-ab-file-android-backup-file


* Linux / Unix / Mac OS X

- which java


* Windows

- where java

C:\Users\[user]\AppData\Local\Android\sdk\platform-tools 여기서 실행한다!!

Known Issue

If you run into the following issue: "More than one file was found with OS independent path 'META-INF/proguard/androidx-annotations.pro'", please put the following in your gradle file as a temporary workaround while we fix the issue in alpha10:


AndroidX 버전 alpha10 오류라는데 아직도(지금 2.0.0아닌가) 해결이 안되었다


해결법은 간단하다


build.gradle(app) 파일에 아래와 같이 추가해주면 된다.



packagingOptions {
    exclude 'META-INF/proguard/androidx-annotations.pro'
}

* 전체적으로 보면 이렇게
android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "com.sjuu.appid"
        minSdkVersion 23
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    packagingOptions {
        exclude 'META-INF/proguard/androidx-annotations.pro'
    }
}


안드로이드 개발시 이런 저런 라이브러리를 Gradle에 추가하다 보면,

dependencies 항목 초반에 있는 'com.android.support:appcompat-v7:28.0.0' 항목에 빨간 줄이 가면서!!!

빌드는 되는데 경고 메시지와 빨간줄이 나를 불편하게 하고 계신 분들이 있을것입니다.


아래와 같이 말이죠.

All com.android.support libraries must use the exact same version specification (mixing versions can lead to runtime crashes).
Found versions 28.0.0, 26.1.0. Examples include com.android.support:animated-vector-drawable:28.0.0 and com.android.support:mediarouter-v7:26.1.0


크래시가 발생할 수도 있답니다.

다행히 안드로이드 스튜디오 3.0 부터는 저 풍선 도움말이 실제로 도움이 되는 힌트를 줍니다.

com.android.support:mediarouter-v7 의 버전이 26.1.0 으로 낮다는 거잖아요?

이 라이브러리를 Gradle에 28.0.0 버전으로 추가해주면 됩니다.

아래와 같이 말이죠

(두번째 줄도 저 풍선 도움말에서 알려준 라이브러리를 추가한거에요)

implementation 'com.android.support:mediarouter-v7:28.0.0'
implementation 'com.android.support:support-v4:28.0.0'


빨간 물결줄이 없어졌습니다!!

해결 완료!!


Android Studio(3.2 이상) Refactor > Refactor to AndroidX 메뉴를 통해 한 번에 변환이 가능하다.

AndroidX refactoring (https://developer.android.com/jetpack/androidx/)

에서 변경하는 library 정보를 확인할 수 있다.


com.android.support.*, android.support.*, android.arch.*의 패키지들이 모두 androidx라는 이름으로 교체되며,

기존 중구난방인 버전 정보도 모두 2.0.0-alpha1부터 다시 배포된다.


Old build artifactAndroidX build artifact
android.arch.core:commonandroidx.arch.core:core-common:2.0.0-rc01
android.arch.core:coreandroidx.arch.core:core:2.0.0-rc01
android.arch.core:core-testingandroidx.arch.core:core-testing:2.0.0-rc01
android.arch.core:runtimeandroidx.arch.core:core-runtime:2.0.0-rc01
android.arch.lifecycle:commonandroidx.lifecycle:lifecycle-common:2.0.0-rc01
android.arch.lifecycle:common-java8androidx.lifecycle:lifecycle-common-java8:2.0.0-rc01
android.arch.lifecycle:compilerandroidx.lifecycle:lifecycle-compiler:2.0.0-rc01
android.arch.lifecycle:extensionsandroidx.lifecycle:lifecycle-extensions:2.0.0-rc01
android.arch.lifecycle:livedataandroidx.lifecycle:lifecycle-livedata:2.0.0-rc01
android.arch.lifecycle:livedata-coreandroidx.lifecycle:lifecycle-livedata-core:2.0.0-rc01
android.arch.lifecycle:reactivestreamsandroidx.lifecycle:lifecycle-reactivestreams:2.0.0-rc01
android.arch.lifecycle:runtimeandroidx.lifecycle:lifecycle-runtime:2.0.0-rc01
android.arch.lifecycle:viewmodelandroidx.lifecycle:lifecycle-viewmodel:2.0.0-rc01
android.arch.paging:commonandroidx.paging:paging-common:2.0.0-rc01
android.arch.paging:runtimeandroidx.paging:paging-runtime:2.0.0-rc01
android.arch.paging:rxjava2androidx.paging:paging-rxjava2:2.0.0-rc01
android.arch.persistence.room:commonandroidx.room:room-common:2.0.0-rc01
android.arch.persistence.room:compilerandroidx.room:room-compiler:2.0.0-rc01
android.arch.persistence.room:guavaandroidx.room:room-guava:2.0.0-rc01
android.arch.persistence.room:migrationandroidx.room:room-migration:2.0.0-rc01
android.arch.persistence.room:runtimeandroidx.room:room-runtime:2.0.0-rc01
android.arch.persistence.room:rxjava2androidx.room:room-rxjava2:2.0.0-rc01
android.arch.persistence.room:testingandroidx.room:room-testing:2.0.0-rc01
android.arch.persistence:dbandroidx.sqlite:sqlite:2.0.0-rc01
android.arch.persistence:db-frameworkandroidx.sqlite:sqlite-framework:2.0.0-rc01
com.android.support.constraint:constraint-layoutandroidx.constraintlayout:constraintlayout:1.1.2
com.android.support.constraint:constraint-layout-solverandroidx.constraintlayout:constraintlayout-solver:1.1.2
com.android.support.test.espresso.idling:idling-concurrentandroidx.test.espresso.idling:idling-concurrent:3.1.0
com.android.support.test.espresso.idling:idling-netandroidx.test.espresso.idling:idling-net:3.1.0
com.android.support.test.espresso:espresso-accessibilityandroidx.test.espresso:espresso-accessibility:3.1.0
com.android.support.test.espresso:espresso-contribandroidx.test.espresso:espresso-contrib:3.1.0
com.android.support.test.espresso:espresso-coreandroidx.test.espresso:espresso-core:3.1.0
com.android.support.test.espresso:espresso-idling-resourceandroidx.test.espresso:espresso-idling-resource:3.1.0
com.android.support.test.espresso:espresso-intentsandroidx.test.espresso:espresso-intents:3.1.0
com.android.support.test.espresso:espresso-remoteandroidx.test.espresso:espresso-remote:3.1.0
com.android.support.test.espresso:espresso-webandroidx.test.espresso:espresso-web:3.1.0
com.android.support.test.janktesthelper:janktesthelperandroidx.test.jank:janktesthelper:1.0.1
com.android.support.test.services:test-servicesandroidx.test:test-services:1.1.0
com.android.support.test.uiautomator:uiautomatorandroidx.test.uiautomator:uiautomator:2.2.0
com.android.support.test:monitorandroidx.test:monitor:1.1.0
com.android.support.test:orchestratorandroidx.test:orchestrator:1.1.0
com.android.support.test:rulesandroidx.test:rules:1.1.0
com.android.support.test:runnerandroidx.test:runner:1.1.0
com.android.support:animated-vector-drawableandroidx.vectordrawable:vectordrawable-animated:1.0.0
com.android.support:appcompat-v7androidx.appcompat:appcompat:1.0.0
com.android.support:asynclayoutinflaterandroidx.asynclayoutinflater:asynclayoutinflater:1.0.0
com.android.support:carandroidx.car:car:1.0.0-alpha5
com.android.support:cardview-v7androidx.cardview:cardview:1.0.0
com.android.support:collectionsandroidx.collection:collection:1.0.0
com.android.support:coordinatorlayoutandroidx.coordinatorlayout:coordinatorlayout:1.0.0
com.android.support:cursoradapterandroidx.cursoradapter:cursoradapter:1.0.0
com.android.support:customtabsandroidx.browser:browser:1.0.0
com.android.support:customviewandroidx.customview:customview:1.0.0
com.android.support:designcom.google.android.material:material:1.0.0-rc01
com.android.support:documentfileandroidx.documentfile:documentfile:1.0.0
com.android.support:drawerlayoutandroidx.drawerlayout:drawerlayout:1.0.0
com.android.support:exifinterfaceandroidx.exifinterface:exifinterface:1.0.0
com.android.support:gridlayout-v7androidx.gridlayout:gridlayout:1.0.0
com.android.support:heifwriterandroidx.heifwriter:heifwriter:1.0.0
com.android.support:interpolatorandroidx.interpolator:interpolator:1.0.0
com.android.support:leanback-v17androidx.leanback:leanback:1.0.0
com.android.support:loaderandroidx.loader:loader:1.0.0
com.android.support:localbroadcastmanagerandroidx.localbroadcastmanager:localbroadcastmanager:1.0.0
com.android.support:media2androidx.media2:media2:1.0.0-alpha03
com.android.support:media2-exoplayerandroidx.media2:media2-exoplayer:1.0.0-alpha01
com.android.support:mediarouter-v7androidx.mediarouter:mediarouter:1.0.0
com.android.support:multidexandroidx.multidex:multidex:2.0.0
com.android.support:multidex-instrumentationandroidx.multidex:multidex-instrumentation:2.0.0
com.android.support:palette-v7androidx.palette:palette:1.0.0
com.android.support:percentandroidx.percentlayout:percentlayout:1.0.0
com.android.support:preference-leanback-v17androidx.leanback:leanback-preference:1.0.0
com.android.support:preference-v14androidx.legacy:legacy-preference-v14:1.0.0
com.android.support:preference-v7androidx.preference:preference:1.0.0
com.android.support:printandroidx.print:print:1.0.0
com.android.support:recommendationandroidx.recommendation:recommendation:1.0.0
com.android.support:recyclerview-selectionandroidx.recyclerview:recyclerview-selection:1.0.0
com.android.support:recyclerview-v7androidx.recyclerview:recyclerview:1.0.0
com.android.support:slices-buildersandroidx.slice:slice-builders:1.0.0
com.android.support:slices-coreandroidx.slice:slice-core:1.0.0
com.android.support:slices-viewandroidx.slice:slice-view:1.0.0
com.android.support:slidingpanelayoutandroidx.slidingpanelayout:slidingpanelayout:1.0.0
com.android.support:support-annotationsandroidx.annotation:annotation:1.0.0
com.android.support:support-compatandroidx.core:core:1.0.0
com.android.support:support-contentandroidx.contentpager:contentpager:1.0.0
com.android.support:support-core-uiandroidx.legacy:legacy-support-core-ui:1.0.0
com.android.support:support-core-utilsandroidx.legacy:legacy-support-core-utils:1.0.0
com.android.support:support-dynamic-animationandroidx.dynamicanimation:dynamicanimation:1.0.0
com.android.support:support-emojiandroidx.emoji:emoji:1.0.0
com.android.support:support-emoji-appcompatandroidx.emoji:emoji-appcompat:1.0.0
com.android.support:support-emoji-bundledandroidx.emoji:emoji-bundled:1.0.0
com.android.support:support-fragmentandroidx.fragment:fragment:1.0.0
com.android.support:support-media-compatandroidx.media:media:1.0.0
com.android.support:support-tv-providerandroidx.tvprovider:tvprovider:1.0.0
com.android.support:support-v13androidx.legacy:legacy-support-v13:1.0.0
com.android.support:support-v4androidx.legacy:legacy-support-v4:1.0.0
com.android.support:support-vector-drawableandroidx.vectordrawable:vectordrawable:1.0.0
com.android.support:swiperefreshlayoutandroidx.swiperefreshlayout:swiperefreshlayout:1.0.0
com.android.support:textclassifierandroidx.textclassifier:textclassifier:1.0.0
com.android.support:transitionandroidx.transition:transition:1.0.0
com.android.support:versionedparcelableandroidx.versionedparcelable:versionedparcelable:1.0.0
com.android.support:viewpagerandroidx.viewpager:viewpager:1.0.0
com.android.support:wearandroidx.wear:wear:1.0.0
com.android.support:webkitandroidx.webkit:webkit:1.0.0


* 클래스 맵핑

https://developer.android.com/topic/libraries/support-library/downloads/androidx-artifact-mapping.csv


MS는 ReactiveX를 왜 만들었을까? (feat. RxJS)

http://huns.me/development/2051


웹 프론트엔드 개발자의 얕고 넓은 Rx 이야기

https://www.slideshare.net/jeokrang/rx-70197043


강좌 1

http://introtorx.com/


강좌 2


* nuget(4.1.6버전 기준 .Net framework 4.6부터 사용 가능)

https://www.nuget.org/packages/System.Reactive/


* Github의 관련 사용 예시

Showing the top 10 GitHub repositories that depend on System.Reactive:

RepositoryStars
microsoft/react-native-windows
A framework for building native Windows apps with React.
 
AvaloniaUI/Avalonia
A multi-platform .NET UI framework
 
reactiveui/ReactiveUI
An advanced, composable, functional reactive model-view-viewmodel framework for all .NET platforms that is inspired by functional reactive programming. ReactiveUI allows you to abstract mutable state away from your user interfaces, express the idea around a feature in one readable place and improve the testability of your application.
 
gitextensions/gitextensions
Git Extensions is a standalone UI tool for managing git repositories. It also integrates with Windows Explorer and Microsoft Visual Studio (2015/2017/2019).
 
dotnet/reactive
The Reactive Extensions for .NET
 
reactiveui/refit
The automatic type-safe REST library for .NET Core, Xamarin and .NET
 
louthy/language-ext
C# functional language extensions - a base class library for functional programming
 
elastic/elasticsearch-net
Elasticsearch.Net & NEST
 
reactiveui/Akavache
An asynchronous, persistent key-value store
 
octokit/octokit.net
A GitHub API client library for .NET
 


APIDescription in build.gradle
Google+com.google.android.gms:play-services-plus:16.0.0
Google Account Logincom.google.android.gms:play-services-auth:16.0.1
Google Actions, Base Client Librarycom.google.android.gms:play-services-base:16.0.1
Google Sign Incom.google.android.gms:play-services-identity:16.0.0
Google Analyticscom.google.android.gms:play-services-analytics:16.0.4
Google Awarenesscom.google.android.gms:play-services-awareness:16.0.0
Google Castcom.google.android.gms:play-services-cast:16.0.3
Google Cloud Messagingcom.google.android.gms:play-services-gcm:16.0.0
Google Drivecom.google.android.gms:play-services-drive:16.0.0
Google Fitcom.google.android.gms:play-services-fitness:16.0.1
Google Location and Activity Recognitioncom.google.android.gms:play-services-location:16.0.0
Google Mapscom.google.android.gms:play-services-maps:16.0.0
Google Mobile Adscom.google.android.gms:play-services-ads:16.0.0
Google Placescom.google.android.gms:play-services-places:16.0.0
Mobile Visioncom.google.android.gms:play-services-vision:16.2.0
Google Nearbycom.google.android.gms:play-services-nearby:16.0.0
Google Panorama Viewercom.google.android.gms:play-services-panorama:16.0.0
Google Play Game servicescom.google.android.gms:play-services-games:16.0.0
SafetyNetcom.google.android.gms:play-services-safetynet:16.0.0
Google Paycom.google.android.gms:play-services-wallet:16.0.1
Wear OS by Googlecom.google.android.gms:play-services-wearable:16.0.1


https://developers.google.com/android/guides/setup



+ Recent posts