我在Android Studio中的应用程序为移动设备和Google眼镜提供了单独的组件。当我尝试移动版本加载到的Nexus 10(Android版本4.4.2)我得到以下错误:Android Studio“应用程序具有相同的程序包名称”
Applications have the same package name com.example.carterpedersen.datatransfer:
mobile, glass
我可以,但是,加载应用到玻璃装置(XE19.1)与没问题。
我觉得这个错误令人困惑,因为我的应用程序已经运行几个星期没有问题,并突然移动组件瘫痪。我最近在移动组件上添加了对玻璃R的依赖,但即使这是错误发生前几天。
我试图重构移动目录,以及整个包,没有成功。
我已经搜索了SO和其他来源,但我没有找到任何重复;如果我在这一点上错了,请联系我。谢谢您的帮助。提供的清单如下。
手机清单:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.carterpedersen.datatransfer" >
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="com.example.carterpedersen.datatransfer.FileRetrieval"
android:label="@string/app_name" >
</activity>
<activity
android:name="com.example.carterpedersen.datatransfer.BluetoothClient"
android:label="@string/title_activity_bluetooth_client" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
玻璃清单:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.carterpedersen.datatransfer" >
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="com.example.carterpedersen.datatransfer.LauncherActivity"
android:label="@string/title_activity_launcher" >
</activity>
<activity
android:name="com.example.carterpedersen.datatransfer.LiveCardMenuActivity"
android:theme="@style/MenuTheme" >
</activity>
<!-- Service responsible for maintaining LiveCard -->
<service
android:name="com.example.carterpedersen.datatransfer.LiveCardDataCollect"
android:icon="@drawable/ic_glass_logo"
android:label="@string/title_activity_live_card_data_collect" >
<intent-filter>
<action android:name="com.google.android.glass.action.VOICE_TRIGGER" />
</intent-filter>
<meta-data
android:name="com.google.android.glass.VoiceTrigger"
android:resource="@xml/voice_trigger" />
</service>
<!-- For content sharing permissions -->
<provider
android:name="android.support.v4.content.FileProvider"
android:authorities="com.example.carterpedersen.datatransfer.fileprovider"
android:exported="false"
android:grantUriPermissions="true" >
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/file_paths" />
</provider>
<!-- Selects file for sharing to client. -->
<activity
android:name="com.example.carterpedersen.datatransfer.FileShareActivity"
android:label="@string/title_activity_file_share" >
<intent-filter>
<action android:name="android.intent.action.PICK" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.OPENABLE" />
<data android:mimeType="*/*" />
</intent-filter>
</activity>
<activity
android:name="com.example.carterpedersen.datatransfer.BluetoothHost"
android:label="@string/title_activity_bluetooth_host" >
</activity>
<receiver android:name="com.example.carterpedersen.datatransfer.BluetoothHost$HostBroadRec" >
<intent-filter>
<action android:name="transapps.g6.new.alert" />
</intent-filter>
</receiver>
</application>