How can I import widgets library in this github link to my project??? https://github.com/tobykurien/BatteryFu
I tried a way but faced with this error while run :
Error:Execution failed for task ':app:dexDebug'.
com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\\Program Files\\Java\\jdk1.8.0_51\\bin\\java.exe'' finished with non-zero exit value 2
Please follow below steps :
Now build your project and run.And if you found any error let me know.
Your Widget gradle file should look like :
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.0.0'
}
}
apply plugin: 'android-library'
android {
compileSdkVersion 18
buildToolsVersion "19.1"
dependencies {
}
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
aidl.srcDirs = ['src']
java.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
}
}
}
dependencies {
compile 'com.android.support:support-v4:22.2.1'
}
Manifest.xml of Widget should look like :
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.koushikdutta.widgets"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="4"
android:targetSdkVersion="10" />
<application
android:allowBackup="true">
</application>
</manifest>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.