2015-11-05 136 views
0

我在運行時嘗試在手機上測試應用程序時遇到此錯誤。我不知道爲什麼這個錯誤彈出,但我已經嘗試做一些基於堆棧解決方案的修復,但它不工作。運行時發生Android Studio失敗[INSTALL_PARSE_FAILED_MANIFEST_MALFORMED]

我PKG:/data/local/tmp/com.example.wolex_000.freesim

我的清單代碼:

<manifest xmlns:android="http://schemas.android.com/apk/res/android" 
package="com.chat.freshim" 
android:versionCode="1" 
android:versionName="0.1" > 


<uses-permission android:name="android.permission.READ_CONTACTS" /> 
<uses-permission android:name="android.permission.INTERNET"/> 
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> 

<uses-permission android:name="android.permission.GET_ACCOUNTS" /> 
<uses-permission android:name="android.permission.WAKE_LOCK" /> 

<!-- FOR QB --> 
<uses-permission android:name="android.permission.CAMERA"/> 
<uses-permission android:name="android.permission.FLASHLIGHT"/> 

<uses-feature android:name="android.hardware.camera"/> 
<uses-feature android:name="android.hardware.camera.autofocus"/> 
<uses-feature android:name="android.hardware.camera.flash"/> 

<uses-permission android:name="android.permission.RECORD_AUDIO"/> 
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/> 

<!-- For GCM --> 
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" /> 

<!-- For GCM 
<permission android:name=".permission.C2D_MESSAGE" 
    android:protectionLevel="signature" /> --> 

<uses-permission android:name=".permission.C2D_MESSAGE" 
    android:protectionLevel="signature" /> 

<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> 
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> 

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

<application 
    android:allowBackup="true" 
    android:icon="@drawable/icon_fresh" 
    android:label="fssl" 
    android:theme="@style/MyTheme"> 
    <activity 
     android:name="com.chat.freshim.LoginActivity" 
     android:screenOrientation="portrait" 
     android:windowSoftInputMode="stateHidden" 
     android:label="fssl" 
     android:theme="@style/NoActionBar"> 
     <intent-filter> 
      <action android:name="android.intent.action.MAIN" /> 
      <category android:name="android.intent.category.LAUNCHER" /> 
     </intent-filter> 
    </activity> 

    <activity 
     android:name="com.chat.freshim.FriendsListActivity" 
     android:screenOrientation="portrait" 
     android:launchMode="singleTask" 
     android:theme="@style/NoActionBar"/> 

    <activity 
     android:name="com.chat.freshim.FriendsAllListActivity" 
     android:screenOrientation="portrait" 
     android:launchMode="singleTask"/> 

    <activity 
     android:name="com.chat.freshim.FriendsDetailActivity" 
     android:screenOrientation="portrait" 
     android:windowSoftInputMode="stateHidden"/> 

    <activity 
     android:name="com.chat.freshim.RegisterActivity" 
     android:screenOrientation="portrait" 
     android:windowSoftInputMode="stateHidden"/> 

    <activity 
     android:name="com.chat.freshim.UserDetailActivity" 
     android:screenOrientation="portrait"/> 

    <activity 
     android:name="com.chat.freshim.StatusActivity" 
     android:screenOrientation="portrait"/> 

    <activity 
     android:name="com.chat.freshim.SettingsActivity" 
     android:screenOrientation="portrait"/> 

    <activity 
     android:name="com.chat.freshim.EditProfileActivity" 
     android:screenOrientation="portrait"/> 

    <activity 
     android:name="com.chat.freshim.EditPasswordActivity" 
     android:screenOrientation="portrait"/> 

    <activity 
     android:name="com.chat.freshim.GroupCreateActivity" 
     android:screenOrientation="portrait"/> 

    <activity 
     android:name="com.chat.freshim.GroupListActivity" 
     android:screenOrientation="portrait" 
     android:launchMode="singleTask"/> 

    <activity 
     android:name="com.chat.freshim.GroupMessageDetailActivity" 
     android:screenOrientation="portrait" 
     android:windowSoftInputMode="stateHidden"/> 

    <activity 
     android:name="com.chat.freshim.GroupChooseFriendListActivity" 
     android:screenOrientation="portrait"/> 

    <activity 
     android:name="com.chat.freshim.GroupDetailActivity" 
     android:screenOrientation="portrait" 
     android:windowSoftInputMode="stateHidden"/> 

    <activity 
     android:name="com.chat.freshim.GroupEditMemberListActivity" 
     android:screenOrientation="portrait" 
     android:windowSoftInputMode="stateHidden"/> 

    <activity 
     android:name="com.chat.freshim.UploadFileActivity" 
     android:screenOrientation="portrait"/> 

    <activity 
     android:name="com.chat.freshim.CountryCodesActivity" 
     android:screenOrientation="portrait" 
     android:windowSoftInputMode="stateHidden"/> 

    <activity 
     android:name="com.chat.freshim.InviteFriends" 
     android:screenOrientation="portrait" 
     android:windowSoftInputMode="stateHidden"/> 

    <activity 
     android:name="com.chat.freshim.AddContactFriend" 
     android:screenOrientation="portrait" 
     android:windowSoftInputMode="stateHidden"/> 

    <!-- QB ACTIVITY AND SERVICES --> 
    <activity 
     android:name="com.chat.freshim.qb.ActivityVideoChat" 
     android:label="fssl" 
     android:screenOrientation="portrait" 
     android:theme="@style/NoActionBar"/> 

    <activity 
     android:name="com.chat.freshim.qb.ActivityCallUser" 
     android:label="fssl" 
     android:screenOrientation="portrait"/> 

    <service android:name="com.quickblox.module.videochat.core.service.QBVideoChatService"/> 
    <!-- For GCM --> 
    <receiver 
     android:name="com.chat.freshim.GcmBroadcastReceiver" 
     android:permission="com.google.android.c2dm.permission.SEND" > 
     <intent-filter> 
      <action android:name="com.google.android.c2dm.intent.RECEIVE" /> 
      <category android:name="com.chat.imapp" /> 
     </intent-filter> 
    </receiver> 

    <service android:name="com.chat.freshim.services.GcmIntentService" /> 

    <service android:name="com.chat.freshim.services.LoadImageService" /> 
    <service android:name="com.chat.freshim.services.LoadFileService" /> 

    <service android:name="com.chat.freshim.services.ResponseRequestService" /> 
    <service android:name="com.chat.freshim.services.FriendRequestService" /> 

    <service android:name="com.chat.freshim.services.DownLoadFileService" /> 
    <service android:name="com.chat.freshim.services.DownloadImageService" /> 

    <service android:name="com.chat.freshim.services.LastSeenGetService" /> 
    <service android:name="com.chat.freshim.services.LastSeenSetService" /> 

    <service android:name="com.chat.freshim.services.QbRegisterService" /> 

    <!--service android:name="com.quickblox.module.chat.videochat.VideoChatService"/--> 

    <!-- For GCM --> 
    <meta-data 
     android:name="com.google.android.gms.version" 
     /> 

</application> 

我有嘗試一些幫助,但沒有得到解決方案。

+0

是完整的XML文件。?我沒有看到結束標籤。只是想知道你是如何編譯它的... – Abhilash

+0

我的清單包含在編譯代碼中。問題與播放服務 – Webln

+0

你是什麼意思:我的清單包含在編譯代碼 – Abhilash

回答

0

您的<meta-data>標記缺少所需的android:value條目。它應該閱讀:

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

感謝您的回覆。在清單中添加了@ integer/google_play_services_version後,我得到一個錯誤錯誤:(172,28)找不到與給定名稱相匹配的資源(值爲'@ integer/google_play_services_version')。然後我在我的應用程序gradle中添加了編譯'com.google.android.gms:play-services:6.5.87',然後我得到一個錯誤:appdexDebug – Webln

+0

最後它的工作原理。謝謝。 – Webln

0

嘗試刪除這一行:

<meta-data 
     android:name="com.google.android.gms.version" 
     /> 
相關問題