Reputation: 9
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
Upvotes: 0
Views: 11584
Reputation: 360
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");
Upvotes: 1