Linux和Windows共享文件夹:/mnt目录下没有/hgfs的解决办法
sudo apt-get install open -vm -tools
sudo mkdir /mnt/hgfs
sudo vmhgfs-fuse .host:/ /mnt/hgfs
无法查看共享文件夹解决办法
sudo vmhgfs-fuse .host:/ /mnt/hgfs/ -o allow_other -o uid=1000
报错:
fuse: mountpoint is not empty
fuse: if you are sure this is safe, use the ‘nonempty’ mount option
使用root用户操作;sudo su root
修改缓存大小,ubuntu变快
在ubuntu里面,swappiness的值的大小对如何使用swap分区是有着很大的联系的。swappiness=0的时候表示最大限度使用物理内存,然后才是swap空间,swappiness=100的时候表示积极的使用swap分区,并且把内存上的数据及时的搬运到swap空间里面。两个极端,对于ubuntu的默认设置,这个值等于60,建议修改为10。具体这样做:
1.查看你的系统里面的swappiness
cat /proc/sys/vm/swappiness
#不出意外的话,你应该看到是60
2.修改swappiness值为10
sudo sysctl vm.swappiness=10
3.但只是临时修改,重启系统后会恢复默认的60,所以,还要做一步:
sudo gedit /etc/sysctl.conf
在这个文档的最后加上这样一行:
vm.swappiness=10
4.然后保存,重启。设置就生效了。
1、关闭虚拟机电源,点击 编辑虚拟机设置 选项 常规,在右下角的 增强型虚拟键盘 中,选择果可用请使用/需要,确定
2、备份并删除虚拟机系统目录下的 后缀名为 .vmdk.lck 的文件或文件夹,重启虚拟机
本地移动文件在Linux拒绝访问:
chown -R 用户名:用户名 master
chown -R 用户名:用户名 foundation/xxx/xxx
Samba配置
samba 一个实现不同操作系统之间文件共享和打印机共享的一种SMB协议的免费软件
sudo apt install samba #安装samba
sudo vi /etc/samba/smb.conf
写入:
[share]
comment = share
browseable = yes
path = /home/si/
writable = yes
guest ok = no
read only = no
create mask = 0777
重启samba服务
sudo service smbd restart
sudo smbpasswd -a si #配置使用用户以及密码,si用户名
关闭防火墙路径:
控制面板\系统和安全\Windows Defender 防火墙\自定义设置
sudo service NetworkManager stop
sudo rm /var/lib/NetworkManager/NetworkManager.state
sudo service NetworkManager start
sudo apt-get autoremove open-vm-tools
sudo apt-get install open-vm-tools-desktop
重启ubuntu
1. 查看进程
ps aux | grep apt
这个命令将列出所有占用apt资源的进程,结果中,第一列代表用户,第二列是进程id,而我们要做的就是强制结束这个进程;
2.结束其他进程
sudo kill 进程id
3.继续执行你之前的命令
ok
error: hooks is different in /home/si/openharmony/.repo/projects/drivers/hdf_core.git vs /home/si/openharmony/.repo/project-objects/drivers_hdf_core.git
error: Cannot fetch drivers_hdf_core (GitError: --force-sync not enabled; cannot overwrite a local work tree. If you’re comfortable with the possibility of losing the work tree’s git metadata, use repo sync --force-sync drivers/hdf_core
to proceed.)
repo sync --force-sync drivers/hdf_core
client_loop: send disconnect: Broken pipe
fatal: the remote end hung up unexpectedly
fatal: the_remote end hung up unexpectedly
fatal; early EOF
fatal: index-pack failed
fatal: early EOF
fatal: index-pack failed
third_party_ffmpeg:
remote: Enurerating objects: 527204,done.
remote: Counting objects: 100%(27/27), done.
remote: Compressing objects: 100% (21/21), done.
fatal: the remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
试下强制拉取: repo sync --force-sync
[OHOS ERROR] /usr/bin/env: ‘ruby’: No such file or directory
apt-get install ruby
[OHOS ERROR] …/…/prebuilts/mingw-w64/ohos/linux-x86_64/clang-mingw/bin/clang: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory
sudo apt-get install libncurses5
[OHOS ERROR] ‘…/…/third_party/flutter/skia/third_party/externals/icu/scripts/make_data_assembly.py’:No such file or directory
sudo apt-get install python
[OHOS ERROR] FileNotFoundError: [Errno 2] No such file or directory: ‘java’
apt install openjdk-11-jre-headless # version 11.0.15+10-0ubuntu0.20.04.1, or
apt install default-jre # version 2:1.11-72
apt install openjdk-13-jre-headless # version 13.0.7+5-0ubuntu1~20.04
apt install openjdk-16-jre-headless # version 16.0.1+9-1~20.04
apt install openjdk-17-jre-headless # version 17.0.3+7-0ubuntu0.20.04.1
apt install openjdk-8-jre-headless # version 8u312-b07-0ubuntu1~20.04
[OHOS ERROR] packages/phone/make-boot.sh: line 22: genext2fs: command not found
sudo apt install genext2fs
ValueError: invalid literal for int() with base 10: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0
Set cache size limit to 100.0 GB
rm -rf out
[OHOS ERROR] ETS:ERROR File: /
rm -rf out
[OHOS ERROR] ninja: error: loading ‘build.ninja’: No such file or directory(非本人尝试)
apt-get install ninja-build
[OHOS INFO]ERROR at //foundation/multimedia/av_session/test/fuzztest/BUILD.gn:31:1: Invalid token.
[OHOS INFO] “avcontrollercallbackproxy_fuzzer:AVControllerCallbackProxyFuzzTest”,
[OHOS INFO] ^
[OHOS INFO] You got a tab character in here. Tabs are evil. Convert to spaces.
删除"avcontrollercallbackproxy_fuzzer:AVControllerCallbackProxyFuzzTest",前的tab,用空格替换
[OHOS ERROR] [34653/36849] CX obj/foundation/arkui/ace_engine/adapter/ohos/entrance/ace_ohos_standard_entrance/ ace_container.o
[OHOS ERROR] FAILED: obj/foundation/arkui/ace_engine/adapter/ohos/entrance/ace_ohos standard_entrance/ace container.o
内存给16G
[OHOS WARNING] Failed to find ccache, ccache disabled.
sudo apt-get install ccache
[OHOS ERROR] [4860/40593] ACTION //developtools/packing_tool:packing_tool(//build/toolchain/oho s:ohos_clang_arm64)
[OHOS ERROR] FAILED: obj/developtools/packing_tool/jar/haptobin_tool.jar obj/developtools/packi ng_tool/jar/app_unpacking_tool.jar obj/developtools/packing_tool/jar/app_packing_tool.jar obj/d eveloptools/packing_tool/jar
[OHOS ERROR] /usr/bin/env …/…/developtools/packing_tool/build.py --haptobin …/…/developtool s/packing_tool/adapter/ohos --haptobinOutput obj/developtools/packing_tool/jar/haptobin_tool.ja r --unpackOutput obj/developtools/packing_tool/jar/app_unpacking_tool.jar --packOutput obj/deve loptools/packing_tool/jar/app_packing_tool.jar --outpath obj/developtools/packing_tool/jar
[OHOS ERROR] obj/developtools/packing_tool/jar/haptobin_tool.jar
[OHOS ERROR] obj/developtools/packing_tool/jar/app_unpacking_tool.jar
[OHOS ERROR] obj/developtools/packing_tool/jar/app_packing_tool.jar
[OHOS ERROR] obj/developtools/packing_tool/jar
[OHOS ERROR] root_path is /home/si/openharmony64/master/developtools/packing_tool
[OHOS ERROR] obj/developtools/packing_tool/jar/haptobin_tool.jar
[OHOS ERROR] obj/developtools/packing_tool/jar
[OHOS ERROR] /home/si/openharmony64/master/out/rk3568
[OHOS ERROR] /home/si/openharmony64/master/out/rk3568/obj/developtools/packing_tool/jar exist
[OHOS ERROR] /home/si/openharmony64/master/developtools/packing_tool/META-INF/packingbin_tool/M ANIFEST.MF
[OHOS ERROR]
[OHOS ERROR] /home/si/openharmony64/master/developtools/packing_tool/haptobin.sh: line 66: java c: command not found
[OHOS ERROR]
[OHOS ERROR] Traceback (most recent call last):
[OHOS ERROR] File “/home/si/openharmony64/master/out/rk3568/…/…/developtools/packing_tool/b uild.py”, line 83, in
[OHOS ERROR] sys.exit(main())
[OHOS ERROR] File “/home/si/openharmony64/master/out/rk3568/…/…/developtools/packing_tool/b uild.py”, line 50, in main
[OHOS ERROR] raise Exception(“compile haptobin java class failed!”)
[OHOS ERROR] Exception: compile haptobin java class failed!
[OHOS INFO] ---------------------------------------------
sudo apt-get update
sudo apt install default-jdk
[OHOS ERROR] ninja: error: unknown target ‘multimedia_av_session’
1.修改板级配置,添加avsession部件:
进入vendor/hihope/rk3568目录下,修改config.json文件,添加如下内容,其中+号标记的行为要添加的内容,添加时不要包含+号
{
"component": "multimedia_media_library_standard",
"features": []
+ },
+ {
+ "component": "multimedia_av_session",
+ "features": []
}
]
},
2.打开developtools/syscap_codec/include/syscap_define.h文件,相应位置添加(非必要配置)
MULTIMEDIA_AVSESSION,
{"SystemCapability.Multimedia.AVSession", MULTIMEDIA_AVSESSION},
[OHOS ERROR] [23/89] CXX obj/foundation/multimedia/av_session/frameworks/innerkitsimpl/native/session/src/avsession_client/avsession_callback_client.o
[OHOS ERROR] FAILED: obj/foundation/multimedia/av_session/frameworks/innerkitsimpl/native/session/src/avsession_client/avsession_callback_client.o [OHOS ERROR] In file included from …/…/foundation/multimedia/av_session/frameworks/innerkitsimpl/native/session/src/avsession_callback_client.cpp:16:
[OHOS ERROR] In file included from …/…/foundation/multimedia/av_session/frameworks/innerkitsimpl/native/session/include/avsession_callback_client.h:19:
[OHOS ERROR] In file included from …/…/foundation/multimedia/av_session/services/session/ipc/include/avsession_callback_stub.h:19:
[OHOS ERROR] In file included from …/…/foundation/multimedia/av_session/services/session/ipc/include/iavsession_callback.h:19:
[OHOS ERROR] In file included from …/…/foundation/multimedia/av_session/interfaces/innerkits/native/session/include/avsession_info.h:20:
[OHOS ERROR] …/…/foundation/multimedia/av_session/interfaces/innerkits/native/session/include/avmeta_data.h:162:9: warning: array designators are a C99 extension [-Wc99-designator]
[OHOS ERROR] [META_KEY_ASSET_ID] = &AVMetaData::CloneAssetId,
[OHOS ERROR] ^~~~~~~~~~~~~~~~~~~
[OHOS ERROR] In file included from …/…/foundation/multimedia/av_session/frameworks/innerkitsimpl/native/session/src/avsession_callback_client.cpp:16:
[OHOS ERROR] In file included from …/…/foundation/multimedia/av_session/frameworks/innerkitsimpl/native/session/include/avsession_callback_client.h:19:
[OHOS ERROR] …/…/foundation/multimedia/av_session/services/session/ipc/include/avsession_callback_stub.h:43:9: warning: array designators are a C99 extension [-Wc99-designator]
[OHOS ERROR] [SESSION_CALLBACK_ON_PLAY] = &AVSessionCallbackStub::HandleOnPlay,
[OHOS ERROR] ^~~~~~~~~~~~~~~~~~~~~~~~~~
[OHOS ERROR] In file included from …/…/foundation/multimedia/av_session/frameworks/innerkitsimpl/native/session/src/avsession_callback_client.cpp:17:
[OHOS ERROR] …/…/foundation/multimedia/av_session/utils/avsession_trace.h:19:10: fatal error: ‘hitrace_meter/hitrace_meter.h’ file not found
[OHOS ERROR] #include “hitrace_meter/hitrace_meter.h”
[OHOS ERROR] ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
在av_session/utils/include目录下 vim avsession_trace.h
删除所有头文件和函数体内容
在av_session/frameworks/kitsimpl/js/session目录下 vim BUILD.gn
删除sources里面的所有内容
[OHOS INFO] ERROR at //out/rk3568/build_configs/multimedia/multimedia_av_session/BUILD.gn:45:5: Unable to load “/home/si/openharmony/foundation/multimedia/av_session/frameworks/innerkitsimpl/native/session/test/fuzztest/BUILD.gn”.
[OHOS INFO] “//foundation/multimedia/av_session/frameworks/innerkitsimpl/native/session/test/fuzztest:fuzztest”,
[OHOS INFO] ^--------------------------------------------------------------------------------------------------
找不到BUILD.gn文件
[OHOS INFO] ERROR Unresolved dependencies.
[OHOS INFO] //out/rk3568/build_configs/multimedia/multimedia_av_session:multimedia_av_session_test(//build/toolchain/ohos:ohos_clang_arm)
[OHOS INFO] needs //foundation/multimedia/av_session/services/session/server/test:fuzztest(//build/toolchain/ohos:ohos_clang_arm)
路径错误,修改为//foundation/multimedia/av_session/services/session/server/test/fuzztest:fuzztest
[OHOS ERROR] Traceback (most recent call last):
[OHOS ERROR] File “/home/si/openharmony/build/lite/hb/main.py”, line 87, in main
[OHOS ERROR] status = args.command(args)
[OHOS ERROR] File “/home/si/openharmony/build/lite/hb_internal/build/build.py”, line 130, in exec_command
[OHOS ERROR] set_product(product_name=product, company=company)
[OHOS ERROR] File “/home/si/openharmony/build/lite/hb_internal/set/set.py”, line 66, in set_product
[OHOS ERROR] product_info = Product.get_product_info(product_name, company)
[OHOS ERROR] File “/home/si/openharmony/build/lite/hb_internal/common/product.py”, line 176, in get_product_info
[OHOS ERROR] for product_info in Product.get_products():
[OHOS ERROR] File “/home/si/openharmony/build/lite/hb_internal/common/product.py”, line 42, in get_products
[OHOS ERROR] info = read_json_file(config_path)
[OHOS ERROR] File “/home/si/openharmony/build/lite/hb_internal/common/utils.py”, line 55, in read_json_file
[OHOS ERROR] data = json.load(input_f)
[OHOS ERROR] File “/home/si/openharmony/prebuilts/python/linux-x86/3.9.2/lib/python3.9/json/init.py”, line 293, in load
[OHOS ERROR] return loads(fp.read(),
[OHOS ERROR] File “/home/si/openharmony/prebuilts/python/linux-x86/3.9.2/lib/python3.9/json/init.py”, line 346, in loads
[OHOS ERROR] return _default_decoder.decode(s)
[OHOS ERROR] File “/home/si/openharmony/prebuilts/python/linux-x86/3.9.2/lib/python3.9/json/decoder.py”, line 337, in decode
[OHOS ERROR] obj, end = self.raw_decode(s, idx=_w(s, 0).end())
[OHOS ERROR] File “/home/si/openharmony/prebuilts/python/linux-x86/3.9.2/lib/python3.9/json/decoder.py”, line 353, in raw_decode
[OHOS ERROR] obj, end = self.scan_once(s, idx)
[OHOS ERROR] json.decoder.JSONDecodeError: Expecting ‘,’ delimiter: line 71 column 5 (char 1541)
[OHOS ERROR] Unhandled error: Expecting ‘,’ delimiter: line 71 column 5 (char 1541)
config.json文件少了一个‘]’该括号;
[OHOS INFO] build configs generation is complete.
[OHOS INFO] ERROR at //build/templates/cxx/cxx.gni:517:7: Script returned non-zero exit code.
[OHOS INFO] exec_script(external_deps_script, arguments, “string”)
[OHOS INFO] ^----------
[OHOS INFO] Current dir: /home/si/openharmony/out/rk3568/
疑似config.json文件错误
[OHOS ERROR] [64/111] ACTION //foundation/arkui/ace_engine/frameworks/bridge/declarative_frontend:gen_obj_js_mock_system_plugin(//build/toolchain/mingw:mingw_x86_64)
[OHOS ERROR] FAILED: mingw_x86_64/obj/foundation/arkui/ace_engine/frameworks/bridge/declarative_frontend/js_mock_system_plugin.c
[OHOS ERROR] /usr/bin/env …/…/foundation/arkui/ace_engine/build/tools/build_resource_to_bytecode.py --objcopy /home/si/openharmony/prebuilts/gcc/linux-x86/host/x86_64-w64-mingw32-4.8/x86_64-w64-mingw32/bin/objcopy --input /home/si/openharmony/out/sdk/mingw_x86_64/obj/third_party/jsframework/dist/jsMockSystemPlugin.js --output /home/si/openharmony/out/sdk/mingw_x86_64/obj/foundation/arkui/ace_engine/frameworks/bridge/declarative_frontend/js_mock_system_plugin.c --arch x86_64
[OHOS ERROR] Traceback (most recent call last):
[OHOS ERROR] File “/home/si/openharmony/out/sdk/…/…/foundation/arkui/ace_engine/build/tools/build_resource_to_bytecode.py”, line 64, in
[OHOS ERROR] sys.exit(main())
[OHOS ERROR] File “/home/si/openharmony/out/sdk/…/…/foundation/arkui/ace_engine/build/tools/build_resource_to_bytecode.py”, line 60, in main
[OHOS ERROR] resource_file_to_bytecode(input_dir, input_file, output_path)
[OHOS ERROR] File “/home/si/openharmony/out/sdk/…/…/foundation/arkui/ace_engine/build/tools/build_resource_to_bytecode.py”, line 22, in resource_file_to_bytecode
[OHOS ERROR] with open(os.path.join(input_dir, input_file), ‘rb’)
[OHOS ERROR] FileNotFoundError: [Errno 2] No such file or directory: ‘/home/si/openharmony/out/sdk/mingw_x86_64/obj/third_party/jsframework/dist/jsMockSystemPlugin.js’
ohos_multimedia_av_session.js编写错误
[OHOS ERROR] warning: unknow warning option ‘-Wno-non-c-typedef-for-linkage’; did you mean ‘-Wno-return-type-c-linkage’? [-Wunknow-warning-option]
安装依赖包:
unix_time=`date '+%s'`;for one_tools in `curl -s -k https://gitee.com/landwind/openharmony_oneclick_env_init/raw/master/apt_install.list`;do echo "apt-get install -y ${one_tools}">>/tmp/openharmony_deps_${unix_time}.sh; done;
sudo apt-get update;
sudo bash -x /tmp/openharmony_deps_${unix_time}.sh
删除out:
rm -rf out
重置工作区,删除所有修改(记得备份你改的代码):
repo forall -c "pwd;git reset --hard; git clean -fd"
更新最新代码:
repo sync -c -j8;
repo forall -c "pwd;git lfs install;git lfs pull"
执行prebuilts下载脚本:
bash build/prebuilts_download.sh
[OHOS ERROR] …/…/foundation/multimedia/av_session/frameworks/native/session/test/benchmarktest/avsession_test/avsession_test.cpp:42:45: error: expected function body after function declarator
[OHOS ERROR] void SetUp(const ::benchmark::State& state) override
[OHOS ERROR] ^
删掉override
[OHOS ERROR] …/…/foundation/multimedia/av_session/frameworks/native/session/test/benchmarktest/avsession_test/avsession_test.cpp:26:10: fatal error: ‘hilog_wrapper.h’ file not found
[OHOS ERROR] #include “hilog_wrapper.h”
删掉#include "hilog_wrapper.h"
[OHOS ERROR] …/…/foundation/multimedia/av_session/frameworks/native/session/test/benchmarktest/avsession_test/avsession_test.cpp:48:6: error: use of undeclared identifier ‘AvsessionTest’; did you mean ‘AVSessionTest’?
[OHOS ERROR] void AvsessionTest::SetUp(const ::benchmark::State& state)
[OHOS ERROR] ^~~~~~~~~~~~~
[OHOS ERROR] AVSessionTest
AvsessionTest改为AVSessionTest
[OHOS ERROR] …/…/foundation/multimedia/av_session/frameworks/native/session/test/benchmarktest/avsession_test/avsession_test.cpp:48:21: error: redefinition of ‘SetUp’
[OHOS ERROR] void AVSessionTest::SetUp(const ::benchmark::State& state)
[OHOS ERROR] ^
[OHOS ERROR] …/…/foundation/multimedia/av_session/frameworks/native/session/test/benchmarktest/avsession_test/avsession_test.cpp:80:9: error: unknown type name ‘ErrCode’; did you mean ‘OHOS::ErrCode’?
[OHOS ERROR] ErrCode errCode = (sessionId.length() == SESSION_LEN);
[OHOS ERROR] ^~~~~~~
[OHOS ERROR] OHOS::ErrCode
ErrCode前添加OHOS::
[OHOS ERROR] …/…/foundation/multimedia/av_session/frameworks/native/session/test/benchmarktest/avsession_test/avsession_test.cpp:46:21: error: reference to ‘AVSession’ is ambiguous
[OHOS ERROR] std::shared_ptr avsession_ = nullptr;
[OHOS ERROR] ^
命名空间冲突;删掉OHOS
[OHOS ERROR] …/…/foundation/multimedia/av_session/frameworks/native/session/test/benchmarktest/benchmark_avsession_test/benchmark_avsession_test.cpp:58:94: error: too few arguments to function call, expected 2, have 1
[OHOS ERROR] controller_ = AVSessionManager::GetInstance().CreateController(avsession_->GetSessionId());
[OHOS ERROR] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
缺少参数
[OHOS ERROR] json.decoder.JSONDecodeError: Expecting ‘,’ delimiter: line 64 column 5 (char 1407)
[OHOS ERROR] Unhandled error: Expecting ‘,’ delimiter: line 64 column 5 (char 1407)
/vendor/hihope/rk3568/config.json的第64行少了','
[OHOS INFO] See //foundation/multimedia/av_session/frameworks/native/session/test/benchmarktest/benchmark_avsession_test/BUILD.gn:19:1: whence it was called.
[OHOS INFO] ohos_benchmarktest(“BenchmarkTestAVSession”) {
[OHOS INFO] ^---------------------------------------------
[OHOS INFO] See //foundation/multimedia/av_session/frameworks/native/session/test/benchmarktest/BUILD.gn:21:5: which caused the file to be included.
[OHOS INFO] “benchmark_avsession_test:benchmarktest”,
[OHOS INFO] ^---------------------------------------
两个gn文件没用对应,应该把/benchmarktest/BUILD.gn里的benchmarktest改为BenchmarkTestAVSession
删掉/benchmarktest/benchmark_avsession_test/BUILD.gn里的group
[OHOS INFO] ERROR at //foundation/multimedia/av_session/frameworks/native/session/test/benchmarktest/BUILD.gn:17:3: Undefined identifier.
[OHOS INFO] deps += [
[OHOS INFO] ^—
[OHOS INFO] See //out/rk3568/build_configs/multimedia/multimedia_av_session/BUILD.gn:49:5: which caused the file to be included.
[OHOS INFO] “//foundation/multimedia/av_session/frameworks/native/session/test/benchmarktest:benchmarktest”,
[OHOS INFO] ^----------------------------------------------------------------------------------------------
/benchmarktest/BUILD.gn缺少deps = []
[OHOS INFO] ERROR at //build/templates/cxx/cxx.gni:221:7: Script returned non-zero exit code.
[OHOS INFO] exec_script(external_deps_script, arguments)
[OHOS INFO] ^----------
[OHOS INFO] Current dir: /home/si/openharmony/out/rk3568/
[OHOS INFO] Command: 。。。。。。。。。。。。。。。。。。。。。
[OHOS INFO] Returned 1 and printed out:
[OHOS INFO]
[OHOS INFO] The file ‘…/…/sdk/ohos-arm/samgr_standard/sdk_info.json’ format is incorrect.
[OHOS INFO] See //foundation/multimedia/av_session/frameworks/native/session/test/benchmarktest/avsession_controller_test/BUILD.gn:19:1: whence it was called.
[OHOS INFO] ohos_benchmarktest(“ControllerTest”) {
[OHOS INFO] ^-------------------------------------
[OHOS INFO] See //out/rk3568/build_configs/multimedia/multimedia_av_session/BUILD.gn:51:5: which caused the file to be included.
[OHOS INFO] “//foundation/multimedia/av_session/frameworks/native/session/test/benchmarktest/avsession_controller_test:benchmarktest”,
[OHOS INFO] ^------------------------------------------------------------------------------------------------------------------------
将gn文件里external_deps的"samgr_standard:samgr_proxy",
改为:"samgr:samgr_proxy",
signal 11
生成了部分用例,是内存泄漏导致:
换设备尝试成功;
原因可能是个别设备用例使用内存超出;
[OHOS ERROR] undefined symbol “OHOS::AVSession::Xxxx(xx,xx)”
1.所有函数名前加“OHOS::AVSession::”
2.把外层gn文件删掉,group加在里层gn文件
3.修改bundle.json文件
[OHOS ERROR] ld.lld: error: undefined symbol: CreatePendingPacket(unsigned int, unsigned long long)
cpp包含c语言的头文件需要加extern;
extern "C"
{
#include "xxx.h"
}
[OHOS ERROR] ld.lld: error: undefined symbol: OHOS::AVSession::AVSessionControllerStub::OnRemoteRequest(unsigned int, OHOS::MessageParcel&, OHOS::MessageParcel&, OHOS::MessageOption&)
gn里deps加:
"//foundation/multimedia/av_session/services/session:avsession_service",
注:搜索对象cpp文件,找有该cpp文件的gn文件,找到对应的依赖名字,搜索该依赖名字,查看其他地方如何写的该依赖路径
[OHOS ERROR] ld.lld: error: undefined symbol: VTT for AVSessionControllerStubTest
[OHOS ERROR] ld.lld: error: undefined symbol: vtable for AVSessionControllerStubTest
构造类的重写方法没有加作用域;
无法连接:
1.板子没有连接好
2.cmd窗口执行hdc_std kill 再执行hdc_std shell
测试框架路径不能含有中文!!!
卡在DAYU界面:
进入开机界面可以进入板子,试下这个命令,可能有用:
hdc shell
ps -ef |grep bootanimation
kill -11 //进程ID
或
在全量编译前执行:repo forall -c "git lfs pull"
或
用最新的代码尝试
git clone时fatal: unable to access ‘https://gitee.com/XXX.git/‘: The requested returned error: 403
控制面板->用户账户->管理Windows凭据->https://gitee.com(在普通凭据下)->编辑(修改为待使用的用户名与密码)
G.INC.09 按照合理的顺序包含头文件【c】
G.INC.04 禁止包含用不到的头文件【c】
#include "avsessionpixelmap_fuzzer.h"
#include "avsession_pixel_map.h"
#include "parcel.h"
修改为
#include "avsessionpixelmap_fuzzer.h"
//该cpp文件的头文件与其他头文件空一行
#include "avsession_pixel_map.h"
#include "parcel.h"
hdc_std shell
cd /data/log/faultlog/temp
拉取出cppcrash文件:
hdc_std file recv /data/local/tmp/cppcrash... D:\
利用分析工具分析问题:
在PraseCrashTool\cppcrash...工具下cmd;
输入命令:
python main.py D:\...(待分析文件路径)
打开分析出的结果,在linux中:
找到错误模块的路径
out\exe.xxx\benchamrk\xxxx
add2line -C -e ControllerTest -f 000000000d8ec
根据报错的行数找问题;