简体   繁体   English

向Android Studio添加Box2d扩展

[英]Adding Box2d extension to Android Studio

Downloaded Box2d from here but after going 这里下载Box2d,但是之后

Project Structure > New Module > Import existing library  

When asking for path i put the box2d path and still get the warning that doesnt let me continue 当询问路径时,我放了box2d路径,但仍然收到警告,提示我不要继续

Select modules to import 选择要导入的模块

What is the problem? 问题是什么?

Don't add PhysicsBox2D as Module, Download the JAR From this link :- http://www.java2s.com/Code/Jar/o/Downloadorgandengineextensionphysicsbox2djar.htm and copy jar and paste in project library folder. 不要将PhysicsBox2D添加为模块,请从此链接下载JAR:-http: //www.java2s.com/Code/Jar/o/Downloadorgandengineextensionphysicsbox2djar.htm,然后将jar复制并粘贴到项目库文件夹中。

And then go to File->Project Structure-> app->dependencies-> + ->File Dependency -> lib ->add that jar file. 然后转到File-> Project Structure-> app-> dependencies-> +-> File Dependency-> lib->添加该jar文件。

And if want to check that box2D is added or not try to import that:- import org.andengine.extension.physics.box2d in MainActivity.java. 并且,如果要检查是否添加了box2D,请尝试导入:-在MainActivity.java中导入org.andengine.extension.physics.box2d。 If importing Box2D is set in Project. 如果在Project中设置了导入Box2D。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM