简体   繁体   中英

Cant open another app by my app in Android Studio

I have an error when i run my app:

E/Parcel: Reading a NULL string not supported here.
 Reading a NULL string not supported here.
D/gift-manager: getGiftPara pkg(com.example.myhomie,260,), ret=-22
I/libMEOW_gift: ctx:0xb40000786ccfd928, ARC not Enabled.
E/libEGL: Invalid file path for libcolorx-loader.so
I/chatty: uid=10300(com.example.myhomie) RenderThread identical 62 lines
E/libEGL: Invalid file path for libcolorx-loader.so
E/ion: ioctl c0044901 failed with code -1: Invalid argument
E/Parcel: Reading a NULL string not supported here.

Mycode:

  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_cctv);
    start = findViewById(R.id.button2);
    start.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            Intent intent = 
            getPackageManager().getLaunchIntentForPackage("com.android.chrome");
            startActivity(intent);
         }
        });
       }

Can anyone help me where is the error? Thanks you so much

The error is: E/Parcel: Reading a NULL string not supported here. Put your intent code into try-catch. Also check the intent returned by getPackageManager().getLaunchIntentForPackage("com.android.chrome");

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM