development tool 怎么在myeclipcy上android

2016-10-30 22:12:00 qq_25827845 阅读数 36357

 

 

写在最前面:

    本来,我是有一篇博客 RN开发之BUG 总结(持续更新) 来专门总结自己在React-Native开发中遇到的各种BUG 以及决办法的。

但是,由于 Could not connect to development server是我深恶痛绝的一个超级大BUG。

为什么这么说呢?

      因为这个BUG并不容易在网上找到解决方法。网上确实有这个BUG,但是大部分都是解决IOS开发中遇到的,一

外的网站中也在讨论这个问题,好不容易找到点和我问题相似的,还并没有给出确定的解决方案,实在是让我郁

闷,且这个BUG困扰了我好久。今天就将自己的解决办法分享出来,来帮助更多的网友。


1、我们首先看一下这个大红屏错误吧。如图所示:



先来翻译:


连接不到开发的服务器。

请按照以下的步骤来修复此问题:

  • 确保包服务器在运行
  • 确保你的设备或者模拟器连接着电脑,并且手机打开了USB调试模式,然后在cmd中运行adb devices来查看已经连接好的设备列表
  • 确保飞行模式是关闭的
  • 如果是使用真机来开发,输入 adb reverse tcp:8081 tcp:8081来检查设备
  • 输入IP:8081(这个大家都会)



解决方法:


1、首先检查包服务器是否运行正常。

       在项目文件夹下输入react-native start或者npm start均可开启服务器,但是我们需要在PC端确认包服务器是否运行正常。检查网址为:http://localhost:8081/index.android.bundle?platform=android


(1)说说我遇到的问题,开启包服务器之后,cmd中显示如下:


出现React packager ready就走不动了。

      当我看开http://localhost:8081/index.android.bundle?platform=android网址 时,没有正常显示,但是也没

显示“该网页无法访问”,只是一直在转圈圈刷新网页,就是打不开。


现在我定位了自己的问题(大哭难怪以前输入IP:8081并没有什么鸟用)


如何解决?


答:经过我的观察,包服务器中使用到了node,所以应该和node版本和配置有一定的关系。所以我就卸掉

node,重新安装了最新版本的node,之后包服务器打开,网页可以正常访问,如下所示:



2、检查硬件连接,以及使用adb devices来查看是否连接成功。

3、飞行模式关闭

4、在cmd中输入 adb reverse tcp:8081 tcp:8081,结果如下:



当我看到error:closed我就猜到,大哭原来我的问题出在这儿。怎么办呢?


个人认为解决办法如下:

  • 手机-设置-应用程序-开发-usb调试打开再关闭一次

  • 重启手机,usb调试打开再关闭一次

  • 在cmd下Try "adb kill-server" and then "adb start-server"


本人测试机为android 5.0+系统,使用第二种方法解决问题。结果如下:




5、摇一摇手机选择Dev Settings 输入IP:8081的方法就不多说了。


       至此,解决了Could not connect to development server(Android)的问题,本人的测试机为魅蓝metal,系统是

Android 5.0+的系统,所以可能和各位小伙伴的情况不太一样,大家可以参考参考。文章写得不太好,请见谅。



如果对你有帮助,记得点赞哦大笑




2019-07-27 16:23:33 qq_41185868 阅读数 4485

成功解决ERROR: Unable to find the development tool `make` in your path; please make sure that you have t

 

 

 

目录

解决问题

解决思路

解决方法


 

 

 

解决问题

NVIDIA Software Installer for Unix/Linux

ERROR: Unable to find the development tool `make` in your path; please make  
         sure that you have the package 'make' installed.  If make is          
         installed on your system, then please check that `make` is in your    
         PATH.

 

 

解决思路

NVIDIA Unix/Linux软件安装程序错误:无法在您的路径中找到开发工具“make”;请确保您已安装软件包“make”。如果您的系统上安装了make,那么请检查“make”是否在您的路径中。

 

 

解决方法

安装make
参考文章:Ubuntu之make:make命令行工具的简介、安装、使用方法之详细攻略

 

 

 

 

 

 

 

 

 

 

 

 

 

 

2010-05-02 10:35:00 RQG 阅读数 2912

Android is the first free, open-source, and fully customizable mobile platform. Android provides a full stack including an operating system, middleware, and key mobile applications. It also contains a rich set of APIs that allows third-party developers to develop more applications. Android relies on Linux version 2.6 for core system services, such as security, memory management, process management, network stack, and driver model, and the minimum requirement for hardware is a 200MHz ARM processor. Therefore, if Android application developers want to build performance-critical portions of their apps in native code, they should build a set of cross-toolchains (compilers, linkers, etc.) that can generate native ARM binaries on Linux.

Android applications run in the Dalvik virtual machine, which limits the development of applications; however, Android official website has released a native development kit (Android NDK), which allows developing part of your applications using native-code languages such as C and C++. This is beneficial for developing certain classes of application in the terms of reusing existing codes and accelerating apps running speed. The NDK, however, only supports the ARMv5TE machine instruction set and provides stable headers for libc (the C library), libm (the Math library), and OpenGL ES (3D graphics library). If you desire an in-depth development on Android, a much more open and flexible native development tool is requested.

 

Android NDK provides toolchain source code, which can be downloaded fromhttp://android.git.kernel.org/. All we have to do is to rebuild it (to avoid troublesome compiling warnings and errors, you better to replace binutils-2.17 with binutils-2.18) and install it on Linux. To build the native development tool on Windows platform, Cygwin is highly recommended. Cygwin is a Linux-like environment for Windows. It provides a collection of tools that provide Linux-like look and functions. For Cygwin installation, please go to Cygwin websitehttp://www.cygwin.com/. During the installation, please make sure you select gcc, make, termcap, Flex, bison, gettext, gettext-devel, Texinfo, libiconv, and git. Git is a free open-source distributed version control system for downloading Android source code from http://android.git.kernel.org/. Generally, not all Android source code packages are needed. The core packages include 1) Android.platform.bionic, 2) Android.platform.build, 3) Android.platform.system.core, and 4) Android.platform.system.base. With toolchain installed and Android source code downloaded, it is time to configure our gcc compile environment. In common cases, gcc will search head files in the following paths:
$toolchain/lib/gcc/arm-eabi/4.2.1/include
$toolchain/arm-eabi/sys-include
$toolchain/arm-eabi/include
Therefore, for different development purpose, we only need to copy different head files from Android source code fold to the above paths. For example, to develop Bluetooth tools on Android, we should copy Bluetooth head files to $toolchain/lib/gcc/arm-eabi/4.2.1/include.

However, Android does not support glibc. It uses bionic Libc, which is written by Google, so we have to copy all bionic Libc head files to $toolchain/lib/gcc/arm-eabi/4.2.1/include. Bionic Libc head files are in the following paths:
bionic/libc/arch-arm/include
bionic/libc/include
bionic/libstdc++/include
bionic/libc/common
bionic/libm/include
bionic/libthread_db/include
and also copy AndroidConfig.h file from system/core/include/arch/linux-arm to $toolchain/lib/gcc/arm-eabi/4.2.1/include.

Now everything is ready but the most important thing—library files. How can we get precompiled library files? Here is a trick. As we know, Android emulator has all Android precompiled library files on it. We have to pull them from the emulator. We can use a tool like Busybox to do so following the example steps:
$adb push busybox /dev/tool/busybox
$adb shell chmod 777 /dev/ tool /busybox
$adb shell ./dev/ tool /busybox tar -cf /dev/ tool /libs.tar /system/lib
$adb pull /dev/ tool /libs.tar libs.tar
Unzip libs.tar, and copy all files to $toolchain/arm-eabi/lib. Meanwhile, please copy Makefiles, armelf.x and armelf.xsc, from build/core to it.

By now, toolchain setup is finished. Write a helloworld.c to test it.

int main(int argc, char **argv) {

printf(“Hello world!/n”);

return 0;
}

Compile it.
$ arm-eabi-gcc -nostdlib -Bdynamic -Wl,-T,armelf.x -Wl,-dynamic-linker,/system/bin/linker -include AndroidConfig.h -lc -o helloworld helloworld.c
Run it on Android emulator.
Bang! Warning: cannot find entry symbol _start; defaulting to 000082c8.
Bang! Bang! Error: Segmentation fault!

What is the problem? According to Android NDK makefile, the executable binary is dynamically linked. Therefore, crtbegin_dynamic.o and crtend.o are needed. If you could find Crtbegin_dynamic.S and crtend.S in $android_src/bionic/libc/arch-arm/bionic, you would get the answer. Use the following command to compile them.
arm-eabi-gcc -mthumb-interwork -o crtbegin_dynamic.o -c crtbegin_dynamic.S
arm-eabi-gcc -mthumb-interwork -o crtend.o -c crtend.S

Now compile your helloworld.c again.
$arm-eabi-gcc -nostdlib -Bdynamic -Wl,-T,armelf.x -Wl,-dynamic-linker,/system/bin/linker -include AndroidConfig.h -lc -o hello hello.c crtbegin_dynamic.o crtend.o
And then, push it to Android emulator and run it.
$adb push hello /dev/sample/helloworld
$adb shell chmod 777 /dev/sample/helloworld
$adb shell ./dev/sample/helloworld

See, life is wonderful now!

Reference:

http://developer.android.com/guide/index.html

http://benno.id.au/blog/

http://developer.android.com/sdk/ndk/index.html

P.S. About how to compile,run and package C programs in Android, please check this out.

2019-08-24 10:19:44 tony2278 阅读数 2766

 

ERROR: unable to find the development tool 'cc' in your path

 

(base) tony2278@tony2278:~$ which cc
(base) tony2278@tony2278:~$ which gcc
/usr/bin/gcc
(base) tony2278@tony2278:~$ echo $PATH
。。。。。。

已经安装了 gcc,  但Unable to find the tool cc in your path

 

Solution

sudo apt-get gcc

 

2019-07-27 16:02:23 qq_41185868 阅读数 6258

成功解决ERROR: Unable to find the development tool `cc` in your path; please make sure that you have the

 

 

 

目录

解决问题

解决思路

解决方法


 

 

 

 

 

解决问题

NVIDIA Software Installer for Unix/Linux

ERROR: Unable to find the development tool `cc` in your path; please make    
         sure that you have the package 'gcc' installed.  If gcc is installed  
         on your system, then please check that `cc` is in your PATH.    

 

解决思路

用于Unix/Linux的Nvidia软件安装程序
错误:在您的路径中找不到开发工具“cc”;请确保已安装包“gcc”。如果系统上安装了GCC,请检查“CC”是否在您的路径中。_

 

 

解决方法

安装gcc

Ubuntu之GCC:GCC编译器的简介、安装、使用方法之详细攻略