build.gradle

Gradle Build Android Project “Could not resolve all dependencies” error

半世苍凉 提交于 2019-11-28 03:53:09
I'm trying to build my first project with Gradle and I think my gradle files and settings are correct. I'm using only one module and Support V4 + AppCompatBar libraries. Project - build.gradle allprojects { repositories { mavenCentral() } } Project - settings.gradle include ':AssignmentTempos21' Main module - 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 8 targetSdkVersion

NoClassDefFoundError using Jackson 2.2.x on Android with Gradle

橙三吉。 提交于 2019-11-28 03:28:51
问题 For my Android project I set up Gradle with Jackson 2.2.x as follows: // build.gradle buildscript { repositories { mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:0.6.+' } } apply plugin: 'android' repositories { mavenCentral() } android { compileSdkVersion 18 buildToolsVersion "18.1.0" defaultConfig { minSdkVersion 8 targetSdkVersion 18 } } dependencies { compile 'com.android.support:appcompat-v7:18.0.0' compile 'com.android.support:support-v4:18.0.0' compile 'com

How to fix this gradle app:dexDebug error?

岁酱吖の 提交于 2019-11-28 02:23:41
im using android studio,now in my app i have this error when i run my app Error:Execution failed for task ':app:dexDebug'. > com.android.ide.common.internal.LoggedErrorException: Failed to run command: /home/noob/android-sdk-linux/build-tools/21.1.2/dx --dex --no-optimize --output /home/noob/Desktop/NavigationDrawer/app/build/intermediates/dex/debug --input- list=/home/noob/Desktop/NavigationDrawer/app/build/intermediates/tmp/dex/debu g/inputList.txt Error Code: 2 Output: UNEXPECTED TOP-LEVEL EXCEPTION: com.android.dex.DexException: Multiple dex files define Landroid/support/v4

Execution failed for task 'app:prepareDebugAndroidTestDependencies'

最后都变了- 提交于 2019-11-28 01:33:43
问题 I'm trying to build UI tests for my Android application in Android Studio. The problem is that I can't run them. I get the message: Execution failed for task 'app:prepareDebugAndroidTestDependencies' which I couldn't find what it's about. When I run my application, it starts perfectly, but when i try to run tests it shows the mentioned message. My build.gradle is lsited below: apply plugin: 'com.android.application' android { compileSdkVersion 22 buildToolsVersion "22.0.0" defaultConfig {

Error:Unknown host services.gradle.org. You may need to adjust the proxy settings in Gradle

ぃ、小莉子 提交于 2019-11-28 00:30:21
问题 i have tried it many times but its giving me same error.how to set the proxy so that this error is solved 回答1: Update your project level build.gradle to latest version - it works for me classpath 'com.android.tools.build:gradle:3.2.1' classpath 'com.google.gms:google-services:4.2.0' 回答2: Go to.. File > Settings > Appearance & Behavior > System Settings > HTTP Proxy Enable following option Auto-detect proxy settings and press checkConnection button for test 回答3: In my case issue occurred after

Configuring res srcDirs for androidTest sourceSet

徘徊边缘 提交于 2019-11-27 23:42:00
问题 I'd like to include resources to be compiled only for testing. I have the following in my app module build.gradle file: android { ... sourceSets { androidTest { java.srcDirs = ['src/androidTest/java'] res.srcDirs = ['src/androidTest/res'] } } } The java srcDirs path is correct, yet if I try to get a resource from the res directory in androidTest, the resource can't be found. How can I have resources in the androidTest directory that are only included for tests? 回答1: Turns out you don't need

Android-Studio refresh project with build.gradle changes

无人久伴 提交于 2019-11-27 23:13:05
问题 how can I sync changes I made in the build.gradle into the project structure ( e.g. that AndroidStudio is recognizing the lib I added? Kind of like the "reimport all maven projects" for maven projects - just for a pure gradle project. 回答1: I read somewhere that the "Synchronize" item on the module's context menu should update the IDE's settings based on the build.gradle file. Ok, so in the latest version of Android Studio 0.1.3, they've added a Gradle project refresh button next to the other

Multiple dex files define Landroid/support/v4/ in android studio

一世执手 提交于 2019-11-27 22:27:48
I can integrate (add & work) with many libraries . But as for ActionBarSherlock library, I have so many problems with it. First Issue is the popular issue Multiple dex files define , I know The duplicated android-support-v4.jar causes it, but I can not solve this issue now : Error:Execution failed for task ':fitness:dexDebug'. Error Code: 2 Output: UNEXPECTED TOP-LEVEL EXCEPTION: com.android.dex.DexException: Multiple dex files define Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat$AccessibilityServiceInfoVersionImpl; at com.android.dx.merge.DexMerger.readSortableTypes

Execution failed for task ':app:processDebugResources' even with latest build tools

£可爱£侵袭症+ 提交于 2019-11-27 22:10:12
I am getting this error when I try to run my project. I have installed the latest build tools- 23.0.3 but still the error persists. How do I fix this? Executing tasks: [:app:generateDebugSources, :app:generateDebugAndroidTestSources] Configuration on demand is an incubating feature. :app:preBuild UP-TO-DATE :app:preDebugBuild UP-TO-DATE :app:checkDebugManifest :app:preReleaseBuild UP-TO-DATE :app:prepareComAndroidSupportAnimatedVectorDrawable2321Library UP-TO-DATE :app:prepareComAndroidSupportAppcompatV72321Library UP-TO-DATE :app:prepareComAndroidSupportDesign2321Library UP-TO-DATE :app

org.gradle.api.UncheckedIOException: Failed to capture snapshot of input

岁酱吖の 提交于 2019-11-27 21:17:36
I was trying to build my project again after installing the latest preview version of android studio, but follow exception is showing on updating the gradle version: org.gradle.api.UncheckedIOException: Failed to capture snapshot of input files for task ':app:mergeDebugResources' property 'aapt2FromMaven' during up-to-date check. at org.gradle.api.internal.changedetection.state.CacheBackedTaskHistoryRepository.snapshotTaskFiles(CacheBackedTaskHistoryRepository.java:331) at org.gradle.api.internal.changedetection.state.CacheBackedTaskHistoryRepository.createExecution