2017-07-15 71 views
0

我想知道此AndroidManifest.xml中的任何問題或其他問題。因爲我只是一個初學者(我發現一些相關的帖子是關於AndroidManifest.xml的問題,我仍然無法找到問題,我嘗試了很多次在我的手機上安裝apk文件,仍然無法正常工作)我不擅長英語,比較遺憾的是爲什麼安裝後無法打開應用程序並在手機上找到我的應用程序

enter image description here

<?xml version="1.0" encoding="utf-8"?> 
<manifest xmlns:android="http://schemas.android.com/apk/res/android" 
package="com.example.sung.beamexample_self" 
android:versionCode="1" 
android:versionName="1.0">> 
<uses-permission android:name="android.permission.NFC" /> 
<uses-feature android:name="android.hardware.nfc" /> 
<uses-sdk android:minSdkVersion="14" /> 

<application 

    android:allowBackup="true" 
    android:icon="@mipmap/ic_launcher" 
    android:label="@string/app_name" 
    android:roundIcon="@mipmap/ic_launcher_round" 
    android:supportsRtl="true" 
    android:theme="@style/AppTheme"> 
    <activity android:name=".MainActivity" 
     android:label="NFC Data Display"> 
     <intent-filter> 
      <action android:name="android.intent.action.MAIN" /> 
      <category android:name="android.intent.category.LAUNCHER" /> 

      <action android:name="android.nfc.action.NDEF_DISCOVERED" /> 
      <category android:name="android.intent.category.DEFAULT"/> 
      <data android:mimeType="text/plain" /> 

     </intent-filter> 
    </activity> 
    </application> 

</manifest> 
  1. 列表項

回答

0

試試這個獨立的意圖過濾器類似下面的意圖過濾器

<intent-filter> 
    <action android:name="android.nfc.action.NDEF_DISCOVERED" /> 
    <category android:name="android.intent.category.DEFAULT" /> 
    <data android:mimeType="text/plain"/> 
</intent-filter> 
<intent-filter> 
    <action android:name="android.intent.action.MAIN" /> 
    <category android:name="android.intent.category.LAUNCHER" /> 
</intent-filter> 
+0

Thx,bro,可以工作。非常感謝 –

+0

問題的解決,thx –

相關問題