RSS

Tag Archives: how to

‘com.github.dcendents.android-maven’ not found, the solution


Recently, I build some open source Android libraries, and when building the project, below error occurred:

Error:(2, 0) Plugin with id ‘com.github.dcendents.android-maven’ not found.

Quick Solution:

install Yarn, everything works!

Mac: brew install yarn
Windows: refer to this link.

 

A less elegant solution is to manually change the top level build.gradle:

From

dependencies {
classpath ‘com.android.tools.build:gradle:2.2.2’
}

To –>

dependencies {
classpath ‘com.android.tools.build:gradle:2.2.2’
classpath com.github.dcendents:android-maven-gradle-plugin:1.5  //Add this
classpath com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3      //Add this

}

Rebuild. It should work. But this is tedious, for every project (e.g. react-native), you repeat doing so?  Emmmmmm!

Now try to create a new react-native project using:

react-native init ProjectName

Run the project:

react-native run-android  // or
react-native run-ios

It compiles and works! Happy coding.

 
Leave a comment

Posted by on April 18, 2017 in Android

 

Tags: , , , , , , , , , , , ,

Using Firebase in Unity3D Tutorial 1: Basics and setup


Firebase is a platform that helps you quickly develop high-quality apps,  It is made up of a collection of features that is very handy for Unity3D, Android, iOS app developers.

In this series of tutorials, I am going to cover how to harness Firebase features to streamline your app development process. Each tutorial is designed to be compact, and follows the SRP (Single Responsibility Principle), so that you can use these take-aways quickly in your own development.

Read the rest of this entry »

 
1 Comment

Posted by on January 21, 2017 in Programming, Unity 3d

 

Tags: , , , , , , , ,

Firebase Unity3D example: a walk through tutorial


image

Read the rest of this entry »

 
1 Comment

Posted by on January 16, 2017 in Programming, Unity 3d

 

Tags: , , , , , , , ,

Bing Search in C#: A step by step walk-through tutorial


This blog is the 3rd article of the series Search in C# example demonstration. If you are interested in my earlier blogs in this series, please refer to below blogs:

In this blog, I am going to walk through how to do Bing Web Search using the latest v5 API.

BingSearch

Read the rest of this entry »

 
1 Comment

Posted by on December 15, 2016 in Dotnet/C#, Programming

 

Tags: , , , , , , , , , ,

vmware workstation unrecoverable error (vcpu-0)


When you install some virtual OS using vmware workstation or vmware player, if you encounter below error:

unrecoverable error (vcpu-0)

Try below actions:

  • open *.vmx file in the folder where your OS is located
  • append below line to the tail of the vmx file (you can put this line anywhere in the vmx file, and vmx file will be auto-sorted for you)

smc.version = 0

image

That is it! Happy working!

 
Leave a comment

Posted by on December 12, 2016 in General, Linux, Mac, Windows

 

Tags: , , , , , , , , ,

A good tutorial on Builder design pattern


Original article: https://jlordiales.me/2012/12/13/the-builder-pattern-in-practice/

public class User {
  private final String firstName; // required
  private final String lastName; // required
  private final int age; // optional
  private final String phone; // optional
  private final String address; // optional

  private User(UserBuilder builder) {
    this.firstName = builder.firstName;
    this.lastName = builder.lastName;
    this.age = builder.age;
    this.phone = builder.phone;
    this.address = builder.address;
  }

  public String getFirstName() {
    return firstName;
  }

  public String getLastName() {
    return lastName;
  }

  public int getAge() {
    return age;
  }

  public String getPhone() {
    return phone;
  }

  public String getAddress() {
    return address;
  }

  public static class UserBuilder {
    private final String firstName;
    private final String lastName;
    private int age;
    private String phone;
    private String address;

    public UserBuilder(String firstName, String lastName) {
      this.firstName = firstName;
      this.lastName = lastName;
    }

    public UserBuilder age(int age) {
      this.age = age;
      return this;
    }

    public UserBuilder phone(String phone) {
      this.phone = phone;
      return this;
    }

    public UserBuilder address(String address) {
      this.address = address;
      return this;
    }

    public User build() {
      return new User(this);
    }
  }
}
 
Leave a comment

Posted by on November 11, 2016 in General

 

Tags: , , ,