Showing posts with label error. Show all posts
Showing posts with label error. Show all posts

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

Friday, October 13, 2017

'gradle' is not recognized as an internal or external command

Following steps need to be followed for fixing: "'gradle' is not recognized as an internal or external command" error.

  1.  Download the zipped file of Gradle from https://services.gradle.org/distributions/gradle-2.8-all.zip
  2. Unzip them and place them in your Windows machine at any specific location. For e.g. “C:\Program Files\”. 
  3. Click on the Windows button at the left bottom of the desktop. 
  4. Right-click on “Computer” and click on “Properties”. This will open the Control Panel. 
  5. Click on “Advanced System settings” and then click on “Environment Variables” button. 
  6. Click on “New…” button under the “System Variables” section and enter Variable name as ‘GRADLE_HOME’. 
  7. Provide the path of the Gradle file as Variable value, i.e. C:\Program Files\gradle-2.8 
  8. Click OK. 
  9. Select “path” variable under the “System Variables” section and click on “Edit” button. 
  10. Go to the end of variable value and add “;%GRADLE_HOME%\bin” and click on “OK” button. 
  11. Press “Windows + R” and type ‘cmd’. Click OK. 
  12. Type the command “gradle –v” on the command prompt. 
  13. Now the screen displays the version of the Gradle. This means that the Gradle is successfully configured on the given Windows machine.