How to fix "Plugin with id 'com.android.library' not found." issue with Android Libraries

Normal structure of build.gradle for an Android library looks like this:
apply plugin: 'com.android.library'
android {
    compileSdkVersion 23 
    buildToolsVersion '23.0.0'
    defaultConfig {
        minSdkVersion 11 
       targetSdkVersion 23 
       versionCode 1 
       versionName "1.0" 
    }
    buildTypes {
        release {
            /runProguard false 
           proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'        }
    }
}

You might encounter dreaded "Plugin with id 'com.android.library' not found." error while importing this library project as an independent project in Android Studio.

After researching for a while around the web, I figured out what was missing. Actually, a way to tell your library project's gradle file to source to get the plug-in. Pretty straight forward, but may not occur when needed.

So, don't forget to add these lines at the beginning of the build.gradle for your Android library:

buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:1.3.0'    }
}

apply plugin: 'com.android.library'
....

 

Finding tech work online ?

Are you interested in taking up projects online and work from wherever you like to ?  Your home...Your favorite coffee shop or may be your beautiful patio ! Yes ??? Read on ...


I've compiled few websites that you may want to look at:

  • Topcoder : You can take up a challenge and work thru it in order to get paid ! Perfect for hobbyists !
  • Upwork : An upcoming company coming up to connect talent with companies. Its a freelancers paradise.
  • ....More are coming up!




Developing Hybrid mobile applications for iOS and Android

Today I found out a promising open source project or better say a SDK to build hybrid apps for iOS and Android. Its called Ionic.

I'm looking forward to play around with it a little bit and will be posting my findings on this very blog. Stay Tuned !

Scheduling Repeating Local Notifications using Alarm Manager

Learn about Scheduling Repeating Local Notifications using Alarm Manager in this post .