i've just installed the latest version of Android Studio Bundle with SDK
but i couldn't run even its "hello world" default simple program and when ever i tried to run program it just keep saying Execution failed for task ':app:preDexDebug'.
and here is the complete gradle console log:
Executing tasks: [:app:assembleDebug]
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:prepareComAndroidSupportAppcompatV72211Library UP-TO-DATE
:app:prepareComAndroidSupportSupportV42211Library 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:compileDebugJava
UP-TO-DATE :app:compileDebugNdk UP-TO-DATE :app:compileDebugSources
UP-TO-DATE :app:preDexDebug FAILED
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':app:preDexDebug'.
com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command
'C:\Program Files\Java\jdk1.8.0_40\bin\java.exe'' finished with
non-zero exit value 1
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 4.734 secs
i tried with jdk version 7 and jdk 8 (32bit-win8)
i know there are similar topic and questions but none of them counldn't solve my problem
Related
I am new to android studio and Gradle. I have a project where I am loading a large SQLite database (from assets folder). When I press run and select an emulator, android studio starts on the build and executes gradle tasks. I am getting an error on one of these tasks which says:
Error:Execution failed for task ':app:packageInstantRunResourcesDebug'.
> org.gradle.tooling.BuildException (no error message)
and in the complete error output in console it says this:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:packageInstantRunResourcesDebug'.
> org.gradle.tooling.BuildException (no error message)
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or
--debug option to get more log output.
* Get more help at https://help.gradle.org
BUILD FAILED in 21s
I don't know if this is due to the large database. This is the stack trace of the tasks being built:
Executing tasks: [:app:assembleDebug]
:app:buildInfoDebugLoader
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:compileDebugAidl UP-TO-DATE
:app:compileDebugRenderscript UP-TO-DATE
:app:checkDebugManifest UP-TO-DATE
:app:generateDebugBuildConfig UP-TO-DATE
:app:prepareLintJar UP-TO-DATE
:app:generateDebugResValues UP-TO-DATE
:app:generateDebugResources UP-TO-DATE
:app:mergeDebugResources UP-TO-DATE
:app:createDebugCompatibleScreenManifests UP-TO-DATE
:app:processDebugManifest UP-TO-DATE
:app:splitsDiscoveryTaskDebug UP-TO-DATE
:app:processDebugResources UP-TO-DATE
:app:generateDebugSources
:app:javaPreCompileDebug UP-TO-DATE
:app:compileDebugJavaWithJavac UP-TO-DATE
:app:mergeDebugShaders UP-TO-DATE
:app:compileDebugShaders UP-TO-DATE
:app:generateDebugAssets UP-TO-DATE
:app:mergeDebugAssets UP-TO-DATE
:app:packageInstantRunResourcesDebug FAILED
:app:buildInfoGeneratorDebug
You need to disable Instant Run feature. Instruction for latest stable Android Studio:
File -> Settings -> Build, Execution, Deployment -> Instant Run -> [Remove checkbox] ""Enable Instant Run to hot sap code...""
I am trying to port a functionality I have started and its working for React Native in iOS to Android.
The component is a Audio Sound waveform visualiser, which is working fine in iOS, but I'm finding an issue when I try to build the Android Studio project.
In the Gradle console it shows up:
Executing tasks: [:app:clean, :app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:mockableAndroidJar, :app:prepareDebugUnitTestDependencies, :app:assembleDebug]
Configuration on demand is an incubating feature.
Incremental java compilation is an incubating feature.
:app:clean
:app:buildInfoDebugLoader
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest
:ReactAndroid:preBuild UP-TO-DATE
:ReactAndroid:preReleaseBuild UP-TO-DATE
:ReactAndroid:checkReleaseManifest
:ReactAndroid:preReleaseUnitTestBuild UP-TO-DATE
:ReactAndroid:prepareComAndroidSupportAppcompatV72301Library UP-TO-DATE
:ReactAndroid:prepareComAndroidSupportRecyclerviewV72301Library UP-TO-DATE
:ReactAndroid:prepareComAndroidSupportSupportV42321Library UP-TO-DATE
:ReactAndroid:prepareComFacebookFrescoDrawee0110Library UP-TO-DATE
:ReactAndroid:prepareComFacebookFrescoFbcore0110Library UP-TO-DATE
:ReactAndroid:prepareComFacebookFrescoFresco0110Library UP-TO-DATE
:ReactAndroid:prepareComFacebookFrescoImagepipeline0110Library UP-TO-DATE
:ReactAndroid:prepareComFacebookFrescoImagepipelineBase0110Library UP-TO-DATE
:ReactAndroid:prepareComFacebookFrescoImagepipelineOkhttp30110Library UP-TO-DATE
:ReactAndroid:prepareComFacebookSoloaderSoloader010Library UP-TO-DATE
:ReactAndroid:prepareOrgWebkitAndroidJscR174650Library UP-TO-DATE
:ReactAndroid:prepareReleaseDependencies
:ReactAndroid:compileReleaseAidl UP-TO-DATE
:ReactAndroid:compileReleaseNdk UP-TO-DATE
:ReactAndroid:compileLint UP-TO-DATE
:ReactAndroid:copyReleaseLint UP-TO-DATE
:ReactAndroid:compileReleaseRenderscript UP-TO-DATE
:ReactAndroid:generateReleaseBuildConfig UP-TO-DATE
:ReactAndroid:generateReleaseResValues UP-TO-DATE
:ReactAndroid:generateReleaseResources UP-TO-DATE
:ReactAndroid:mergeReleaseResources UP-TO-DATE
:ReactAndroid:processReleaseManifest UP-TO-DATE
:ReactAndroid:processReleaseResources UP-TO-DATE
:ReactAndroid:generateReleaseSources UP-TO-DATE
:ReactAndroid:incrementalReleaseJavaCompilationSafeguard UP-TO-DATE
:ReactAndroid:createNativeDepsDirectories UP-TO-DATE
:ReactAndroid:downloadBoost FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':ReactAndroid:downloadBoost'.
> Could not initialize class org.apache.http.conn.ssl.SSLConnectionSocketFactory
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 1.945 secs
For some reason it crashes in the Gradle task when executing
:ReactAndroid:downloadBoost
I've checked the https link manually and I can download the zip perfectly, so it may be the issue somewhere else.
Any help will be really appreciated.
Recently migrated (or still trying to) from Eclipse ADT to Android Studio, here's what Gradle says when I hit `Run' (full trace below):
* What went wrong:
Execution failed for task ':app:packageDebug'.
> class org.bouncycastle.asn1.ASN1Primitive overrides final method equals.(Ljava/lang/Object;)Z
I've seen: Android Studio Bouncy castle issue (newbie), Problems launching error in Android Studio when packageDebug at Max OS X and similar SO posts that all point out to a bouncy castle JAR (bcprov-jdk15on-1.48.jar) that should be removed from the classpath. However I have no such JAR file there and it, in fact, Gradle itself seems to download it because the only place where I found it was:
/Applications/Android Studio.app/Contents/gradle/m2repository/org/bouncycastle/bcprov-jdk15on/
Trying to delete the file there, Gradle complains that a referenced library is missing.
Just how do I fix this?
Complete trace:
Executing tasks: [:app:assembleDebug]
Configuration on demand is an incubating feature.
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest
:app:preDebugAndroidTestBuild UP-TO-DATE
:app:preReleaseBuild UP-TO-DATE
:app:prepareComAndroidSupportMultidex101Library 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:compileDebugJavaWithJavac UP-TO-DATE
:app:compileDebugNdk UP-TO-DATE
:app:compileDebugSources UP-TO-DATE
:app:transformClassesWithJarMergingForDebug UP-TO-DATE
:app:collectDebugMultiDexComponents
:app:transformClassesWithMultidexlistForDebug UP-TO-DATE
:app:transformClassesWithDexForDebug UP-TO-DATE
:app:mergeDebugJniLibFolders UP-TO-DATE
:app:transformNative_libsWithMergeJniLibsForDebug UP-TO-DATE
:app:processDebugJavaRes UP-TO-DATE
:app:transformResourcesWithMergeJavaResForDebug UP-TO-DATE
:app:validateDebugSigning
:app:packageDebug FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:packageDebug'.
> class org.bouncycastle.asn1.ASN1Primitive overrides final method equals.(Ljava/lang/Object;)Z
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 0.479 secs
Information:Gradle tasks [:app:generateDebugSources, :app:generateDebugAndroidTestSources]
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest
:app:preReleaseBuild UP-TO-DATE
:app:prepareComAndroidSupportAppcompatV72311Library UP-TO-DATE
:app:prepareComAndroidSupportSupportV42311Library 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 FAILED
Error:Execution failed for task ':app:processDebugResources'.
com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'D:\ProgramFiles\sdk\build-tools\23.0.2\aapt.exe'' finished with non-zero exit value 1
This is the error i am getting every time i try to build the project in Studio. Tried all the possible solutions available in stackoverflow but not able to resolve , Please Help!!!!
Go to Build > Clean Project
then Build > Rebuild Project
if it doesn't work then go to File > Invalid Caches / Restart and select "Invalidate and Restart" button. it worked for me
Hi I have installed the latest version of Android Studio on Windows 7 32-bit.
I have created a welcome app, but when I try to test it using AVD it's not launching, instead it's showing the error below:
Executing tasks: [:app:assembleDebug, :app:assembleDebugTest]
Configuration on demand is an incubating feature.
:app:preBuild
:app:compileDebugNdk UP-TO-DATE
:app:preDebugBuild
:app:checkDebugManifest
:app:preReleaseBuild
:app:prepareComAndroidSupportAppcompatV72102Library UP-TO-DATE
:app:prepareComAndroidSupportSupportV42102Library 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
:app:processDebugManifest UP-TO-DATE
:app:processDebugResources
:app:generateDebugSources
:app:compileDebugJava
:app:preDexDebug
The system cannot find the path specified.
The system cannot find the path specified.
FAILED
The system cannot find the path specified.
The system cannot find the path specified.
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:preDexDebug'.
> com.android.ide.common.internal.LoggedErrorException: Failed to run command:
E:\Android\AndroidStudio\sdk\build-tools\21.1.1\dx.bat --dex --output E:\Android\AndroidStudio\WorkLocation\MyApplication\app\build\intermediates\pre-dexed\debug\classes-0f52de9bbc91bb9956813aaf2c6f0ff9d0160fa0.jar E:\Android\AndroidStudio\WorkLocation\MyApplication\app\build\intermediates\exploded-aar\com.android.support\appcompat-v7\21.0.2\classes.jar
Error Code: 1
Output: The system cannot find the path specified.
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 24.154 secs
**Failed to complete Gradle execution
Cause:**
Does anyone know how to fix this?