简体   繁体   中英

Why Intellij Idea shows compatible=“no” for android emulator

Intellij Idea shows compatible="no" for every android emulator. I tried emulators with different api levels. At the same time compatible="true" for my NexusOne.

Does anyone know how it checks device/emulator for compatibility?

I have next settings in manifest:

<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="4"/>

<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.WRITE_APN_SETTINGS"/>
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>

<supports-screens
        android:largeScreens="true"
        android:normalScreens="true"
        android:smallScreens="true"
        android:anyDensity="true"
        />

It could happen because of a known bug when you install SDK while IntelliJ IDEA is running. Restarting IntelliJ IDEA should fix the problem.

尝试删除android:targetSdkVersion="4"

I've had this problem before. For me it was because I did not have some of the Android tools in my $PATH. The emulator may work regardless, but it is better to play it safe. Try adding these lines somewhere in your /home/username/.bashrc file and restart the terminal to make sure all of these tools are included.

export PATH=${PATH}:.../android-studio/bin
export PATH=${PATH}:.../android-studio/sdk
export PATH=${PATH}:.../android-studio/sdk/platforms
export PATH=${PATH}:.../android-studio/sdk/platform-tools

To test if they are included properly, just check the output of a simple command like,

$adb

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM