在 32 位 Ubuntu 上使用 Android-Studio

Use Android-Studio on 32 bit Ubuntu

我需要在我的 32 位机器上使用 Android-Studio。我安装了 Ubuntu,但即使在我的 phone 上执行 "Hello world",我仍然遇到问题。这就是我所做的:

现在我遇到了这个问题:

Error:(11) No resource identifier found for attribute 'roundIcon' in package 'android'

如果我尝试从清单中删除 roundIcon 属性,它会再次出现,所以我认为清单是由放置属性 roundIcon 的其他东西生成的,API 23 不支持它。有人,请帮我在 32 位机器上编码 Android 这是我在应用程序标签下的清单:

<application
    android:allowBackup="true"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:roundIcon="@mipmap/ic_launcher_round"
    android:supportsRtl="true"
    android:theme="@style/AppTheme" >
    <activity android:name="com.example.root.gbu.MainActivity" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
</application>

在您的 build.gradle 文件中:

android {
    compileSdkVersion 25
    buildToolsVersion "25.0.0"
    defaultConfig {
        minSdkVersion 23
        targetSdkVersion 25
    }
}

roundIcon 属性需要 SDK 25。您需要在 build.gradle 文件中设置该 SDK。

最后,我注意到我修改了错误的清单文件,正确的路径是app->manifest->AndroidManifest.xml。我正在修改的那个是自动生成的