I am going to migrate to android studio.
I would like to use this lib :
https://codeload.github.com/flavienlaurent/datetimepicker/zip/master
after this tutorial :
https://www.youtube.com/watch?v=1MyBO9z7ojk
now I get this error :
Error:Failed to find: com.nineoldandroids:library:2.4.0
build.gradle in datetimepicker-library :
apply plugin: 'com.android.library'
repositories {
mavenCentral()
}
dependencies {
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.android.support:support-v4:20.0.0'
}
android {
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
defaultConfig {
minSdkVersion 11
targetSdkVersion 19
versionName rootProject.versionName
versionCode rootProject.versionCode
}
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
resources.srcDirs = ['src']
aidl.srcDirs = ['src']
renderscript.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
}
}
}
//apply from: 'https://raw.github.com/chrisbanes/gradle-mvn-push/master/gradle-mvn-push.gradle'
updated
all my error :
Update this
dependencies {
compile 'com.nineoldandroids:library:2.4.0+'
}
Then Gradle your project
it's simple actually, just past
repositories {
mavenCentral()
}
to your build.gradle of the project (not the build.gradle of the module)
Related
I have been using Android Studios from eclipe becuse Multidex 65000 compile Error!!!!
i did sync project gradle in android studio from eclipse project
i have problem compile Error in android studio
Error:Execution failed for task
':packageAllDevDebugClassesForMultiDex'.
java.util.zip.ZipException: duplicate entry: android/support/multidex/MultiDex$V14.class
--build.gradle--
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.1.0'
}
}
apply plugin: 'android'
dependencies {
compile fileTree(dir: 'libs', include: '*.jar')
}
android
{
compileSdkVersion 18
buildToolsVersion "20.0.0"
defaultConfig{
multiDexEnabled true
}
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
resources.srcDirs = ['src']
aidl.srcDirs = ['src']
renderscript.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
}
instrumentTest.setRoot('tests')
debug.setRoot('build-types/debug')
release.setRoot('build-types/release')
}
productFlavors {
dev {
minSdkVersion 18
}
prod {
minSdkVersion 18
}
}
}
why problem occurring
i want this problem solve
help me error sovle please
i added facebook sdk and AndroidMidi and i think i did it ok including dependencies and add model dependency on project structure
that is my build file:
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.0.1'
}
}
apply plugin: 'android'
dependencies {
compile project(':facebook')
compile project(':AndroidMidi')
}
repositories {
jcenter()
}
android {
compileSdkVersion 21
buildToolsVersion "21.1.2"
defaultConfig {
minSdkVersion 21
targetSdkVersion 21
}
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
resources.srcDirs = ['src']
aidl.srcDirs = ['src']
renderscript.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
}
instrumentTest.setRoot('tests')
}
}
i can't get it running,
i get this error:
Error:Execution failed for task ':packageDebug'.
Failed to seal APK,
help?
EDIT
thats settings.gradle
include ':facebook', ':AndroidMidi'
stacktrace log returns:
:packageDebug Failed and same error
not enough rep to upload picture
Removing the file MidiPlayer/src/META-INF/MANIFEST.MF fixed it for me.
See: https://github.com/tkirshboim/btmidi/commit/7486ccbf17a6c2c36ef642bfb03fb9e13352c369
I have read through a bunch of different Stack Overflow posts and various blogs all offering different ways to get these libraries working with android studio but I have yet to be successful with any of them.
I am currently using android studio 0.2.5.
The current error I am getting when trying to run gradlew assemble:
What went wrong:
Execution failed for task ':libraries:ActionBarSherlock:actionbarsherlock:compileReleaseAidl'.
tried to access class com.android.build.gradle.internal.tasks.DependencyBasedCompileTask$DepFileProcessor from class com.android.build.gradle.i
nternal.tasks.DependencyBasedCompileTask
My project structure is as follows:
|MyProject
----|MyProject
----|libraries
--------|ActionBarSherlock
------------|actionbarsherlock
----------------build.gradle
------------|actionbarsherlock-fest
------------|actionbarsherlock-i18n
------------|actionbarsherlock-samples
------------build.gradle
------------settings.gradle
--------|SlidingMenu
------------|library
----------------build.gradle
----|MyProject
----build.gradle
settings.gradle
All the build.gradle files are below:
MyProject - > MyProject -> build.gradle
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.5.+'
}
}
apply plugin: 'android'
repositories {
mavenCentral()
}
android {
compileSdkVersion 17
buildToolsVersion "17.0.0"
defaultConfig {
minSdkVersion 16
targetSdkVersion 16
}
}
dependencies {
compile 'com.android.support:support-v4:13.0.0'
compile files('libs/Parse-1.3.3/Parse-1.3.3.jar')
compile project(':libraries:ActionBarSherlock:actionbarsherlock')
compile project(':libraries:SlidingMenu:library')
}
MyProject - > libraries -> ActionBarSherlock -> build.gradle
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.5.+'
}
}
allprojects {
group = 'com.actionbarsherlock'
version = '4.4.0'
repositories {
mavenCentral()
}
tasks.withType(Compile) {
options.encoding = "UTF-8"
}
}
MyProject - > libraries -> ActionBarSherlock -> actionbarsherlock -> build.gradle
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.5.+'
}
}
apply plugin: 'android-library'
dependencies {
compile 'com.android.support:support-v4:13.0.0'
}
android {
compileSdkVersion 17
buildToolsVersion "17.0.0"
defaultConfig {
minSdkVersion 16
targetSdkVersion 16
}
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
resources.srcDirs = ['src']
aidl.srcDirs = ['src']
renderscript.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
}
instrumentTest.setRoot('tests')
}
}
MyProject - > libraries -> ActionBarSherlock -> settings.gradle
include 'actionbarsherlock'
include 'actionbarsherlock-fest'
include 'actionbarsherlock-i18n'
MyProject - > libraries -> SlidingMenu -> library -> build.gradle
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.5.+'
}
}
apply plugin: 'android-library'
repositories {
mavenCentral()
}
dependencies {
compile 'com.android.support:support-v4:13.0.0'
compile project(':libraries:ActionBarSherlock:actionbarsherlock')
}
android {
compileSdkVersion 17
buildToolsVersion "17.0.0"
defaultConfig {
minSdkVersion 16
targetSdkVersion 16
}
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
resources.srcDirs = ['src']
aidl.srcDirs = ['src']
renderscript.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
}
instrumentTest.setRoot('tests')
}
}
MyProject - > settings.gradle
include ':MyProject', ':libraries:SlidingMenu:library', ':libraries:ActionBarSherlock:actionbarsherlock'
I think that's all the important files but please let me know if I missed one.
Thanks for any advice you can give!
Edit 1:
Made sure all the build.gradle files had:
compileSdkVersion 16
buildToolsVersion "18.0.1"
as some were different.
Made sure all manifests had:
<uses-sdk
android:minSdkVersion="16"
android:targetSdkVersion="16"/>
I also updated everything the sdk updater tool had to update but still no luck.
Did you add Dependency to your project in Project Structure
I am developing a demo app using ActionBar Sherlock and Android Studio.
Android Studio Version is 0.2.2, gradle version is 1.6 and plugin version is 0.5.1 and i am following these tutorials :-
www.grokkingandroid.com
showlabor.blogspot.ca
i am getting following error :-
Gradle: Execution failed for task ':libraries:ActionBarSherlock:actionbarsherlock:compileReleaseAidl'.tried to access class com.android.build.gradle.internal.tasks.DependencyBasedCompileTask$DepFileProcessor from class com.android.build.gradle.internal.tasks.DependencyBasedCompileTask
actionbarsherlock build.gradle file goes like this :-
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.5.+'
}
}
apply plugin: 'android-library'
dependencies {
compile 'com.android.support:support-v4:18.0.+'
}
android {
compileSdkVersion 17
buildToolsVersion '17.0.0'
defaultConfig {
minSdkVersion 7
targetSdkVersion 16
}
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
resources.srcDirs = ['src']
aidl.srcDirs = ['src']
renderscript.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
}
instrumentTest.setRoot('tests')
}
}
and my project build file goes like this :-
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.5.+'
}
}
apply plugin: 'android'
repositories {
mavenCentral()
}
dependencies {
compile 'com.android.support:support-v4:13.0.+'
}
dependencies {
compile project(':libraries:ActionBarSherlock:actionbarsherlock')
}
android {
compileSdkVersion 17
buildToolsVersion "17.0.0"
defaultConfig {
minSdkVersion 7
targetSdkVersion 16
}
}
any leads on this is highly appreciated
Thanks :)
try
dependencies {
compile 'com.actionbarsherlock:actionbarsherlock:4.4.0#aar'
compile 'com.android.support:support-v4:13.0.+'
}
I had the same error until I used the same gradle file as the one from the sample for ABS and gradle here, that's a working sample project: https://github.com/JakeWharton/ActionBarSherlock-Gradle-Sample
I've been at this for a couple of days trying to get the library structure correct within Android Studio. I would have just continued with Eclipse, but performance wise, it's been really bad for me lately. Please, any guidance would be greatly appreciated as all solutions found have not worked and the documentation has lead me nowhere.
All manifests have an empty application tag except for the main TestProject.
Edit* Prior to including SlidingMenu, I did have ActionBarSherlock working without issues and building, etc.
The Error
Gradle: Execution failed for task ':libraries:SlidingMenu:processReleaseManifest'.
> Manifest merging failed. See console for more info.
Build.Gradle (SlidingMenu)
apply plugin: 'android-library'
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.5.+'
}
}
dependencies {
compile 'com.android.support:support-v4:13.0.+'
compile project(':libraries:actionbarsherlock')
}
android {
compileSdkVersion 17
buildToolsVersion '17.0.0'
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
resources.srcDirs = ['src']
aild.srcDirs = ['src']
renderscript.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
}
}
}
Build.Gradle (ActionBarSherlock)
apply plugin: 'android-library'
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.5.+'
}
}
dependencies {
compile 'com.android.support:support-v4:13.0.+'
}
android {
compileSdkVersion 17
buildToolsVersion '17.0.0'
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
resources.srcDirs = ['src']
aild.srcDirs = ['src']
renderscript.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
}
}
}
Build.Gradle (Test Project)
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.5.+'
}
}
apply plugin: 'android'
repositories {
mavenCentral()
}
dependencies {
compile 'com.android.support:support-v4:13.0.+'
compile project(':libraries:actionbarsherlock')
compile project(':libraries:SlidingMenu')
}
android {
compileSdkVersion 17
buildToolsVersion "17.0.0"
defaultConfig {
minSdkVersion 7
targetSdkVersion 16
}
}
settings.gradle (Test Project)
include ':TestProject',':libraries:actionbarsherlock',':libraries:SlidingMenu'
For me the problem was with 'missing <application/> tag' in slidingmenu library.
After adding empty <application/> tag to manifest errors disappeared.
Maybe this will help somebody.
See thread here: https://groups.google.com/forum/#!topic/adt-dev/PIah7eYXiNs
Unfortunately, this could be happening for a lot of reasons. I'd suggest running gradle build -info from the command line to see if it gives you more information.
A common merge failure I've run into is when the minSdkVersions are conflicting. I see that your test project minSdkVersion is 7, are the minimum levels declared in the ActionBarSherlock and SlidingMenu manifests 7 or less?
I already solve it. I share my configuration. Maybe this can help you.
Project:
+ TestProject
|-- libraries
|-- ActionBarSherlock
|-- actionbarsherlock
|-- actionbarsherlock-fest
|-- actionbarsherlock-i18n
|-- actionbarsherlock-samples
|-- SlidingMenu
|-- art
|-- example
|-- library
|-- library-maps-support
|-- TestProject
setting.gradle
include ':TestProject', ':libraries:SlidingMenu:library', ':libraries:ActionBarSherlock:actionbarsherlock'
build.gradle (Test Project)
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.5.+'
}
}
apply plugin: 'android'
repositories {
mavenCentral()
}
dependencies {
compile project(':libraries:ActionBarSherlock:actionbarsherlock')
compile project(':libraries:SlidingMenu:library')
}
android {
compileSdkVersion 17
buildToolsVersion "17.0.0"
defaultConfig {
minSdkVersion 11
targetSdkVersion 16
}
}
build.gradle (actionbarsherlock lib)
buildscript {
repositories {
maven { url 'http://repo1.maven.org/maven2' }
}
dependencies {
classpath 'com.android.tools.build:gradle:0.5.+'
}
}
apply plugin: 'android-library'
dependencies {
compile 'com.android.support:support-v4:13.0.0'
}
android {
compileSdkVersion 17
buildToolsVersion "17.0.0"
defaultConfig {
minSdkVersion 11
targetSdkVersion 16
}
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
resources.srcDirs = ['src']
aidl.srcDirs = ['src']
renderscript.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
}
instrumentTest.setRoot('tests')
}
}
build.gradle (slidingmenu lib)
buildscript {
repositories {
maven { url 'http://repo1.maven.org/maven2' }
}
dependencies {
classpath 'com.android.tools.build:gradle:0.5.+'
}
}
apply plugin: 'android-library'
dependencies {
compile 'com.android.support:support-v4:13.0.0'
compile project(':libraries:ActionBarSherlock:actionbarsherlock')
}
android {
compileSdkVersion 17
buildToolsVersion "17.0.0"
defaultConfig {
minSdkVersion 11
targetSdkVersion 16
}
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
resources.srcDirs = ['src']
aidl.srcDirs = ['src']
renderscript.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
}
instrumentTest.setRoot('tests')
}
}