如何打开android studio打开类的rosouse

android - ROS Wiki
Script wizards for conveniently creating android packages and projects.
Android Studio Environment
Develop from Android Studio without a ROS Environment!
Other Resources
Pre-Requisites
Downloading the build tools, sdk and android studio.
Catkin-Gradle Environment
Preparing a ros environment for development. Script wizards for conveniently creating android packages and projects.
Android Studio Environment
Develop from Android Studio without a ROS Environment!
Ros Android Application Tutorials
Building android applications on top of the RosActivity class. Getting your android applications to interact usefully with a setup robot. Simultaneously bring up & tear down an android listener/robot talker pair.
Using native ROS code on Android
Other Resources
Not supported - latest available release is .
Catkin-Gradle Environment
Preparing a ros environment for development. Script wizards for conveniently creating android packages and projects.
Android Studio Environment
Develop from Android Studio without a ROS Environment!
Ros Android Application Tutorials
Building android applications on top of the RosActivity class. Getting your android applications to interact usefully with a setup robot. Simultaneously bring up & tear down an android listener/robot talker pair.
Using native ROS code on Android
Other Resources14:07:50 UTC
I was trying to setup Android studio project to work natively with C++ and seems other guys instructions are correct and it's really works.
So far for Hello World project to try out you need to replace. build.gradle inside app folder with this code:
apply plugin: 'com.android.application'
compileSdkVersion 22
buildToolsVersion "22.0.1"
defaultConfig {
applicationId "org.cocos2dx.hellocpp"
minSdkVersion 10
targetSdkVersion 22
versionCode 1
versionName "1.0"
externalNativeBuild {
ndkBuild {
targets 'MyGame'
arguments 'NDK_MODULE_PATH=../../../..:../../../../cocos:../../../../external'
arguments '-j' + Runtime.runtime.availableProcessors()
abiFilters 'armeabi-v7a'
abiFilters 'armeabi-v7a'
sourceSets.main {
java.srcDir "src"
res.srcDir "res"
manifest.srcFile "AndroidManifest.xml"
assets.srcDir "assets"
externalNativeBuild {
ndkBuild {
path "jni/Android.mk"
signingConfigs {
if (project.hasProperty("RELEASE_STORE_FILE")) {
storeFile file(RELEASE_STORE_FILE)
storePassword RELEASE_STORE_PASSWORD
keyAlias RELEASE_KEY_ALIAS
keyPassword RELEASE_KEY_PASSWORD
buildTypes {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
if (project.hasProperty("RELEASE_STORE_FILE")) {
signingConfig signingConfigs.release
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile project(':libcocos2dx')
task cleanAssets(type: Delete) {
delete 'assets'
task copyAssets(type: Copy) {
from '../../Resources'
into 'assets'
clean.dependsOn cleanAssets
preBuild.dependsOn copyAssets
After try to run from Android Studio - to make project compile - after that configure
Run-&Edit configuration - select your project -& go to tab debugger -& set debuger type hybrid and select proper project symbol directory, it will be under this path
proj.android-studio/app/build/intermediates/ndkBuild/debug/obj/local/armeabi-v7a
also dont forget if you compiling armeabi-v7a to add it to Application.mk in JNI file
Have a try and let me know if it worked or you need more detailed instructions if some step not working properly.
14:45:08 UTC
Yes, it does work.Here's my version with precompiled libs support:
18:06:28 UTC
This is great news
01:59:25 UTC
nice! well done!
02:01:31 UTC
I found it here and tried it immediately.I get the following error, but does anyone know the cause?
make: *** [D:/cocos2dProjects/MyGame/proj.android-studio/app/build/intermediates/ndkBuild/debug/obj/local/armeabi-v7a/libcocos2dxinternal.a] Error 87
at com.android.build.gradle.tasks.ExternalNativeBuildTaskUtils.executeBuildProcessAndLogError(ExternalNativeBuildTaskUtils.java:233)
at com.android.build.gradle.tasks.ExternalNativeBuildTask.executeProcessBatch(ExternalNativeBuildTask.java:231)
at com.android.build.gradle.tasks.ExternalNativeBuildTask.build(ExternalNativeBuildTask.java:163)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:75)
I am very sorry for the sentence using the Google translation because it is Japanese and I am not good at English.Thank you for your consideration.
07:36:01 UTC
Is that a full stack trace?
03:15:41 UTC
gradlew assembleDebug --stacktrace
↑This way, is it wrong?
I output the log in text, but I copied only the last one and pasted it because it is long.
I am sorry that I am unfamiliar with English.Thank you.
07:12:10 UTC
You can add --debug as well. If output log is too long you should post it on pastebin for example.
13:11:36 UTC
It works!!!!! It helps me a lot!! I can debug now. Thanks a lot!
07:02:55 UTC
Warning:(499) warning: ignoring old commands for target `/Users/admin/Desktop/HelloCpp/proj.android-studio/app/build/intermediates/ndkBuild/release/obj/local/armeabi-v7a/objs/bullet_static/BulletMultiThreaded/SpuLibspe2Support.o'Error:Execution failed for task ':HelloCpp:externalNativeBuildDebug'.
Unexpected native build target MyGame. Valid values are: extension, audioengine, cpufeatures, box2d, cocos2dandroid, spine, network, cocos2dcpp, flatbuffers, ui, recast, cocos2dxinternal, cocos3d, cocosbuilder, bullet, cocostudio, cocosdenshion
It don't work. How do I set? thanks!
08:14:37 UTC
Unexpected native build target MyGame
I think this is issue, you probably using older cocos2d-x version where compiled lib was called "cocos2dcpp"
not "MyGame"
U) to 3.13.1+ or change in gradle that line
targets 'MyGame'to
targets 'cocos2dcpp'
Target name should match with in Android.mk defined (without _shared)
LOCAL_MODULE := cocos2dcpp_shared
10:26:19 UTC
nice! It works!! Thanks!!!
17:14:50 UTC
, appreciate your work.
Using these instructions I have a project compiling and debugging from Android Studio.
What I cannot see is the C++ files in my cocos2d-x project.
Can you advise me please?
Thanks again!
11:08:46 UTC
I have it all compiling, running. Have set the debug type to "Native" and set the symbols directory and yet when I press "debug" it does not hit any breakpoints at all..
Is really frustrating please help ... here is my setup:
So I have done: edit configurations -& select app "HelloCpp" -- Debug tab - & Native -& symbols directory:
"C:\dev\firebase\cocos2dx-cpp-sample\sample_project\proj.android-studio\app\.externalNativeBuild\ndkBuild\debug\armeabi-v7a"
In build.gradle for the app I have:
apply plugin: 'com.android.application'
compileSdkVersion 25
buildToolsVersion '25.0.2'
defaultConfig {
applicationId "org.cocos2dx.hellocpp"
minSdkVersion 21
targetSdkVersion 25
versionCode 1
versionName "1.0"
externalNativeBuild {
ndkBuild {
arguments '-j' + Runtime.runtime.availableProcessors()
abiFilters 'x86','armeabi-v7a'
externalNativeBuild {
ndkBuild {
path 'jni/Android.mk'
sourceSets.main {
java.srcDir "src"
res.srcDir "res"
jniLibs.srcDir "libs"
manifest.srcFile "AndroidManifest.xml"
assets.srcDir "assets"
signingConfigs {
if (project.hasProperty("RELEASE_STORE_FILE")) {
storeFile file(RELEASE_STORE_FILE)
storePassword RELEASE_STORE_PASSWORD
keyAlias RELEASE_KEY_ALIAS
keyPassword RELEASE_KEY_PASSWORD
buildTypes {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
if (project.hasProperty("RELEASE_STORE_FILE")) {
signingConfig signingConfigs.release
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile project(':libcocos2dx')
compile 'com.google.firebase:firebase-auth:10.2.0'
compile 'com.google.android.gms:play-services-base:10.2.0'
apply plugin: 'com.google.gms.google-services'
task cleanAssets(type: Delete) {
delete 'assets'
task copyAssets(type: Copy) {
from '../../Resources'
into 'assets'
clean.dependsOn cleanAssets
preBuild.dependsOn copyAssets
17:43:01 UTC
I solved this by upgrading to 3.15 and downgrading the NDK to 13.b. Only took most of the day to figure it out.. the joys of open source.android(14)
&&1.经常从github上面下载一个&studio 项目,结果出现gradle很久很久,久到&studio
崩了 还是没好~,这里我提一下自己的解决办法:
& & & &我们这里随便从网上下载一个项目,看一下他的目录结构:
,然后我们打开一个 我们自己新建的一个项目或者一个在自己电脑编译好的项目,目录结构如下:
我们先打开自己项目和别人项目的build.gradle文件,如下:
1.将别人的classpath&改成与自己相同的:classpath
'com.android.tools.build:gradle:2.2.0'
2.然后我们打开别人项目的当前文件;
打开文件如下,
,我们看一下我们自己项目的这个文件内容:
2.我们需要修改将下图的版本修改成自己的编译版本:
然后,导入后就可以了
&&相关文章推荐
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:77465次
积分:1462
积分:1462
排名:千里之外
转载:372篇
(10)(20)(10)(58)(26)(40)(13)(13)(16)(94)(34)(34)(18)
Installing
Android Studio + SDK and ROSJava Environment:
is an opensource project in pure Java for inegrating ROS with Android Development Environment.
the instructions provided below have been tested on&Ubuntu
12.04 LTS. They might change for other Linux distributions. For example,
the same installation procedure will not work on Linux Mint. That would require building from the source (a method which the ROS website does not recommend).Installation in Ubuntu 12.04 is fairly easy due to the availability of precompiled debs (debian files)*
Under Tools:
Android API 19 / 18 / 17 / 16 /15 / 13 / 10 / 7
(Unclick the TV addons from API 13)
1 $ export ROS_IP=http://IP_OF_THE_ROBOT:11311
2 $ export ROS_MASTER_URI=http://IP_OF_THE_ROBOT:11311
&&相关文章推荐
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:615736次
积分:7472
积分:7472
排名:第2859名
原创:98篇
转载:370篇
评论:55条
(2)(9)(18)(9)(3)(11)(4)(5)(18)(7)(15)(12)(4)(1)(1)(1)(1)(15)(1)(3)(2)(9)(2)(7)(7)(2)(36)(10)(1)(4)(5)(4)(4)(1)(8)(8)(23)(20)(20)(2)(5)(25)(9)(8)(16)(10)(32)(4)(14)(5)(3)(8)(16)

我要回帖

更多关于 android studio打开db 的文章

 

随机推荐