java checkproperties(this),为什么我需要android.permission.ACCESS_CHECKIN_PROPERTIES

I hope someone can help with this, I've been searching and have not found an explanation.

I written my application using Eclipse and tested in on the emulator and it works fine with no errors. When I attempt to install the app on my phone, it fails complaining that the permission android.permission.ACCESS_CHECKIN_PROPERTIES is required.

[2014-01-21 09:02:44 - ShoppingCalc] Android Launch!

[2014-01-21 09:02:44 - ShoppingCalc] adb is running normally.

[2014-01-21 09:02:44 - ShoppingCalc] Performing com.jwg.shoppingcalc.MainActivity activity launch

[2014-01-21 09:02:48 - ShoppingCalc] Uploading ShoppingCalc.apk onto device '42f7aa046c719f73'

[2014-01-21 09:02:48 - ShoppingCalc] Installing ShoppingCalc.apk...

[2014-01-21 09:02:50 - ShoppingCalc] Success!

[2014-01-21 09:02:50 - ShoppingCalc] Starting activity com.jwg.shoppingcalc.MainActivity on device 42f7aa046c719f73

[2014-01-21 09:02:50 - ShoppingCalc] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.jwg.shoppingcalc/.MainActivity }

[2014-01-21 09:02:50 - ShoppingCalc] ActivityManager: java.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.jwg.shoppingcalc/.MainActivity } from null (pid=21219, uid=2000) requires android.permission.ACCESS_CHECKIN_PROPERTIES

[2014-01-21 09:02:50 - ShoppingCalc] ActivityManager: at android.os.Parcel.readException(Parcel.java:1425)

[2014-01-21 09:02:50 - ShoppingCalc] ActivityManager: at android.os.Parcel.readException(Parcel.java:1379)

[2014-01-21 09:02:50 - ShoppingCalc] ActivityManager: at android.app.ActivityManagerProxy.startActivity(ActivityManagerNative.java:1930)

[2014-01-21 09:02:50 - ShoppingCalc] ActivityManager: at com.android.commands.am.Am.runStart(Am.java:463)

[2014-01-21 09:02:50 - ShoppingCalc] ActivityManager: at com.android.commands.am.Am.run(Am.java:108)

[2014-01-21 09:02:50 - ShoppingCalc] ActivityManager: at com.android.commands.am.Am.main(Am.java:81)

[2014-01-21 09:02:50 - ShoppingCalc] ActivityManager: at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)

[2014-01-21 09:02:50 - ShoppingCalc] ActivityManager: at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:237)

[2014-01-21 09:02:50 - ShoppingCalc] ActivityManager: at dalvik.system.NativeStart.main(Native Method)

[2014-01-21 09:04:57 - ShoppingCalc] Dx

On the emulator, installing the app looks like this.

[2014-01-21 09:33:48 - ShoppingCalc] Android Launch!

[2014-01-21 09:33:48 - ShoppingCalc] adb is running normally.

[2014-01-21 09:33:48 - ShoppingCalc] Performing com.jwg.shoppingcalc.MainActivity activity launch

[2014-01-21 09:33:52 - ShoppingCalc] Uploading ShoppingCalc.apk onto device 'emulator-5554'

[2014-01-21 09:33:52 - ShoppingCalc] Installing ShoppingCalc.apk...

[2014-01-21 09:34:08 - ShoppingCalc] Success!

[2014-01-21 09:34:08 - ShoppingCalc] Starting activity com.jwg.shoppingcalc.MainActivity on device emulator-5554

[2014-01-21 09:34:13 - ShoppingCalc] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.jwg.shoppingcalc/.MainActivity }

In my research I found that the permission android.permission.ACCESS_CHECKIN_PROPERTIES is for system apps only and cannot be granted even if included in the manifest.

The only change to the java code I made since it last worked on the phone was checking for a file on the device and if it does not exist, create the file.

Any detailed information about why an app would need this permission would be useful, what I found so far on line only states the minimum.

Thanks!

Adding manifest on 1/22/14

android:name="com.jwg.shoppingcalc.MainActivity"

android:label="@string/app_name" >

android:name="com.jwg.shoppingcalc.EnterTaxActivity"

android:label="@string/app_name" >

android:name="com.jwg.shoppingcalc.EnterQuantity"

android:label="@string/app_name" >

解决方案

Thanks again, I was able to solve the problem. It was in the manifest but on in the activity section.

In the application section there was a line added that I'm not sure how it got there as I did not add it, android:permission="android.permission.ACCESS_CHECKIN_PROPERTIES"

android:allowBackup="true"

android:icon="@drawable/ic_launcher"

android:label="@string/app_name"

android:theme="@style/AppTheme"

android:persistent="false"

android:permission="android.permission.ACCESS_CHECKIN_PROPERTIES">

Commenting this line allowed the app to install and run again on the phone.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值