小编Chi*_*jib的帖子

从Android模拟器运行apk文件时出现错误"设备未找到"

我试图从命令提示符安装apk文件,但收到错误" 未找到设备 ".

android apk

17
推荐指数
1
解决办法
2万
查看次数

NDK 未配置。使用SDK管理器下载。首选 NDK 版本是“21.0.6113669”

我已经安装了 NDK 版本“21.0.6113669”,但当我尝试将项目与 Gradle 文件同步时,出现以下错误:

NDK not configured. Download it with SDK manager. Preferred NDK version is '21.0.6113669'. 
Update NDK version to 21.0.6113669 and sync project
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述

请在我的 build.gradle 下面找到

buildscript {
    repositories {
        jcenter()
        google()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:4.0.0'
    }
}

plugins {
  id "com.android.application"
}

android {
    compileSdkVersion project.properties.compileSdkVersion.toInteger()
    ndkVersion '21.0.6113669'
        
    dependencies {
        implementation "androidx.annotation:annotation:1.1.0"
        implementation "androidx.viewpager:viewpager:1.0.0"
        implementation "androidx.drawerlayout:drawerlayout:1.1.0"
        implementation project(":terminal-view")
    }

    defaultConfig {
        applicationId "com.termux"
        minSdkVersion project.properties.minSdkVersion.toInteger()
        targetSdkVersion project.properties.targetSdkVersion.toInteger()
        versionCode 101
        versionName "0.101"

        externalNativeBuild {
            ndkBuild { …
Run Code Online (Sandbox Code Playgroud)

android gradle android-ndk build.gradle android-gradle-plugin

5
推荐指数
1
解决办法
8722
查看次数