android-gradle

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

Android Studio: Unexpected top level exception (finished with non-zero exit value 2..)

独自空忆成欢 提交于 2019-11-27 22:22:49
When i'm trying to debug my android app i'm getting the following error message: Error:Execution failed for task ':app:transformClassesWithDexForDebug'. com.android.build.transform.api.TransformException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0_31.jdk/Contents/Home/bin/java'' finished with non-zero exit value 2 The error first appeared on adding a new dependency. This is my gradle file compile 'com.android.support:appcompat-v7:23.0.1' compile 'com.android.support:design:23.0.1'

commons-logging defines classes that conflict with classes now provided by Android after Android Studio Update

陌路散爱 提交于 2019-11-27 21:47:13
I have updated Android Studio to version 3 and now seems unable to compile my project previously compiled without errors. The error message is the follow Error:Error: commons-logging defines classes that conflict with classes now provided by Android. Solutions include finding newer versions or alternative libraries that don't have the same problem (for example, for httpclient use HttpUrlConnection or okhttp instead), or repackaging the library using something like jarjar. [DuplicatePlatformClasses] The dependencies are dependencies { compile fileTree(include: ['*.jar'], dir: 'libs')

Kotlin Error : Could not find org.jetbrains.kotlin:kotlin-stdlib-jre7:1.0.7

隐身守侯 提交于 2019-11-27 21:45:43
I installed the Kotlin plugin into my app (v. v1.1.1-release-Studio2.2-1) and then selected "Configure Kotlin in Project" I selected compiler and runtime version of 1.0.7. Kotlin updated my Gradle files. Now when I try to build in I get: Error: A problem occurred configuring project ':app'. Could not resolve all dependencies for configuration ':app:_debugApkCopy'. Could not find org.jetbrains.kotlin:kotlin-stdlib-jre7:1.0.7. Required by: MyApplication:app:unspecified I'm not sure what I'm missing here. Leo Elstin replace implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"

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

EmptyThrowable: The APK file *.apk does not exist on disk

眉间皱痕 提交于 2019-11-27 20:57:17
This is an Android application using gradle. After clicking Run , I found APP_V1.3.4_2016-02-22_ 11:30:29 _google_play.apk in outputs/apk , but the event log says: 11:30:31 EmptyThrowable: The APK file /.../WorkSpace/Android/.../app/build/outputs/apk/APP_V1.3.4_2016-02-22_ 11:30:14 _google_play.apk does not exist on disk. 11:30:32 Session 'app': Error Installing APK Here is my build.gradle file: apply plugin: 'com.android.application' def releaseTime() { return new Date().format("yyyy-MM-dd_HH:mm:ss", TimeZone.getTimeZone("GMT+08:00")) } android { compileSdkVersion 'Google Inc.:Google APIs:23'

Android : app loading library at runtime on Lollipop but not IceCreamSandwich

跟風遠走 提交于 2019-11-27 20:41:20
I'm currently developping an Android app using Android Studio. Currently, the app is launching perfectly on Lollipop devices, but crashes at launch due to a ClassNotFoundException on pre-lollipop devices (i've tested on ICS and it fail). The missing class is always from an external librairies at runtime. Here's the gradle file : buildscript { repositories { maven { url 'https://maven.fabric.io/public' } } dependencies { classpath 'io.fabric.tools:gradle:1.+' } } apply plugin: 'com.android.application' apply plugin: 'io.fabric' android { compileSdkVersion 23 buildToolsVersion '23.0.0'

Finished with Non Zero Exit Value 3

泄露秘密 提交于 2019-11-27 20:14:13
I am trying to run my project, but I keep getting this error: Error:Execution failed for task ':app:preDexDebug'. com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home/bin/java'' finished with non-zero exit value 3 This is my gradle: apply plugin: 'com.android.application' android { compileSdkVersion 21 buildToolsVersion "21.1.2" defaultConfig { applicationId "com.blume.android" minSdkVersion 14 targetSdkVersion 21 versionCode 1 versionName "1.0" } buildTypes { release {

How To Exclude Specific Resources from an AAR Depedency?

╄→尐↘猪︶ㄣ 提交于 2019-11-27 20:03:57
Is there a reasonably simple way for a module's build.gradle file to indicate that certain files from a dependency should be excluded? I am specifically interested in excluding certain resources from an AAR. LeakCanary is an interesting library for helping to track down memory leaks. However, it has an undocumented requirement of compileSdkVersion of 21 or higher. While most projects should not have a problem with this, it's unseemly for a library to require a certain compileSdkVersion without a good reason. A development team may have frozen their compileSdkVersion as part of a general policy

Error inflating class com.facebook.widget.LoginButton with Facebook SDK 4.0.1

末鹿安然 提交于 2019-11-27 20:02:53
I know this is a very common question, btu I have read through all the stack overflow questions without finding an answer. I'm trying to integrate the Facebook Login Button using Facebook SDK 4.0.1 added through Gradle, but I get the following error. java.lang.RuntimeException: Unable to start activity ComponentInfo{se.speedle.android/com.bryderi.speedle.android.activity.MainActivity}: android.view.InflateException: Binary XML file line #26: Error inflating class com.facebook.widget.LoginButton at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2211) at android.app