Answer the question
In order to leave comments, you need to log in
Why doesn't the project compile on Android Studio 1.5.1?
There were no problems before. I installed a fresh Android Studio 1.5.1 under OS X 10.11 and gives the following error:
Information:Gradle tasks [:app:assembleDebug]
:android_tools:compileLint
:android_tools:copyReleaseLint UP-TO-DATE
:android_tools:preBuild UP-TO-DATE
:android_tools:preReleaseBuild UP-TO-DATE
:android_tools:checkReleaseManifest
:android_tools:preDebugAndroidTestBuild UP-TO-DATE
:android_tools:preDebugBuild UP-TO-DATE
:android_tools:preDebugUnitTestBuild UP-TO-DATE
:android_tools:preReleaseUnitTestBuild UP-TO-DATE
:android_tools:prepareComAndroidSupportAppcompatV72000Library UP-TO-DATE
:android_tools:prepareComAndroidSupportSupportV42000Library UP-TO-DATE
:android_tools:prepareReleaseDependencies
:android_tools:compileReleaseAidl UP-TO-DATE
:android_tools:compileReleaseRenderscript UP-TO-DATE
:android_tools:generateReleaseBuildConfig UP-TO-DATE
:android_tools:generateReleaseAssets UP-TO-DATE
:android_tools:mergeReleaseAssets UP-TO-DATE
:android_tools:generateReleaseResValues UP-TO-DATE
:android_tools:generateReleaseResources UP-TO-DATE
:android_tools:mergeReleaseResources UP-TO-DATE
:android_tools:processReleaseManifest UP-TO-DATE
:android_tools:processReleaseResources UP-TO-DATE
:android_tools:generateReleaseSources UP-TO-DATE
:android_tools:processReleaseJavaRes UP-TO-DATE
:android_tools:compileReleaseJavaWithJavac UP-TO-DATE
:android_tools:extractReleaseAnnotations UP-TO-DATE
:android_tools:mergeReleaseProguardFiles UP-TO-DATE
:android_tools:packageReleaseJar UP-TO-DATE
:android_tools:compileReleaseNdk UP-TO-DATE
:android_tools:packageReleaseJniLibs UP-TO-DATE
:android_tools:packageReleaseLocalJar UP-TO-DATE
:android_tools:packageReleaseRenderscript UP-TO-DATE
:android_tools:packageReleaseResources UP-TO-DATE
:android_tools:bundleRelease UP-TO-DATE
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest
:app:preReleaseBuild UP-TO-DATE
:download_manager:compileLint
:download_manager:copyReleaseLint UP-TO-DATE
:download_manager:preBuild UP-TO-DATE
:download_manager:preReleaseBuild UP-TO-DATE
:download_manager:checkReleaseManifest
:download_manager:preDebugAndroidTestBuild UP-TO-DATE
:download_manager:preDebugBuild UP-TO-DATE
:download_manager:preDebugUnitTestBuild UP-TO-DATE
:download_manager:preReleaseUnitTestBuild UP-TO-DATE
:download_manager:prepareComAndroidSupportSupportV42000Library UP-TO-DATE
:download_manager:prepareReleaseDependencies
:download_manager:compileReleaseAidl UP-TO-DATE
:download_manager:compileReleaseRenderscript UP-TO-DATE
:download_manager:generateReleaseBuildConfig UP-TO-DATE
:download_manager:generateReleaseAssets UP-TO-DATE
:download_manager:mergeReleaseAssets UP-TO-DATE
:download_manager:generateReleaseResValues UP-TO-DATE
:download_manager:generateReleaseResources UP-TO-DATE
:download_manager:mergeReleaseResources UP-TO-DATE
:download_manager:processReleaseManifest UP-TO-DATE
:download_manager:processReleaseResources UP-TO-DATE
:download_manager:generateReleaseSources UP-TO-DATE
:download_manager:processReleaseJavaRes UP-TO-DATE
:download_manager:compileReleaseJavaWithJavac UP-TO-DATE
:download_manager:extractReleaseAnnotations UP-TO-DATE
:download_manager:mergeReleaseProguardFiles UP-TO-DATE
:download_manager:packageReleaseJar UP-TO-DATE
:download_manager:compileReleaseNdk UP-TO-DATE
:download_manager:packageReleaseJniLibs UP-TO-DATE
:download_manager:packageReleaseLocalJar UP-TO-DATE
:download_manager:packageReleaseRenderscript UP-TO-DATE
:download_manager:packageReleaseResources UP-TO-DATE
:download_manager:bundleRelease UP-TO-DATE
:media_webbrowser:compileLint
:media_webbrowser:copyReleaseLint UP-TO-DATE
:media_webbrowser:mergeReleaseProguardFiles UP-TO-DATE
:media_webbrowser:preBuild UP-TO-DATE
:media_webbrowser:preReleaseBuild UP-TO-DATE
:media_webbrowser:checkReleaseManifest
:media_webbrowser:prepareReleaseDependencies
:media_webbrowser:compileReleaseAidl UP-TO-DATE
:media_webbrowser:compileReleaseRenderscript UP-TO-DATE
:media_webbrowser:generateReleaseBuildConfig UP-TO-DATE
:media_webbrowser:generateReleaseAssets UP-TO-DATE
:media_webbrowser:mergeReleaseAssets UP-TO-DATE
:media_webbrowser:generateReleaseResValues UP-TO-DATE
:media_webbrowser:generateReleaseResources UP-TO-DATE
:media_webbrowser:packageReleaseResources UP-TO-DATE
:media_webbrowser:processReleaseManifest UP-TO-DATE
:media_webbrowser:processReleaseResources UP-TO-DATE
:media_webbrowser:generateReleaseSources UP-TO-DATE
:media_webbrowser:processReleaseJavaRes UP-TO-DATE
:media_webbrowser:compileReleaseJavaWithJavac UP-TO-DATE
:media_webbrowser:packageReleaseJar UP-TO-DATE
:media_webbrowser:compileReleaseNdk UP-TO-DATE
:media_webbrowser:packageReleaseJniLibs UP-TO-DATE
:media_webbrowser:packageReleaseLocalJar UP-TO-DATE
:media_webbrowser:packageReleaseRenderscript UP-TO-DATE
:media_webbrowser:bundleRelease UP-TO-DATE
:app:prepareAndroidavdownloaderAndroid_toolsUnspecifiedLibrary UP-TO-DATE
:app:prepareAndroidavdownloaderDownload_managerUnspecifiedLibrary UP-TO-DATE
:app:prepareAndroidavdownloaderMedia_webbrowserUnspecifiedLibrary UP-TO-DATE
:app:prepareComAndroidSupportAppcompatV72311Library UP-TO-DATE
:app:prepareComAndroidSupportDesign2311Library UP-TO-DATE
:app:prepareComAndroidSupportMediarouterV72300Library UP-TO-DATE
:app:prepareComAndroidSupportRecyclerviewV72311Library UP-TO-DATE
:app:prepareComAndroidSupportSupportV42311Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServices840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAds840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAnalytics840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAppindexing840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAppinvite840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAppstate840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAuth840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesBase840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesBasement840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesCast840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesDrive840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesFitness840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesGames840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesGcm840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesIdentity840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesLocation840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesMaps840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesMeasurement840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesNearby840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesPanorama840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesPlus840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesSafetynet840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesVision840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesWallet840Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesWearable840Library UP-TO-DATE
:app:prepareDebugDependencies
:app:compileDebugAidl UP-TO-DATE
:app:compileDebugRenderscript UP-TO-DATE
:app:generateDebugBuildConfig UP-TO-DATE
:app:generateDebugAssets UP-TO-DATE
:app:mergeDebugAssets UP-TO-DATE
:app:generateDebugResValues UP-TO-DATE
:app:generateDebugResources UP-TO-DATE
:app:mergeDebugResources UP-TO-DATE
:app:processDebugManifest UP-TO-DATE
:app:processDebugResources UP-TO-DATE
:app:generateDebugSources UP-TO-DATE
:app:processDebugJavaRes UP-TO-DATE
:app:compileDebugJavaWithJavac
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
:app:compileDebugNdk UP-TO-DATE
:app:compileDebugSources
:app:preDexDebug
Uncaught translation error: com.android.dex.util.ExceptionWithContext
1 error; aborting
Error:Execution failed for task ':app:preDexDebug'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/bin/java'' finished with non-zero exit value 1
Information:BUILD FAILED
Information:Total time: 2 mins 31.858 secs
Information:1 error
Information:0 warnings
Information:See complete output in console
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion '23.0.2'
defaultConfig {
applicationId 'xxxxxxxxxxxxxxxx'
minSdkVersion 14
targetSdkVersion 23
versionCode 23
versionName '2.5'
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
productFlavors {
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile project(':download_manager')
compile project(':media_webbrowser')
compile project(':android_tools')
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.google.android.gms:play-services:8.4.0'
compile 'com.google.android.gms:play-services-ads:8.4.0'
compile 'com.google.android.gms:play-services-identity:8.4.0'
compile 'com.google.android.gms:play-services-gcm:8.4.0'
compile 'com.android.support:design:23.1.1'
}
Answer the question
In order to leave comments, you need to log in
Some glitch in the compiler... Solved the problem by reinstalling from JDK 7 to JDK 8.
If I'm not mistaken, this package
compile 'com.google.android.gms:play-services:8.4.0'
contains all other
compile 'com.google.android.gms:play-services-ads:8.4.0'
compile 'com.google.android.gms:play-services-identity:8.4.0'
compile 'com.google.android.gms:play-services-gcm:8.4.0'
Caught the same error.
"Error:Execution failed for task ':app:preDexDebug'" means Dex has exceeded the limit of 65K methods. Decided using Multidex. Everything is elementary.
Building Apps with Over 65K Methods | Android Developers
developer.android.com/intl/ru/tools/building/multi...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question