Installation failed with message INSTALL_FAILED_TEST_ONLY

本文介绍了如何解决在使用旧版Android Studio编译新版项目时出现的错误提示,并提供了具体的配置方法来避免升级IDE。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

从GitHub上下载了个Ddmo,编译时出现以下错误提示:

Error:This Gradle plugin requires a newer IDE able to request IDE model level 3. For Android Studio this means version 3.0+

    之前也有遇到过此类问题,我用的Android Studio2.3.3,为了项目合作一直也没升级Android Studio3.0。但是最近发现好多demo都是3.0了。怎么办?

不升级Android Studio解决这个问题的办法:

   在gradle.properties文件中添加

   android.injected.build.model.only.versioned = 3

 之后我遇到了新的问题,调试安装时提示:

 Installation failed with message INSTALL_FAILED_TEST_ONLY.

 解决办法:再在在gradle.properties文件中添加

   android.injected.testOnly=false

 再次编译调试安装OK了。

 Installation failed with message INSTALL_FAILED_TEST_ONLY.

 android.injected.testOnly=false

 

derrick@derrick-VMware-Virtual-Platform:~/OpenXR-SDK/build$ cmake -DCMAKE_SYSTEM_NAME=Linux \ -DCMAKE_SYSTEM_PROCESSOR=aarch64 \ -DCMAKE_C_COMPILER=/opt/industio/evb3568-qt5.14-host-sdk/bin/aarch64-linux-gcc \ -DCMAKE_CXX_COMPILER=/opt/industio/evb3568-qt5.14-host-sdk/bin/aarch64-linux-g++ \ -DCMAKE_INSTALL_PREFIX=./install \ -DBUILD_TESTS=OFF \ .. -- The C compiler identification is GNU 9.3.0 -- The CXX compiler identification is GNU 9.3.0 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /opt/industio/evb3568-qt5.14-host-sdk/bin/aarch64-linux-gcc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /opt/industio/evb3568-qt5.14-host-sdk/bin/aarch64-linux-g++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Found Python3: /usr/bin/python3 (found version "3.12.3") found components: Interpreter -- Performing Test HAVE_FILESYSTEM_IN_STD -- Performing Test HAVE_FILESYSTEM_IN_STD - Failed -- Performing Test HAVE_FILESYSTEM_IN_STDEXPERIMENTAL -- Performing Test HAVE_FILESYSTEM_IN_STDEXPERIMENTAL - Success -- Performing Test HAVE_FILESYSTEM_IN_STD_17 -- Performing Test HAVE_FILESYSTEM_IN_STD_17 - Failed -- Performing Test HAVE_FILESYSTEM_WITHOUT_LIB -- Performing Test HAVE_FILESYSTEM_WITHOUT_LIB - Failed -- Performing Test HAVE_FILESYSTEM_NEEDING_LIBSTDCXXFS -- Performing Test HAVE_FILESYSTEM_NEEDING_LIBSTDCXXFS - Success -- Performing Test HAVE_FILESYSTEM_NEEDING_LIBCXXFS -- Performing Test HAVE_FILESYSTEM_NEEDING_LIBCXXFS - Failed CMake Warning at src/CMakeLists.txt:33 (find_package): By not providing "FindSanitizers.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "Sanitizers", but CMake did not find one. Could not find a package configuration file provided by "Sanitizers" with any of the following names: SanitizersConfig.cmake sanitizers-config.cmake Add the installation prefix of "Sanitizers" to CMAKE_PREFIX_PATH or set "Sanitizers_DIR" to a directory containing one of the above files. If "Sanitizers" provides a separate development package or SDK, be sure it has been installed. -- Could NOT find OpenGL (missing: OPENGL_opengl_LIBRARY OPENGL_glx_LIBRARY) -- Could NOT find Vulkan (missing: Vulkan_LIBRARY) (found version "1.3.275") -- Performing Test CMAKE_HAVE_LIBC_PTHREAD -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed -- Looking for pthread_create in pthreads -- Looking for pthread_create in pthreads - not found -- Looking for pthread_create in pthread -- Looking for pthread_create in pthread - found -- Found Threads: TRUE -- Found JsonCpp: /usr/include/jsoncpp -- Presentation backend selected for hello_xr, loader_test, conformance: xlib -- Could NOT find X11 (missing: X11_X11_LIB) -- Found PkgConfig: /usr/bin/pkg-config (found version "1.8.1") -- Checking for one of the modules 'xcb' -- Checking for one of the modules 'xcb-glx' -- Checking for one of the modules 'wayland-client' -- BUILD_WITH_XLIB_HEADERS: OFF -- BUILD_WITH_XCB_HEADERS: OFF -- BUILD_WITH_WAYLAND_HEADERS: ON CMake Error at src/cmake/presentation.cmake:48 (message): xlib backend selected, but BUILD_WITH_XLIB_HEADERS either disabled or unavailable due to missing dependencies. Call Stack (most recent call first): src/CMakeLists.txt:264 (include) -- Configuring incomplete, errors occurred!
最新发布
08-09
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值