在 32 位 Ubuntu 上使用 Android-Studio
Use Android-Studio on 32 bit Ubuntu
我需要在我的 32 位机器上使用 Android-Studio。我安装了 Ubuntu,但即使在我的 phone 上执行 "Hello world",我仍然遇到问题。这就是我所做的:
- 我用 JDK 位置
更改了默认 JDK 位置
- 在应用程序的 gradle 文件中,我将 buildToolVersion 从 25 更改为 23.0.1
- 在我的应用程序的 gradle 文件中,我将类路径 'com.android.tools.build:gradle:2.3.1' 更改为类路径 'com.android.tools.build:gradle:2.2.1'
- 我在gradle文件里把compileSdk,targetSdkVersion,minSdkVersion都设置为23
- 我把编译'com.android.support:appcompat-v7:26.+'改成了编译'com.android.support:appcompat-v7:23.+'
现在我遇到了这个问题:
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。我正在修改的那个是自动生成的
我需要在我的 32 位机器上使用 Android-Studio。我安装了 Ubuntu,但即使在我的 phone 上执行 "Hello world",我仍然遇到问题。这就是我所做的:
- 我用 JDK 位置 更改了默认 JDK 位置
- 在应用程序的 gradle 文件中,我将 buildToolVersion 从 25 更改为 23.0.1
- 在我的应用程序的 gradle 文件中,我将类路径 'com.android.tools.build:gradle:2.3.1' 更改为类路径 'com.android.tools.build:gradle:2.2.1'
- 我在gradle文件里把compileSdk,targetSdkVersion,minSdkVersion都设置为23
- 我把编译'com.android.support:appcompat-v7:26.+'改成了编译'com.android.support:appcompat-v7:23.+'
现在我遇到了这个问题:
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。我正在修改的那个是自动生成的