Tuesday, November 5, 2019

Unknown failure (at android.os.Binder.execTransact(Binder.java:674)) Error while Installing APKs



I had this issue when I was trying to run the android application from android studio.

Unknown failure (at android.os.Binder.execTransact(Binder.java:674))
Error while Installing APKs


This issue occurs because of android's Instant run feature. You need to disable this feature to overcome this issue.

To disable Instant Run:


  1. Open the Settings or Preferences dialog. (For Mac, Android Studio -> Preferences)
  2. Navigate to Build, Execution, Deployment > Instant Run.
  3. Uncheck the box next to Enable Instant Run.


Saturday, November 2, 2019

Python AttributeError: 'module' object has no attribute 'strptime'

This type of error occurs when the strptime method called on module instead of class:

If your import statement is like below :

import datetime
Then you need to access strptime method like below:
datetime.datetime.strptime(date, "%Y-%m-%d")
to access the strptime method. Or, you could change the import statement to this:
from datetime import datetime
and access it as you are.
The people who made the datetime module also named their class datetime:
#module  class    method
datetime.datetime.strptime(date, "%Y-%m-%d")
Ref: https://stackoverflow.com/questions/19480028/attributeerror-datetime-module-has-no-attribute-strptime