首页 > 解决方案 > 我正在使用 ubuntu 操作系统。当我在Android studio中运行模拟器时,它等待了很长时间并关闭

问题描述

您好,我的名字是 Oguzhan,我有一个问题,我使用的是 ubuntu 操作系统。当我在 Android Studio 中运行模拟器时,它会等待很长时间并关闭。

在 Windows 操作系统中不会出现此问题。我的电脑同时安装了 windows 和 ubuntu(双启动)

https://user-images.githubusercontent.com/40228440/63114849-90684000-bf9e-11e9-9629-da341c1992a9.png 这里

https://user-images.githubusercontent.com/40228440/63113708-ca841280-bf9b-11e9-8bb5-7cc2d0d2814c.png 这里

https://user-images.githubusercontent.com/40228440/63114848-8fcfa980-bf9e-11e9-8e48-ccecf358e8e1.png

https://user-images.githubusercontent.com/40228440/63114846-8fcfa980-bf9e-11e9-8a27-6fe5fb8130a9.png

https://user-images.githubusercontent.com/40228440/63114845-8fcfa980-bf9e-11e9-901f-5ae4d985faa1.png

构建.gradle

    buildscript {
    repositories {
        google()
        jcenter()

    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.4.2'


        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        google()
        jcenter()

    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

build.grade 模块

apply plugin: 'com.android.application'

android {
    compileSdkVersion 29
    buildToolsVersion "29.0.2"
    defaultConfig {
        applicationId "com.example.myapplication"
        minSdkVersion 14
        targetSdkVersion 29
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'androidx.appcompat:appcompat:1.1.0-rc01'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test:runner:1.2.0'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
}

标签: androidandroid-studioubuntuandroid-emulator

解决方案


推荐阅读