Profile

Cover photo
Hean Hong Leong
Works at Hongineer
Attended Nanyang Technological University
Lives in Johor Bahru, Malaysia
456 followers|79,954 views
AboutPostsPhotosYouTubeReviews

Stream

Hean Hong Leong

Shared publicly  - 
1
Add a comment...
 
4th HackerSpaceJB Meetup #arduino   #JBTrafficCam
1
Add a comment...

Hean Hong Leong

Shared publicly  - 
1
Add a comment...

Hean Hong Leong

Shared publicly  - 
1
Add a comment...
In his circles
227 people
Have him in circles
456 people
KahWee Teng's profile photo
mahsa movahedi's profile photo

Hean Hong Leong

Shared publicly  - 
 
Group photo @ HackerSpaceJB #hsjb
1
Add a comment...
 
 
How to include android library projects (e.g. Google Play Services lib) in Android Studio

1. Copy the lib project from <android_sdk>/extras/google/google_play_services/libproject/google-play-services_lib/ into <myproject>/subprojects/. The goal is to have a dir structure as follows:

<project root>
    <myproject>
        src/main/java/...
        …
    <subprojects>
       google-play-services-lib

2. Add the following entry to <myproject>/settings.gradle: include ':subprojects:google-play-services_lib'

3. Create a new build.gradle file in <myproject>/subprojects/google-play-services-lib/ (alternatively, you could just copy from <myproject>/build.gradle)

4. Modify <myproject>/subprojects/google-play-services-lib/build.gradle so that it is apply plugin: 'android-library' (instead of plugin: ’android’)

5. Add the following ‘sourceSets’ to the ‘android’ section for google-play-services-lib/build.gradle. It should look like this:

android {
    compileSdkVersion 17
    buildToolsVersion "17.0.0"

    defaultConfig {
           minSdkVersion 11
       targetSdkVersion 17
    }

    sourceSets {
       main {
           manifest.srcFile 'AndroidManifest.xml'
           java.srcDirs = ['src']
           resources.srcDirs = ['src']
           aidl.srcDirs = ['src']
           renderscript.srcDirs = ['src']
           res.srcDirs = ['res']
           assets.srcDirs = ['assets']
       }
    }
}

6. Make sure the following dependencies are in <myproject>/google-play-services_lib/build.gradle:

dependencies {
    compile files('libs/android-support-v4.jar')
    compile files('libs/google-play-services.jar')
}

7. Add the following the emphasized entries into the ‘dependencies’ section of <myproject>/build.gradle:

dependencies {
    compile files('libs/android-support-v4.jar')
    compile project(":subprojects:google-play-services_lib")
    compile files('../subprojects/google-play-services_lib/libs/google-play-services.jar')

}

8. Restart Android Studio (editing gradle files doesn't always reflect in a clean build).

9. Hit ctrl+r to run your android app.

Remarks:
- the location/name of google-play-services_lib project is not important, so long as you're specifying the correct location/name in the Gradle files
- for Google Play Services, it is NOT enough to include just the jar file in your project (by adding a jar file into your project and specifying a file dependency in Gradle), you must include the entire library project. Otherwise, nasty runtime exceptions awaits.

#androiddev #androidstudio  
1
Add a comment...
 
 
We've just released Android Studio 0.1.2. This releases fixes a couple of critical issues in 0.1.1 along with more fixes to the Gradle integration.

Edit: To install, invoke Help > Check for Update from within Studio.
1
Add a comment...

Hean Hong Leong

Shared publicly  - 
 
Avoid using raw.github.com as CDN to serve javascripts. Chrome browser will throw "...MIME type ('text/plain') is not executable, and strict MIME type checking is enabled." error message.
1
Hean Hong Leong's profile photo
 
Use http://cdnjs.com/ instead.
Add a comment...
People
In his circles
227 people
Have him in circles
456 people
KahWee Teng's profile photo
mahsa movahedi's profile photo
Work
Occupation
Software Engineer
Skills
Software Development, Web Service, Software Design, Android, PHP, MySQL, Python, HTML5, CSS3, JavaScript
Employment
  • Hongineer
    Mobile Web/App Developer, 2012 - present
    Provide development service: * Websites * Android apps
  • Stream Media Pte. Ltd.
    Project Manager, 2010 - 2012
  • Cisco Systems
    Intern, 2005 - 2005
  • Gemalto
    Intern, 2007 - 2007
  • CBS Interactive
    Software Engineer, 2009 - 2009
Places
Map of the places this user has livedMap of the places this user has livedMap of the places this user has lived
Currently
Johor Bahru, Malaysia
Previously
Singapore - North Carolina, United States - Beijing, China
Links
Story
Tagline
I love to work with web and mobile software technologies.
Introduction
I am a geek. I find beauty in code.
Bragging rights
Tolerated Windows and BSOD for 12 years.
Education
  • Nanyang Technological University
    Computer Science, 2005 - 2008
  • Beijing University
    Cultural Study, 2007 - 2007
  • Singapore Polytechnic
    Computer & Network Technology, 2002 - 2005
  • Fuchun Secondary School
    1998 - 2001
  • Qihua Primary School
    1992 - 1997
Basic Information
Gender
Male
Birthday
July 15
Relationship
Single
Other names
梁贤鸿
Sent my car for repair due to accident. The staffs are friendly, but repair service need to be improved. The car was fixed but the check was not thorough. Upon completion of repair, I drove the car back. I then realized I can't lock the car using my remote. It was because a button under the car hood was not in place. Now the car is shaking whenever the car stops on the road. I am going to send it back to the workshop again for inspection. All these problems could have been avoided if they have a thorough check.
• • •
Public - a year ago
reviewed a year ago
11 reviews
Map
Map
Map
Public - 2 years ago
reviewed 2 years ago