Getting Error while building the first ever android app as mentioned in tutorial 4 (Hello World)

0 vaibhav K · September 9, 2015
Hi Bucky,
Thanks for providing such a wonderful tutorials for us. I am following all your tutorials and i recommend others as well.
I have learned Python basic from your tutorial and now i am learning Android development.

I am facing one issue with the first basic program which is to create a Simple App (Hellow World :the first ever app)
First of all i have not Selected default "Nexus_5_API_23_x86" Virtual Device from AVDM instead i have added mine with default values.

Details are given below:
Name: My_device_API_23_asus

CPU/ABI: Intel Atom (x86)

Path: C:\Users\vikas\.android\avd\My_device_API_23_asus.avd

Target: Android 6.0 (API level 23)

Skin: 720x1080

SD Card: 100M

Snapshot: no

hw.dPad: no

runtime.network.speed: full

hw.accelerometer: yes

hw.device.name: My device

vm.heapSize: 32

skin.dynamic: yes

hw.device.manufacturer: User

hw.gps: yes

skin.path.backup: _no_skin

hw.audioInput: yes

hw.keyboard.lid: yes

tag.id: default

hw.camera.back: none

hw.mainKeys: no

AvdId: My_device_API_23_asus

hw.camera.front: none

hw.lcd.density: 240

runtime.scalefactor: auto

avd.ini.displayname: My device API 23(asus)

snapshot.present: no

hw.device.hash2: MD5:68f2b467cff6d90de133f00e7165f88d

hw.ramSize: 1536

hw.trackBall: no

hw.battery: yes

hw.sdCard: yes

tag.display: Default

runtime.network.latency: none

hw.keyboard: yes

hw.sensors.proximity: yes

disk.dataPartition.size: 200M

hw.sensors.orientation: yes

avd.ini.encoding: UTF-8

hw.gpu.enabled: yes

**************************************************************************************************
Then i have run the Virtual device by clicking on Green icon as you mentioned (PFA).
Now i have Run my program and I got the error.

Information:Gradle tasks [:app:assembleDebug]
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest
:app:preReleaseBuild UP-TO-DATE
:app:prepareComAndroidSupportAppcompatV72301Library UP-TO-DATE
:app:prepareComAndroidSupportSupportV42301Library 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 UP-TO-DATE
:app:compileDebugNdk UP-TO-DATE
:app:compileDebugSources UP-TO-DATE
:app:preDexDebug FAILED
Error: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_60\bin\java.exe'' finished with non-zero exit value 1
Information:BUILD FAILED
Information:Total time: 12.993 secs
Information:1 error
Information:0 warnings
Information:See complete output in console

Please help me with solving this issue.





Thanks and Regards
Vaibhav

Post a Reply

Replies

Oldest  Newest  Rating
0 Sandro Khokhiashvili · September 10, 2015
there is a problem with JDK did you add it to path?
0 vaibhav K · September 11, 2015
Yes I did. I have added JDK path in User variable.
  • 1

Java / Android Development

107,253 followers
About

Very popular language used to create desktop applications, website applets, and Android apps.

Links
Moderators
Bucky Roberts Administrator