开发者

Android can't debug after adding certain permissions

开发者 https://www.devze.com 2023-04-11 22:08 出处:网络
I added som开发者_StackOverflow中文版e NFC permissions to my app and now it no longer enters into debug mode. It just says \"installed on device... done!\"

I added som开发者_StackOverflow中文版e NFC permissions to my app and now it no longer enters into debug mode. It just says "installed on device... done!"

 [2011-10-08 20:58:37 - myApp] Automatic Target Mode: using device '3433254FAA1500EC'
 [2011-10-08 20:58:37 - myApp] Uploading myApp.apk onto device '3433254FAA1500EC'
 [2011-10-08 20:58:37 - myApp] Installing myApp.apk...
 [2011-10-08 20:58:39 - myApp] Success!
 [2011-10-08 20:58:39 - myApp] /myApp/bin/myApp.apk installed on device
 [2011-10-08 20:58:39 - myApp] Done!

it happens whenever I have added this to the manifest:

<action android:name="android.nfc.action.TECH_DISCOVERED" />

this the xml around it

  <activity android:name="Home"
              android:screenOrientation="portrait"
              android:label="@string/app_name"
              android:configChanges="orientation|keyboardHidden">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <action android:name="android.nfc.action.TECH_DISCOVERED" />
            <category android:name="android.intent.category.LAUNCHER" />


        </intent-filter>

            <meta-data android:name="android.nfc.action.TECH_DISCOVERED"
                android:resource="@xml/filter_nfc"
            />

    </activity>

I want to be able to debug with my breakpoints, why is this being prevented?


You can try putting the TECH_DISCOVERED in its own , take it out of the list with MAIN and LAUNCHER

<intent-filter>

<action android:name="android.nfc.action.TECH_DISCOVERED" />

<intent-filter>'

I did it that way and am able to debug my NFC app.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号