Closed dmrdev closed 7 years ago
Moreover even compile compile -p android --android-studio
doesn't work because it also depends on android.bat
utility.
meet same problem.
@natural-law , please take a look at this issue. Thanks.
As a temporary solution I downloaded the previous version (25.2.3) of SDK tools from this page: https://developer.android.com/studio/index.html (see the bottom of the page) and then replaced tools folder in the Android sdk with the previous one.
Sorry, maybe I created an issue in a wrong repository because the same issue was already posted to the cocos2d-console repository almost two weeks ago: https://github.com/cocos2d/cocos2d-console/issues/404
but unfortunately it is not fixed yet.
Yep, I will fix the problem later. Before that, you can rollback the version of Android SDK tools to avoid the problem. Sorry for the inconvenience!
@dmrntpv How did you got the Android SDK tools 25.3.1? I just installed the latest version of Android Studio. But I can't update the Android SDK tools version to 25.3.1 (I tried it both on Mac & Windows):
@natural-law, I just run update and chose to update to the latest versions of all suggested packages.
@natural-law, just checked again and this is something interesting, now it suggests to update not to 25.3.1, but to 25.2.5.
Just now I have updated the tools to 25.2.5 and Android Studio no longer suggests to upgrade it further.
Maybe they rolled back the update after so many complaints.
I don't have any special update settings (canary, beta etc). All my Android Studio update settings are set to default.
Maybe they rolled back the update after so many complaints.
Yep, maybe it is. So, i'll solve the problem once i can reproduce it. Thanks for your feedback!
Got this issue 2 days ago. As an alternative for the time being, I switched to using Gradle and externalNativeBuild
to accomplish my needs. It does bring other great benefits like full debugger support and reliable code-completion in Android Studio.
@yjwong, could you please describe how you did that? Does it work with JSB to copy the fresh versions of js-files to resources?
Not only cocos project experiencing this issue. Android SDK developers just removed a whole bunch of tools. There's a comment on how to make a temporary workaround: https://github.com/NativeScript/nativescript-cli/issues/2583#issuecomment-283712933
@natural-law, the new version (25.3.1) of SDK tools is available again via Android Studio updater tool. You can update now and try to fix the issue. Thank you!
Confirm bug. Downgrade to 25.2.3 helps. Looks like the solution should be come from Google
@formatCvt Unfortunately Google has completely dropped the standalone GUI manager, ergo "android", and has moved all command line SDK management to a new tool found here
Not sure if somehow pointing the build command to the new tool would work or not but I am currently in the midsts of trying it.
@gamer-11 Cocos (and other game engines) uses tool "android" for project actions (https://developer.android.com/studio/tools/help/android.html), not for sdk management. And now we have no command line tool for this, maybe Google knows how to create/update project from command line since they removed android tool.
@dmrntpv I wrote a post on Medium detailing how to use externalNativeBuild
with cocos2d-x so it doesn't depend on the cocos
command line tool. I'm not sure if it works with JSB though, but I would imagine a Gradle script could function as a replacement.
If anyone's interested: https://medium.com/@yjwong/using-externalnativebuild-with-cocos2d-x-f6a3c8eacfc8
externalNativeBuild
also discussed here https://github.com/cocos2d/cocos2d-x/pull/15676
Hello, everybody. I'm improving command cocos compile
to support the externalNativeBuild in gradle. After that, I'll solve the problem caused by the Android SDK tools 25.3.x.
Thanks for all your feedback!
Hi, could you plese share your fix?
@formatCvt Forgive me if I am wrong. I understand that the command had various purposes(and that other game engines use them, well even the Unity projects are affected by this update). I was merely stating the reason for Google to drop the tool might be that they wanted people to use Android Studio for most of the development. From the link you have shared I get the sense that they have bundled the same via Studio, meaning for the time being the only way (that I know of) to create and manage an android project is via the IDE.
It would be super awesome if we could just open up the project in studio and have the ability to code and compile/deploy in the same environment as in iOS development in xcode.
@natural-law a user on the forums posted this: https://goo.gl/IlUvSp might be worth a look. He had success.
@gamer-11 no problem =) You can try open/code/compile/deploy/debug in studio (Android Studio 2.3) with patch from here https://github.com/cocos2d/cocos2d-x/pull/15676 But we need console too, for continuous integration
Hi, guys! In the latest code of cocos2d-console, I've solved the error when using Android SDK Tools 25.3.x.
As the release note of Android SDK Tools 25.3.0 said, the ant scripts has been removed. So, The Eclipse project will not be supported with Android SDK Tools 25.3.x.
Hope it's helpful!
Thanks!
How about cocos2d-x-3.13.1 and earlier ?
It is nothing about cocos2d-x version. It is about the tools version you used.
Replacing the tools works for me. Thanks guys 👍
What version of the tools works? I've been trying to install cocos for the past 3 days using this guide http://cocos2d-x.org/docs/installation/Android-terminal/index.html but all the versions are out of date
@james-muldoon 25.2.3 works for me
@jgod thanks for the reply. That's the version of tools that I have, but I'm still getting the message "The "android" command is deprecated" (shown in screenshot). Are you perhaps using a different SDK or NDK version to me? My NDK is r10c.
@james-muldoon i think @natural-law has already answered it above. You should copy tools
from old Android SDK because some tools are deleted in new Android SDK.
Doing this just creates a different error for me. Do you download the SDK through Android Studio? Since downloading the command line tools now no longer includes the android SDK (further complicating following the given installation instructions)
@mingoo I've updated cocos console, android sdk tools to the latest and I'm still getting:
cocos gen-libs -p android --app-abi armeabi-v7a
running: '/Users/piotr/Documents/pierdoly/cocos2d-x-3.14/tools/cocos2d-console/bin/cocos compile -s /Users/piotr/Documents/pierdoly/cocos2d-x-3.14/tools/simulator -p android --ndk-mode release --app-abi armeabi-v7a'
Building mode: debug
Using Eclipse project : /Users/piotr/Documents/pierdoly/cocos2d-x-3.14/tools/simulator/frameworks/runtime-src/proj.android
Ant (Eclipse project) is not supported from Android SDK Tools 25.3.0.
Error running command, return code: 101.
I have the same issue. Latest cocos console, android sdk tools
Ant (Eclipse project) is not supported from Android SDK Tools 25.3.0
https://dl.google.com/android/repository/tools_r25.2.5-windows.zip https://dl.google.com/android/repository/tools_r25.2.5-macosx.zip https://dl.google.com/android/repository/tools_r25.2.5-linux.zip
rename tools folder, and extract and put tools folder from above depending on your OS.
I had the same problem. Thank you rohitchauhan365 for posting the fix.
I have an old project in cocos 3.13.x and I have now modified the game code. i am unable to compile this code for android devices. Is there any easy way to upgrade my code to cocos 3.15.x version and compile it. I have upgraded by copying cocos2d folder from new version 1.15.x to my existing project and I saw following error
**Try: Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output.
BUILD FAILED
Total time: 1 mins 52.021 secs Stopped 0 compiler daemon(s). Error running command, return code: 1.**
I am new to cocos, any help will be highly appreciable.
cocos2dx is dead. if not for the legacy project, We will definite using Unity.
@minggo do you agree with @williamxhero?
No, it is caused by Android SDK issue. I think i answered it above. You can use cocos run -p android --android-studio
or copy tools folder from old Android SDK.
@minggo cocos run -p android --android-studio also failed. why?
@minggo Ant was deprecated a long time ago, unless you're time traveling from 2009 I would say is definitely not an Android SDK issue.
@sgwood cocos run -p android --android-studio
works.
@TankTheFrank android command is also removed too. What this issue is saying that, Eclipse projects are not supported.
@minggo if my old cocos project (created from 3.4) doesn't have proj.android-studio, is it okay to copy and paste from where it has one (like a project created in 3.16)?
In latest android sdk
, the android.bat
seems misssing. So functions depends on android.bat
will fail, likes projectRoot/setup.py
setup andorid.
There's no plan to fix this?
Just updated Android SDK tools to the latest version 25.3.1 and now tools/android.bat no longer works, it reports:
Steps to Reproduce:
compile compile -p android
orcompile run -p android