java.lang.SecurityException:权限拒绝:打开提供者com.quickblox.q_municate_core.db.DatabaseProvider

时间:2015-12-10 09:50:49

标签: android quickblox q-municate

我正在使用q-municate作为基础开发一个应用程序。正如自述文件中所述,我将凭证(App ID,授权密钥,授权秘密)复制到Consts.java中的Q-municate项目代码中

我将包裹名称从com.quickblox.qmunicate折射为com.quickblox.TestingApp 我还更改了AndroidManifest文件中的包名称,<uses-permission android:name="com.quickblox.qmunicate.permission.C2D_MESSAGE" /><category android:name="com.quickblox.qmunicate" />

除外
<uses-permission android:name="com.quickblox.qmunicate.permission.C2D_MESSAGE" />

<receiver
            android:name="com.quickblox.TestingApp.GcmBroadcastReceiver"
            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" />

                <category android:name="com.quickblox.qmunicate" />
            </intent-filter>
        </receiver>

android:authorities="com.qmun.quickblox"

<provider
            android:name="com.quickblox.q_municate_core.db.DatabaseProvider"
            android:authorities="com.qmun.quickblox"
            android:exported="false" />
        <meta-data android:name="com.crashlytics.ApiKey" android:value="7aea78439bec41a9005c7488bb6751c5e33fe270"/>

进行这些更改后,我可以安装Quickblox应用程序和我修改过的应用程序。

但修改后的app变得反应迟钝。记录消息

02-12 15:09:37.329  14889-14889/? E/LoginActivity﹕ loginOnClickListener(View view)
02-12 15:09:37.329  14889-14889/? E/LoginActivity﹕ userEmail = tester@gmail.com
02-12 15:09:37.329  14889-14889/? E/LoginActivity﹕ userPassword = apptester
02-12 15:09:37.329  14889-14889/? E/LoginActivity﹕ (validationUtils.isValidUserDate(userEmail, userPassword))
02-12 15:09:37.349  14889-14889/? E/LoginActivity﹕ login(String userEmail, String userPassword)
02-12 15:09:37.349  14889-14889/? E/BaseActivity﹕ showProgress()
02-12 15:09:37.349  14889-14889/? E/BaseActivity﹕ (!progress.isAdded())
02-12 15:09:43.279  14889-14889/? E/ActivityHelper﹕ BaseBroadcastReceiver : onReceive(Context context, final Intent intent)
02-12 15:09:43.279  14889-14889/? E/ActivityHelper﹕ executinglogin_success_action
02-12 15:09:43.279  14889-14889/? E/ActivityHelper﹕ (intent != null && (action) != null)
02-12 15:09:43.279  14889-14889/? E/ActivityHelper﹕ (commandSet != null && !commandSet.isEmpty())
02-12 15:09:43.279  14889-14889/? E/ActivityHelper﹕ getHandler()
02-12 15:09:43.279  14889-14889/? E/ActivityHelper﹕ (handler == null)
02-12 15:09:43.279  14889-14889/? E/ActivityHelper﹕ for (Command command : commandSet)
02-12 15:09:43.279  14889-14889/? E/LoginActivity﹕ LoginSuccessAction execute(Bundle bundle)
02-12 15:09:43.279  14889-14889/? E/LoginActivity﹕ (rememberMeCheckBox.isChecked())
02-12 15:09:43.279  14889-14889/? E/BaseAuthActivity﹕ startMainActivity(Context context, QBUser user, boolean saveRememberMe)

02-12 16:06:25.159  20226-20226/? E/BaseAuthActivity﹕ startMainActivity(Context context, QBUser user, boolean saveRememberMe)
02-12 16:06:25.169  20226-20226/? W/System.err﹕ java.lang.SecurityException: Permission Denial: opening provider com.quickblox.q_municate_core.db.DatabaseProvider from ProcessRecord{4324dc18 20226:com.quickblox.TestingApp/u0a195} (pid=20226, uid=10195) that is not exported from uid 10190
02-12 16:06:25.169  20226-20226/? W/System.err﹕ at android.os.Parcel.readException(Parcel.java:1489)
02-12 16:06:25.169  20226-20226/? W/System.err﹕ at android.os.Parcel.readException(Parcel.java:1443)
02-12 16:06:25.169  20226-20226/? W/System.err﹕ at android.app.ActivityManagerProxy.getContentProvider(ActivityManagerNative.java:2865)
02-12 16:06:25.169  20226-20226/? W/System.err﹕ at android.app.ActivityThread.acquireProvider(ActivityThread.java:4450)
02-12 16:06:25.169    1045-1336/? W/ActivityManager﹕ Permission Denial: opening provider com.quickblox.q_municate_core.db.DatabaseProvider from ProcessRecord{4324dc18 20226:com.quickblox.TestingApp/u0a195} (pid=20226, uid=10195) that is not exported from uid 10190
02-12 16:06:25.179  20226-20226/? W/System.err﹕ at android.app.ContextImpl$ApplicationContentResolver.acquireProvider(ContextImpl.java:2229)
02-12 16:06:25.179  20226-20226/? W/System.err﹕ at android.content.ContentResolver.acquireProvider(ContentResolver.java:1378)
02-12 16:06:25.179  20226-20226/? W/System.err﹕ at android.content.ContentResolver.delete(ContentResolver.java:1276)
02-12 16:06:25.179  20226-20226/? W/System.err﹕ at com.quickblox.q_municate_core.db.managers.UsersDatabaseManager.deleteAllUsers(UsersDatabaseManager.java:438)
02-12 16:06:25.179  20226-20226/? W/System.err﹕ at com.quickblox.q_municate_core.db.managers.ChatDatabaseManager.clearAllCache(ChatDatabaseManager.java:537)
02-12 16:06:25.179  20226-20226/? W/System.err﹕ at com.quickblox.TestingApp.ui.authorization.base.BaseAuthActivity.startMainActivity(BaseAuthActivity.java:136)
02-12 16:06:25.179  20226-20226/? W/System.err﹕ at com.quickblox.TestingApp.ui.authorization.login.LoginActivity.access$400(LoginActivity.java:24)
02-12 16:06:25.179  20226-20226/? W/System.err﹕ at com.quickblox.TestingApp.ui.authorization.login.LoginActivity$LoginSuccessAction.execute(LoginActivity.java:135)
02-12 16:06:25.179  20226-20226/? W/System.err﹕ at com.quickblox.TestingApp.ui.base.ActivityHelper$BaseBroadcastReceiver$1.run(ActivityHelper.java:247)
02-12 16:06:25.179  20226-20226/? W/System.err﹕ at android.os.Handler.handleCallback(Handler.java:733)
02-12 16:06:25.179  20226-20226/? W/System.err﹕ at android.os.Handler.dispatchMessage(Handler.java:95)
02-12 16:06:25.179  20226-20226/? W/System.err﹕ at android.os.Looper.loop(Looper.java:136)
02-12 16:06:25.179  20226-20226/? W/System.err﹕ at android.app.ActivityThread.main(ActivityThread.java:5052)
02-12 16:06:25.179  20226-20226/? W/System.err﹕ at java.lang.reflect.Method.invokeNative(Native Method)
02-12 16:06:25.179  20226-20226/? W/System.err﹕ at java.lang.reflect.Method.invoke(Method.java:515)
02-12 16:06:25.179  20226-20226/? W/System.err﹕ at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
02-12 16:06:25.179  20226-20226/? W/System.err﹕ at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:609)
02-12 16:06:25.179  20226-20226/? W/System.err﹕ at dalvik.system.NativeStart.main(Native Method)

关于最小化应用

02-12 15:36:05.649  14889-14889/? E/BaseActivity﹕ onPause()
02-12 15:36:05.649  14889-14889/? E/ActivityHelper﹕ onPause()
02-12 15:36:05.659  14889-14889/? E/ActivityHelper﹕ unregisterBroadcastReceiver()
02-12 15:36:05.889      378-378/? E/QCALOG﹕ [MessageQ] ProcessNewMessage: [XT-CS] unknown deliver target [OS-Agent]
02-12 15:36:05.979  14889-14889/? E/BaseAuthActivity﹕ onSaveInstanceState(Bundle outState)
02-12 15:36:05.989  14889-14889/? E/BaseActivity﹕ onStop()
02-12 15:36:05.989  14889-14889/? E/ActivityHelper﹕ onStop()
02-12 15:36:05.989  14889-14889/? E/ActivityHelper﹕ unbindService()
02-12 15:36:05.989  14889-14889/? E/ActivityHelper﹕ (bounded)
02-12 15:36:05.989  14889-14889/? E/BaseAuthActivity﹕ onStop()

再次开启

02-12 15:34:09.749  14889-14889/? E/BaseActivity﹕ onStart()
02-12 15:34:09.749  14889-14889/? E/ActivityHelper﹕ onStart()
02-12 15:34:09.749  14889-14889/? E/ActivityHelper﹕ connectToService()
02-12 15:34:09.749  14889-14889/? E/BaseActivity﹕ start
02-12 15:34:09.749  14889-14889/? E/BaseAuthActivity﹕ onStart()
02-12 15:34:09.749  14889-14889/? E/BaseActivity﹕ onResume()
02-12 15:34:09.759  14889-14889/? E/ActivityHelper﹕ onResume()
02-12 15:34:09.759  14889-14889/? E/ActivityHelper﹕ registerGlobalReceiver()
02-12 15:34:09.759  14889-14889/? E/ActivityHelper﹕ updateBroadcastActionList()
02-12 15:34:09.759  14889-14889/? E/ActivityHelper﹕ for (String commandName : broadcastCommandMap.keySet())
02-12 15:34:09.759  14889-14889/? E/ActivityHelper﹕ for (String commandName : broadcastCommandMap.keySet())
02-12 15:34:09.759  14889-14889/? E/ActivityHelper﹕ for (String commandName : broadcastCommandMap.keySet())
02-12 15:34:09.759  14889-14889/? E/BaseActivity﹕ addAction(String action, Command command)
02-12 15:34:09.759  14889-14889/? E/ActivityHelper﹕ addAction(String action, Command command)
02-12 15:34:09.759  14889-14889/? E/ActivityHelper﹕ onServiceConnected(ComponentName name, IBinder binder)
02-12 15:34:09.759  14889-14889/? E/BaseActivity﹕ onConnectedToService(QBService service)

此屏幕截图 enter image description here

我必须关闭应用程序并重新打开才能进入“登录”页面。问题还在继续。

出了什么问题? 任何使用qmunicate开发应用程序并在Google Play商店发布的应该告诉我们有什么问题,还有什么需要改变。

在开始修改qmunicate app之前,除了App ID,授权密钥,授权秘密还有什么需要更改之外,能否告诉任何人?

1 个答案:

答案 0 :(得分:0)

您应该更改修改版本的包名称,因为包名称应该是唯一的。