Andriod and Java Develop Study Notes

本文详细介绍了在Android开发中如何添加JNI依赖,更改启动活动,以及在Windows环境下安装配置MySQL服务的方法。此外,还提供了使用Eclipse配置Spring Boot支持,通过STS插件或Maven插件创建项目,以及在Windows上配置Tomcat的步骤。

How to Add JNI so Dependent

1.Copy the the jni so dependent to the libs folder.
2.Go to the “app” node, touch right mouse button, follow the click sequence you will finish the so dependent Add.
New=>Folder=>JNI Folder
the you will see such code segment was add in “build.gradle”

    sourceSets {
        main {
            jni.srcDirs = ['libs', 'src/main/jni', 'src/main/jni/']
        }
    }

Chane the jni.srcDirs to your so location.

How to Change Android Launch Activity

Android project default launch activity is MainActivity, if we wanto change to other Customer Activity we can do like this:
Move "intent-filter segment " below your customer activity.

        <activity android:name=".CUIDemo">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity android:name=".MainActivity">
        </activity>

Install and Config MySql Service on Windows

  1. Get the MySql Binary Packge
    https://dev.mysql.com/downloads/mysql/
    Here my download version is mysql-5.7.24-winx64.zip
  2. Unzip you mysql zip package into ProgramFile folder and Set Envirment Variable.
    Set MYSQL_HOME=C:\Program Files\mysql-5.7.28-winx64 .
    Add %MYSQL_HOME%/bin int to PATH.
  3. Create a Config file in your MYSQL_HOME directory,named my.ini, like this;
[mysql]
# 设置mysql客户端默认字符集
default-character-set=utf8
[mysqld]
#设置3306端口
port = 3306
# 设置mysql的安装目录
basedir=C:\Program Files\mysql-5.7.28-winx64
# 设置mysql数据库的数据的存放目录
datadir=D:\data
# 允许最大连接数
max_connections=200
# 服务端使用的字符集默认为8比特编码的latin1字符集
character-set-server=utf8
# 创建新表时将使用的默认存储引擎
default-storage-engine=INNODB
  1. Config Mysql
    Open the Command line tools as administrator and input the config command as bellow, you will got a temp root password.
C:\Program Files\mysql-5.7.28-winx64\bin>mysqld --initialize --user=mysql --console --explicit_defaults_for_timestamp
2019-11-29T03:28:08.810091Z 0 [Warning] InnoDB: New log files created, LSN=45790
2019-11-29T03:28:08.845207Z 0 [Warning] InnoDB: Creating foreign key constraint system tables.
2019-11-29T03:28:08.914930Z 0 [Warning] No existing UUID has been found, so we assume that this is the first time that this server has been started. Generating a new UUID: 439f23bc-1258-11ea-b246-54ee75fb1a80.
2019-11-29T03:28:08.918136Z 0 [Warning] Gtid table is not ready to be used. Table 'mysql.gtid_executed' cannot be opened.
2019-11-29T03:28:10.302927Z 0 [Warning] CA certificate ca.pem is self signed.
2019-11-29T03:28:11.332799Z 1 [Note] A temporary password is generated for root@localhost: ?,MSH<faM2Y<
  1. Install Mysql
C:\Program Files\mysql-5.7.28-winx64\bin>mysqld -install
Service successfully installed.
  1. Login Mysql
C:\Program Files\mysql-5.7.28-winx64\bin>mysql -u root -p
Enter password: ************
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.7.28
  1. Change Passward for Root
mysql> set password for root@localhost=password('123');
Query OK, 0 rows affected, 1 warning (0.00 sec)

10.Unstall Mysql

net stop mysql
mysqld-nt -install
mysqld-nt -remove
sc delete mysql

Eclipse Config Spring Boot Support

Create Project Use STS Plugin

  • Install STS Plugin
    Open Help->Eclipse Marketplace->Find “sts”, then you will see the STS plugin info. installed it and re-start eclipse.
  • Create a Spring Boot Project
    Click File->New->Project->Spring Boot->Spring Starter Project->Next->Finish Then you will got a Spring boot Project.
  • Start the Project
    Click The Project in the sln view, Run As ->Spring boot app, then your Project will be run.

Create Project Use Maven Plugin

Config Tomcat for Windows

1.Get the binary install package
https://tomcat.apache.org/
I got the version is “apache-tomcat-9.0.29-windows-x64.zip”
2.Install JDK
Get the binary source for Oracle official website, unzip to your install location, then configured the environment variable such as JAVA_HOME, then run Java - version to check if it work fine. mine environment configured like this:

C:\Users\heyx1>java -version
java version "1.8.0_181"
Java(TM) SE Runtime Environment (build 1.8.0_181-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.181-b13, mixed mode)

3.Tomcat Configured

  • Add CATALINA_BASE System Environment Variable
    Set CATALINA_BASE=C:\Program Files\apache-tomcat-9.0.29-windows-x64\apache-tomcat-9.0.29\
  • Add CATALINA_HOME System Environment Variable
    Set CATALINA_HOME=C:\Program Files\apache-tomcat-9.0.29-windows-x64\apache-tomcat-9.0.29\
  • Add Classpath System Environment Variable
    Set Classpath =.;%JAVA_HOME%\lib;TOMCAT_HOME%\lib
  • Add JRE_HOME System Environment Variable
    JRE_HOME=C:\Program Files\Java\jdk1.8.0_181\jre or %JAVA_HOME%\jre\bin
  • Update Path Tomcat and java Path:
    ;%JAVA_HOME%\bin;%JAVA_HOME%\jre\bin;%CATALINA_HOME%\bin;%CATALINA_HOME%\lib
  • Run Tomcat Server:
    Enter TOMCAT_HOME\bin directory, run startup.bat and service.bat install as administrator.
C:\Program Files\apache-tomcat-9.0.29-windows-x64\apache-tomcat-9.0.29\bin>startup.bat
Using CATALINA_BASE:   "C:\Program Files\apache-tomcat-9.0.29-windows-x64\apache-tomcat-9.0.29"
Using CATALINA_HOME:   "C:\Program Files\apache-tomcat-9.0.29-windows-x64\apache-tomcat-9.0.29"
Using CATALINA_TMPDIR: "C:\Program Files\apache-tomcat-9.0.29-windows-x64\apache-tomcat-9.0.29\temp"
Using JRE_HOME:        "C:\Program Files\Java\jdk1.8.0_181\jre"
Using CLASSPATH:       "C:\Program Files\apache-tomcat-9.0.29-windows-x64\apache-tomcat-9.0.29\bin\bootstrap.jar;C:\Program Files\apache-tomcat-9.0.29-windows-x64\apache-tomcat-9.0.29\bin\tomcat-juli.jar"

C:\Program Files\apache-tomcat-9.0.29-windows-x64\apache-tomcat-9.0.29\bin>service.bat install
Installing the service 'Tomcat9' ...
Using CATALINA_HOME:    "C:\Program Files\apache-tomcat-9.0.29-windows-x64\apache-tomcat-9.0.29"
Using CATALINA_BASE:    "C:\Program Files\apache-tomcat-9.0.29-windows-x64\apache-tomcat-9.0.29"
Using JAVA_HOME:        "C:\Program Files\Java\jdk1.8.0_181"
Using JRE_HOME:         "C:\Program Files\Java\jdk1.8.0_181\jre"
Using JVM:              "C:\Program Files\Java\jdk1.8.0_181\jre\bin\server\jvm.dll"
The service 'Tomcat9' has been installed.

内容概要:本文围绕EKF SLAM(扩展卡尔曼滤波同步定位与地图构建)的性能展开多项对比实验研究,重点分析在稀疏与稠密landmark环境下、预测与更新步骤同时进行与非同时进行的情况下的系统性能差异,并进一步探讨EKF SLAM在有色噪声干扰下的鲁棒性表现。实验考虑了不确定性因素的影响,旨在评估不同条件下算法的定位精度与地图构建质量,为实际应用中EKF SLAM的优化提供依据。文档还提及多智能体系统在遭受DoS攻击下的弹性控制研究,但核心内容聚焦于SLAM算法的性能测试与分析。; 适合人群:具备一定机器人学、状态估计或自动驾驶基础知识的科研人员及工程技术人员,尤其是从事SLAM算法研究或应用开发的硕士、博士研究生和相关领域研发人员。; 使用场景及目标:①用于比较EKF SLAM在不同landmark密度下的性能表现;②分析预测与更新机制同步与否对滤波器稳定性与精度的影响;③评估系统在有色噪声等非理想观测条件下的适应能力,提升实际部署中的可靠性。; 阅读建议:建议结合MATLAB仿真代码进行实验复现,重点关注状态协方差传播、观测更新频率与噪声模型设置等关键环节,深入理解EKF SLAM在复杂环境下的行为特性。稀疏 landmark 与稠密 landmark 下 EKF SLAM 性能对比实验,预测更新同时进行与非同时进行对比 EKF SLAM 性能对比实验,EKF SLAM 在有色噪声下性能实验
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值