为什么Intellij Idea显示兼容=“否”对于安卓模拟器
Intellij Idea 对每个 Android 模拟器都显示兼容=“否”。我尝试了不同 api 级别的模拟器。同时我的 NexusOne 也兼容=“true”。
有谁知道它如何检查设备/模拟器的兼容性?
我在清单中有下一个设置:
<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"
/>
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"
/>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
发生这种情况的原因可能是在 IntelliJ IDEA 运行时安装 SDK 时出现已知错误。重新启动 IntelliJ IDEA 应该可以解决该问题。
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"
Try removing
android:targetSdkVersion="4"
我以前也遇到过这个问题。对我来说,这是因为我的 $PATH 中没有一些 Android 工具。不管怎样,模拟器都可以工作,但最好还是安全一点。尝试将这些行添加到 /home/username/.bashrc 文件中的某个位置,然后重新启动终端以确保包含所有这些工具。
要测试它们是否正确包含,只需检查一个简单命令的输出,例如:
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.
To test if they are included properly, just check the output of a simple command like,