0

I am following this guide in order to develop a simple hello world application for Android Automotive using Android Studio.

I have downloaded the Volvo Polestar 2 system image as you can see here:

enter image description here

and here:

enter image description here

Then I have created two classes as suggested by the guide and created the emulator:

enter image description here

enter image description here

enter image description here

enter image description here

But if I run the app I get:

07/07 12:17:56: Launching 'automotive' on Polestar 2 API 29. Error while waiting for device: The emulator process for AVD Polestar_2_API_29 has terminated.

  • How do I solve?

This is the gradle file:

plugins {
    id 'com.android.application'
}

android {
    compileSdk 32

    defaultConfig {
        applicationId "com.example.demo"
        minSdk 29
        targetSdk 32
        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 'androidx.appcompat:appcompat:1.4.2'
    testImplementation 'junit:junit:4.13.2'
    androidTestImplementation 'androidx.test.ext:junit:1.1.3'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'

    implementation "androidx.car.app:app-automotive:1.2.0-rc01"
}
tail
  • 355
  • 2
  • 11
  • 1
    I think it may be related to Apple's M1 chips. The emulator runs fine on my Windows desktop, but I get the same error as you when I launch it on M1 MacBook Pro. – Vratislav Jindra Aug 18 '22 at 12:52

2 Answers2

1

The problem is related to Apple's M1 chips, since Polestar system image is based on x86_64 architecture while Silicon M1 is based on ARM. There is no particular solution for this problem, outside of using ad emulator.

tail
  • 355
  • 2
  • 11
0

Well, of course, it is related to the M1 chip. Polestar image is for x86_64 system, macbook pro m1 has arm system. So both volvo and polestar image won’t work.

What you can do is to download Android Studio Electric Eel Preview for Macbook Pro M1, it has Google Automotive OS API 32 emulator for arm.

Imron Gamidli
  • 91
  • 1
  • 7