Not Yet Done...How to Fix it


#4Articles4Weeks
#Weeek 4

Not Yet Done...How to Fix it #4Articles4Weeks #Weeek 4

Like every successful programmer, the journey to being one starts with little steps. More often than not these steps tend to be full of challenges and disappointments. Hence, one may opt to give in to the problems he/she encounters. The article, therefore, seeks to address the common challenges most newbies face in programming, especially while coding with android studio.

mad-programmer-4704335.jpg

Gradle Problems

Gradle problems happen mostly when a programmer starts to execute the code written.

Error running android: Gradle project sync failed. Please fix your project and try again.
android studio 0.4.2: Gradle project sync failed error

To fix these problems, simply follow the following steps.

  1. Goto File -> Invalidate caches / Restart
  2. Shutdown Android Studio
  3. Rename/remove the .gradle folder in the user home directory For example in my case, my user home directory is --> C:\Users\Ronnie

Screenshot (37).png

  1. Restart Android Studio (It will download gradle metadata and data)
  2. Gradle build succeed
  3. Rebuild project. Done.

If that is a success then, congrats !! else, please follow the following steps:

  1. Download the latest gradle package from this directory --> services.gradle.org/distributions
  2. Extract it and put it in a PC location of your desire (for example f:\gradle-1.10)
  3. Go to your Android Studio and load your project then open File->Settings->gradle, in this page click on Use local gradle distribution
  4. Type your gradle folder address there

Bs76e.png

Congratulation you are done!

Android Emulator Crash

As a beginner in programming, you will likely wonder why IDE for instance; IntelliJ or Android Studio doesn't work. Here is how to solve the problems.

1. HAXM issues

For speeding up the performance of the Android emulator, the following virtualization technologies can be used:

  • Hyper-V and the Windows Hypervisor Platform are both made by Microsoft (WHPX). Hyper-V is a virtualization feature of Windows that makes it possible to run virtual computer systems on a physical host computer.

  • Hardware Accelerated Execution Manager from Intel (HAXM). HAXM is an engine for virtualization on computers with Intel CPUs.

If your android emulator isn't working, the problem could be because the HAXM isn't enabled on your PC.

To verify that your computer hardware and software is compatible with Hyper-V, open a command prompt and type the following command:

systeminfo

If your PC is HyperV enabled , then it will read the following:

02-systeminfo-w158-sml.png

If this is not the case then you can follow the following steps in order to enable it on your PC:

  • Start your computer over.
  • Press Delete, Esc, F1, F2, or F4 as soon as the computer comes up from the black screen. Each computer maker uses a different key, but when the computer starts up, it may show a short message telling you which key to press. If you don't get it the first time, try again after a reboot. When the computer is starting up, tapping the key about twice a second helps. If you can't get into the BIOS with this method, look in the manual for your computer.
  • Find the configuration settings for the CPU in the BIOS settings. You can put these under Processor, Chipset, or Northbridge.

  • Turn on virtualization. The setting may be called VT-x, AMD-V, SVM, or Vanderpool. If Intel VT-d or AMD IOMMU are available, turn them on.

disable-Hardware-Virtualization.png

  • Save your changes and restart your computer.

2. Installing HAXM

If you have problems installing Haxm in your ide , then you can install it manually in your PC using the following link--> Intel Hardware Accelerated Execution Manager

06-haxm-installer.png

The Bold blinking Cursor

Have ever wonder why suddenly you are unable to code in your IDE? Well, that's your problem. To fix it, the block cursor indicates Insert mode. You can toggle it with the Insert key.

maxresdefault.jpg

Recommendation

A good programmer should be interested in everything and want to learn as much as possible. In a field like software development, where things are always changing and getting better, you should learn as much as you can from everywhere. And it's just as important to change with the times. Most programmers like to solve problems and take on challenges that others wouldn't. This is what keeps them up at night trying to figure out what to do. Not every programmer does it for the money. Some do it because they love it.

images.png