在這個線程 Beacons not detected in Android service 但是當我在清單AltBeacon:BeaconConsumer在服務不工作
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.ubiquitous.beaconone.tablet"
android:versionCode="3"
android:versionName="2.0" >
<uses-sdk
android:minSdkVersion="19"
android:targetSdkVersion="19" />
<uses-permission android:name="android.permission.BLUETOOTH"/>
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
<application
android:icon="@drawable/logo"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name=".Activities.MainActivity"
android:label="@string/app_name"
android:launchMode="singleInstance"
android:taskAffinity="">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".Activities.ScanningActivity"/>
<service
android:name="org.altbeacon.beacon.service.BeaconService"
android:enabled="true"
android:exported="true"
android:isolatedProcess="false"></service>
<service
android:name="org.altbeacon.beacon.BeaconIntentProcessor"
android:enabled="true"></service>
</application>
把代碼中,我得到了一個錯誤:
錯誤:(48 13 )來自AndroidManifest.xml的屬性[email protected] value =(true):48:13
錯誤:(48,13)任務':app:processDebugManifest'的執行失敗。
Manifest merger failed : Attribute service#[email protected] value=(true) from AndroidManifest.xml:48:13 is also present at org.altbeacon:android-beacon-library:2.1.4:27:13 value=(false) Suggestion: add 'tools:replace="android:exported"' to element at AndroidManifest.xml:45:9 to override
顯示完整的清單文件 – John
問題已被更新,TY –