1

I'm trying to compile a new project on cmd using cocos2d-x v3.10, but the build is failing and I'm getting the following error: The output as seen on cmd.

-pre-compile:

-compile:
    [javac] Compiling 29 source files to D:\Varun\MyApp\MyApp\cocos2d\cocos\platform
\android\java\bin\classes
    [javac] error: error reading D:\Varun\MyApp\MyApp\cocos2d\cocos\platform\android
\java\libs\._android-async-http-1.4.8.jar; error in opening zip file
    [javac] warning: [options] source value 1.5 is obsolete and will be removed
in a future release
    [javac] warning: [options] target value 1.5 is obsolete and will be removed
in a future release
    [javac] warning: [options] To suppress warnings about obsolete options, use
-Xlint:-options.
    [javac] 1 error
    [javac] 3 warnings

BUILD FAILED
D:\adt-bundle-windows-x86_64-20140321\sdk\tools\ant\build.xml:601: The following
 error occurred while executing this line:
D:\adt-bundle-windows-x86_64-20140321\sdk\tools\ant\build.xml:720: The following
 error occurred while executing this line:
D:\adt-bundle-windows-x86_64-20140321\sdk\tools\ant\build.xml:734: Compile faile
d; see the compiler error output for details.

Total time: 2 seconds
Error running command, return code: 1.

I'm using the following:
JDK: 1.8.0_73
Android api: 19
NDK: r9
Ant: 1.9.6
Python: 2.7.11

Zen
  • 5,065
  • 8
  • 29
  • 49
Varun M
  • 11
  • 2
  • NDK r10c+ is required to build Android games. – Zen Mar 17 '16 at 05:00
  • Is there libs._android-async-http-1.4.8.jar in the given directory? – Alanmars Mar 17 '16 at 06:54
  • @Zen I tried it again with ndk r10c and it gave the same error – Varun M Mar 18 '16 at 10:52
  • @Alanmars that file is present at that location(D:\Varun\MyApp\MyApp\cocos2d\cocos\platform\android \java\libs._android-async-http-1.4.8.jar). Also the file has all access rights(permissions). – Varun M Mar 18 '16 at 10:54
  • It's weird that I don't have `._android-async-http-1.4.8.jar` on my disk. Where did you download NDK? From Cocos? – Zen Mar 18 '16 at 12:03
  • Maybe the file D:\Varun\MyApp\MyApp\cocos2d\cocos\platform\android \java\libs\._android-async-http-1.4.8.jar has been corrupted. It's weird that ._android-async-http-1.4.8.jar is a hidden file. Just rename ._android-async-http-1.4.8.jar to android-async-http-1.4.8.jar, refer the jar with the new name and have a try. – Alanmars Mar 18 '16 at 12:08
  • @Zen I got it from this link: http://stackoverflow.com/questions/6849981/where-do-i-find-old-versions-of-android-ndk – Varun M Mar 18 '16 at 14:31
  • @Alanmars that didn't seem to make a difference – Varun M Mar 18 '16 at 14:33
  • @Varun M, What did you do? – Alanmars Mar 21 '16 at 08:02

1 Answers1

0

I think ._android-async-http-1.4.8.jar is a hidden file or the file is corrupted.

For case one, just rename it to android-async-http-1.4.8.jar and refer it to again.

For case two, just download a new one.

Alanmars
  • 1,267
  • 1
  • 11
  • 21