运行应用程序后,为什么APK没有存储在我的手机中?

时间:2016-04-02 17:48:47

标签: android

我有两个android项目。我通过智能手机上的usb在Android工作室运行应用程序的项目之一,还有一个项目将APK保存在智能手机上,而在第二个项目中它不会将APK保存在智能手机上。 我该怎么做才能解决这个问题,因为我使用谷歌云消息传递,当智能手机没有安装APK时,它无法收到通知。

例如,

in this picture 你可以看到应用程序" GCMTest"存储在智能手机中 但在另一个项目中它不存储APK

我该如何解决这个问题?

未在智能手机中安装APK的项目的清单

public partial class Startup {
    public void Configuration(IAppBuilder app) {
        // Surface Identity provider
        ConfigureAuth(app);

        //..other start up code
    }
}

在智能手机中安装APK的第二个项目的清单

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

     <!-- To access Google+ APIs: -->
     <uses-permission android:name="android.permission.INTERNET" />
     <!--
     To retrieve OAuth 2.0 tokens or invalidate tokens to disconnect a user. This disconnect
     option is required to comply with the Google+ Sign-In developer policies
     -->
    <uses-permission android:name="android.permission.USE_CREDENTIALS" />
    <!-- To retrieve the account name (email) as part of sign-in: -->
    <uses-permission android:name="android.permission.GET_ACCOUNTS" />
    <!-- To auto-complete the email text field in the login form with the user's emails -->
     <uses-permission android:name="android.permission.READ_PROFILE" />
<uses-permission android:name="android.permission.READ_CONTACTS" />

<!-- [START gcm_permission] -->
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />

<permission
    android:name="com.world.bolandian.watchme.permission.C2D_MESSAGE"
    android:protectionLevel="signature" />

<uses-permission android:name="com.world.bolandian.watchme.permission.C2D_MESSAGE" />

<!-- [END gcm_permission] -->
<application
    android:allowBackup="true"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme">
    <activity
        android:name=".MainActivity"
        android:label="@string/app_name">
        <intent-filter>
            <action android:name="com.world.bolandian.watchme.MainActivity" />

            <category android:name="android.intent.category.default" />
        </intent-filter>
    </activity>
    <!--
    <activity
        android:name="."
        android:label="@string/title_activity_register" >
        <intent-filter>
            <action android:name="com.world.bolandian.watchme.Register" />

            <category android:name="android.intent.category.default" />
        </intent-filter>
    </activity>
    -->
    <activity
        android:name=".Login"
        android:label="@string/title_activity_login"
        android:windowSoftInputMode="adjustResize|stateHidden">
        <intent-filter>
            <action android:name="com.world.bolandian.watchme.Login" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>

    <meta-data
        android:name="com.google.android.gms.version"
        android:value="@integer/google_play_services_version" />


    <receiver
        android:name="com.google.android.gms.gcm.GcmReceiver"
        android:exported="true"
        android:permission="com.google.android.c2dm.permission.SEND" >
        <intent-filter>
            <action android:name="com.google.android.c2dm.intent.RECEIVE" />
            <action android:name="com.google.android.c2dm.intent.REGISTRATION"></action>
            <category android:name="com.world.bolandian.watchme" />
        </intent-filter>
    </receiver>


    <service
        android:name=".MyGcmListenerService"
        android:exported="false">
        <intent-filter>
            <action android:name="com.google.android.c2dm.intent.RECEIVE" />
        </intent-filter>
    </service>
    <service
        android:name=".MyInstanceIDListenerService"
        android:exported="false">
        <intent-filter>
            <action android:name="com.google.android.gms.iid.InstanceID" />
        </intent-filter>
    </service>
    <service
        android:name=".RegistrationIntentService"
        android:exported="false"></service>

    <meta-data
        android:name="com.google.android.gms.wallet.api.enabled"
        android:value="true"/>
</application>

0 个答案:

没有答案