错误解决: java.lang.SecurityException: Permission Denial

场景:

当我们在别的应用内调用你某个程序的Activity有时候会发生这个错误:

 java.lang.SecurityException: Permission Denial: starting Intent { cmp=com.siveco.bluebee.phone.supervisor/com.siveco.bluebee.core.activity.GetServerAddressActivity } from ProcessRecord{412d7170 1644:com.siveco.bluebee.project.productionfeedback/10056} (pid=1644, uid=10056) not exported from uid 10047

此错误源自于以下代码。

 

  if (APPTools.checkAPP(this.getApplicationContext(), BBA_PACKAGENAME)) {
            Intent intent = new Intent();
            intent.setClassName(BBA_PACKAGENAME, "com.siveco.bluebee.core.activity.GetServerAddressActivity");
            startActivityForResult(intent, REQUEST_CODE);

      }



解决方案:

在Activity中配置属性exported="true"

       

        
        


你可能感兴趣的:(Android)