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

+ Recent posts