Android development, often in the Java code and the JNI layer passed between the array (byte[]), a typical application is the Java layer to send the data sent to the client stream to the JNI layer, by the JNI layer socket code sent out, of course, The JNI layer also needs to return the data stream received from the socket to the Java layer. I summarized briefly, from the Java layer to the JNI layer, from the JNI layer to the Java layer, there are 3 ki
closed.
Test results:java : Java new 5000s waste 3ms c++ : c++ new 5000s Waste 18ms java : java new 10000s Waste 5ms c++ : c++ new 10000s waste 24ms Span class= "http" >java : java new 50000s waste 44ms c++ : c++ new 50000s waste 121ms java : java new 100000s waste 65ms c++ : c++ new 100000s waste 259ms This time, the results show that if the cache method ID and Jclass can be shortened by half the time. But still less fast than Java. It's also good to understand that C + + creat
closed.
Test results:java : Java new 5000s waste 3ms c++ : c++ new 5000s Waste 18ms java : java new 10000s Waste 5ms c++ : c++ new 10000s waste 24ms Span class= "http" >java : java new 50000s waste 44ms c++ : c++ new 50000s waste 121ms java : java new 100000s waste 65ms c++ : c++ new 100000s waste 259ms This time, the results show that the cache method ID and Jclass can be shortened by half the time. But still less fast than Java. This is also very well understood. C + + cr
(r.layout.new_layout);InitData ();Set the data returned to the previous pageSetbackdata ();}private void InitData () {textview= (TextView) Findviewbyid (R.id.text);button= (Button) Findviewbyid (R.id.button1);Get the data transferred from the last page put in intent.Intent=this.getintent ();Bundle=intent.getextras ();Sex=bundle.getstring ("Sex");Height=bundle.getdouble ("height");if (Sex.equals ("M")) {sextext= "Male";}else{sextext= "female";}Getweight ();}private void Getweight () {if (Sex.equ
calculation does not calculate the transfer value?
* OK, then the following example we test ...
* @author Yong.wang
* * */public
class MyApplication extends application {
private String name ;
@Override public
void OnCreate () {
super.oncreate ();
SetName (NAME); Initialize global variable
} public
String GetName () {return
name;
}
public void SetName (String name) {
this.name = name;
}
private static final String NA
Ubuntu 64 bit under the Android environment, to tell the truth, really have to spend a bit of energy, solve a problem, and come out with a new problem.Small series yesterday just finally set up the environment of Android, this does not, just built a project, directly on the error, the following is a list of several:1. Libstdc++.so.6:cannot open Shared object file
= (*env)->newbytearray (Env,len); (*env)->setbytearrayregion (env, ByteArray, 0, len, buffer); CLS = (*env)->getobjectclass (env, retobj); FID = (* ENV)->getfieldid (env, CLS, "Retbytes", "[B"]); (*env)->setobjectField (env, retobj, FID, ByteArray); 4. How to return a string in C to java Char charstr[50]; Jstring jstr;jstr = env-Newstringutf (CHARSTR);5. How much space does not know how to use buffer, how to pass out? In the JNI C file, new out of sp
Android AMAP: Multiple Marker + custom pop-up window InfoWindow + anti-encoding Coordinate Transfer address, markerinfowindow
1,
Currently, the latest jar: AMap_Search_V5.7.0_20171229.jar can be downloaded from the official website.
2. Create an object class, which contains four parameters used to describe vertex information-MarketBean
Public class MarketBean {/***** latitude */private double latitude;/**
to set the correct update source and use apt-get. apt-get is a Linux Command, it is mainly used to search, install, upgrade, and uninstall software or operating systems from software warehouses on the Internet.
The apt-get command generally requires the root permission for execution, so it is generally followed by The sudo command.
Sudo apt-get install git-core curl
This command installs git-core and curl from the software repository on the Internet.
Curl is a
. Changed Ubuntu. Ubuntu has poor performance. You cannot set shadow...
Author:The dust of the world
Reprinted please indicate the source: Http://blog.csdn.net/shulianghan/article/details/20855541.
1. Install Android Studio
(1) download the Android Studio development environment
: Http://developer.android.com/sdk/ins
the correct update source and use apt-Get. APT-get is a Linux Command, it is mainly used to search, install, upgrade, and uninstall software or operating systems from software warehouses on the Internet.
The apt-GET command generally requires the root permission for execution, so it is generally followed by The sudo command.
Sudo apt-Get install Git-core curl
This command installs Git-core and curl from the software repository on the Internet.
Curl is a Fil
:
Warning: commands will be executed using/bin/shAt> Cd ~ /At> mkdir tst899At>
Run the following commands to enter the root directory of a specific project and run the compilation command. Press Ctrl + D to exit the command line. Then, run the ATQ command to check how many scheduled tasks have been submitted.
========================================================== ========================================================== ========================================================== ====
When S
Android development under Ubuntu, found that their mobile phone even if the USB connection, USB debugging or not connected, has always been displayed??????. Baidu a lot, found to change the "/etc/udev/rules.d/50-android.rules" file, but the problem came, this is specifically for a mobile phone to use, in case you use someone else's phone debugging it? oh,shit! Ch
.
Do the following:
Copy Code code as follows:
ubuntu@ubuntu:~$ ls-a//You can find a hidden file with "." Beginning:. Android
ubuntu@ubuntu:~$ CD. Android/
After reading the previous books, I have a certain understanding of Linux kernel and Android. Do you want to compile your own Android source code? I am always used to using Windows, but Android source code does not support compiling on Windows. Therefore, I decided to use a virtual machine to install Ubuntu and then do
parameters, the Linux kernel image defaults to the Kernel-qemu file in the ~/android/prebuilt/android-arm/kernel directory. The Android image file uses the system.img, userdata.img, and ramdisk.img in the Android_product_out directory by default, which is the image problem
2. create a directory for storing Android source code and initialize the version.
Sudo chmod a + x repo
Cd ..
Mkdir source
Cd source
../Bin/repo init-u https://android.googlesource.com/platform/manifest
To download the branch of android4.0, run the following command:
../Bin/repo init-u https://android.googlesource.com/platform/manifest-B android-4.0.1_r1
The-B parameter is used for the conversion
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.