Help needed ! Cocos2dxDownloader.java error on cocos2d-x 3.11.1

@nite, @pabitrapadhy, @yinjimmy, @slackmoehrle
Created a new javascript demo project and run the project from command prompt. Android Project run with out error and install on android device from command prompt. However when I import the same project to cocos code IDE I got the below error while running. I have gone through some similar questions asked on this forum cant compile to android, cant compile to android, compile error. My development environment has below setup window 10 operating system
1 - android-ndk-r10c
2 - apache-ant-1.9.7
3 - cocos2d-x-3.11.1
4 - python-2.7.11
5 - cocos-code-ide-2.0.0-beta
6 - Android SDK 21
7 - Java 1.7.0-79

For your information:-
In this path (D:\COCOS_2DX_WORKSPACE\MYDEMO\frameworks\cocos2d-x\cocos\platform\android\java\libs) on my project there is a jar file available and it is “android-async-http-1.4.8” .

ERROR :-
Information:Using javac 1.7.0_79 to compile java sources
Information:java: Errors occurred while compiling module ‘android’
Information:6/13/2016 12:37 AM - Compilation completed with 22 errors and 0 warnings in 20s 497ms
D:\COCOS_2DX_WORKSPACE\MYDEMO\frameworks\cocos2d-x\cocos\platform\android\java\src\org\cocos2dx\lib\Cocos2dxDownloader.java
Error:(3, 30) java: package com.loopj.android.http does not exist
Error:(4, 30) java: package com.loopj.android.http does not exist
Error:(5, 30) java: package com.loopj.android.http does not exist
Error:(6, 30) java: package com.loopj.android.http does not exist
Error:(7, 30) java: package com.loopj.android.http does not exist
Error:(15, 31) java: cannot find symbol
symbol: class BinaryHttpResponseHandler
Error:(168, 13) java: cannot find symbol
symbol: class AsyncHttpClient
location: class org.cocos2dx.lib.Cocos2dxDownloader
Error:(63, 31) java: cannot find symbol
symbol: class FileAsyncHttpResponseHandler
Error:(155, 5) java: cannot find symbol
symbol: class RequestHandle
location: class org.cocos2dx.lib.DownloadTask
Error:(156, 5) java: cannot find symbol
symbol: class AsyncHttpResponseHandler
location: class org.cocos2dx.lib.DownloadTask
Error:(31, 5) java: method does not override or implement a method from a supertype
Error:(41, 5) java: method does not override or implement a method from a supertype
Error:(46, 5) java: method does not override or implement a method from a supertype
Error:(56, 5) java: method does not override or implement a method from a supertype
Error:(168, 47) java: cannot find symbol
symbol: class AsyncHttpClient
location: class org.cocos2dx.lib.Cocos2dxDownloader
Error:(80, 24) java: cannot find symbol
symbol: method getTargetFile()
location: class org.cocos2dx.lib.FileTaskHandler
Error:(84, 5) java: method does not override or implement a method from a supertype
Error:(94, 5) java: method does not override or implement a method from a supertype
Error:(99, 5) java: method does not override or implement a method from a supertype
Error:(105, 5) java: method does not override or implement a method from a supertype
Error:(133, 29) java: cannot find symbol
symbol: method getTargetFile()
location: class org.cocos2dx.lib.FileTaskHandler
Error:(115, 5) java: method does not override or implement a method from a supertype
Information:java: D:\COCOS_2DX_WORKSPACE\MYDEMO\frameworks\cocos2d-x\cocos\platform\android\java\src\org\cocos2dx\lib\Cocos2dxDownloader.java uses unchecked or unsafe operations.
Information:java: Recompile with -Xlint:unchecked for details.

1 Like

I have same issue :worried:

Code IDE is EOL’d. I don’t know that it works with newer Cocos2d-x releases. I’d suggest using something else, Cocos Creator would be a good choice.

Thank you for updating my knowledge base.

Can you download this library http://loopj.com/android-async-http/ and put into the libs folder? Looks like your project is missing this library