简体   繁体   English

Eclipse项目移至Android Studio。 minsdk版本中有错误

[英]Eclipse project move to Android Studio. There is error in minsdk version

I imported my project from Eclipse to to Android Studio . 我将项目从Eclipse导入to Android Studio When I built project I take error message below: 构建项目时,出现以下错误消息:

 Error:Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed : uses-sdk:minSdkVersion 10 cannot be smaller than version 14 declared in library [com.google.android.gms:play-services:11.0.0] C:\Users\Ahmet\Documents\edx\Android\WonderkidandTransfersforFM17\app\build\intermediates\exploded-aar\com.google.android.gms\play-services\11.0.0\AndroidManifest.xml
    Suggestion: use tools:overrideLibrary="com.google.android.gms.play_services" to force usage

I tried change minsdk version and I tried add tools:overrideLibrary="com.google.android.gms.play_services" in manifest. 我尝试更改minsdk版本,并尝试在清单中添加tools:overrideLibrary="com.google.android.gms.play_services" I can't solve this problem. 我不能解决这个问题。

 Manifest.xml

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.ahmety.wonderkidandtransfersforfm17"
android:versionCode="24"
android:versionName="1.3" >

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



build.gradle

apply plugin: 'com.android.application'

android {
    compileSdkVersion 22
    buildToolsVersion "25.0.2"
    defaultConfig {
        applicationId "com.ahmety.wonderkidandtransfersforfm17"
        minSdkVersion 10
        targetSdkVersion 17
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
        }
    }
    productFlavors {
    }
    }

    dependencies {
    compile 'com.android.support:support-v4:22.2.1'
    compile 'com.google.android.gms:play-services:+'
    compile files('libs/OneSignalSDK.jar')
   }

You do not need a Jar file for OneSignal. 您不需要OneSignal的Jar文件。

compile 'com.onesignal:OneSignal:3.5.7'

And never use a + as a version or compile all the Google Play Services 绝不要使用+作为版本或编译所有的Google Play服务

compile 'com.google.android.gms:play-services:+'

Please choose only those that you actually need. 请仅选择您实际需要的那些。

https://developers.google.com/android/guides/setup#split https://developers.google.com/android/guides/setup#split

For example, 例如,

compile 'com.google.android.gms:play-services-ads:11.0.0'

Regarding the error, you need to change android:minSdkVersion="10" to be version 14, as it says. 关于错误,您需要将android:minSdkVersion="10"更改为版本14,如其所说。

You need to change the "minSdkVersion" from 10 to 14 in both "manifest" and "build.gradle". 您需要将“清单”和“ build.gradle”中的“ minSdkVersion”从10更改为14。 Otherwise you need to downgrade the version of "Google Play Services" library, I won't recommend that. 否则,您需要降级“ Google Play服务”库的版本,我不建议您这样做。 I'll suggest you to just change the "minSdkVersion" from 10 to 14. I won't make difference to your app because I don't think people are still using Android devices of version 10. 我建议您将“ minSdkVersion”从10更改为14。我不会对您的应用有所影响,因为我认为人们仍不会使用版本10的Android设备。

Sync your project after changing the "minSdkVersion". 更改“ minSdkVersion”后,同步项目。

在此处输入图片说明

您使用的库要求清单中的minSdkVersion至少为14。您需要将minSdkVersion设置为14或更大。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Android Studio无法运行minsdk - Android Studio cant run minsdk 将eclipse项目导入Android studio - 错误“此项目指的是Eclipse工作区...” - Import eclipse project to Android studio - error “this project refers to Eclipse workspace…” 在Android Studio中导入Eclipse项目时出错 - Error in importing Eclipse project in android Studio 我无法在android studio中创建项目。 显示插件错误。 也无法加载包括Java Gradle在内的许多插件 - I am not able to create project in android studio. Plugin error is showing. Also many plugin including java gradle could not be loaded 我无法在 android studio 上运行我的项目。 每当我尝试下载模拟器时,它都会显示以下错误 - I am not able to run my project on android studio. It is showing the following error whenever I try to download emulator 无法初始化AccountKit Android Studio。 初始化错误501 - unable to Initialize AccountKit android studio. Initialization Error 501 Gradle无法解决Android Studio中的依赖关系。 那是我的错误 - Gradle fails to resolve dependencies in Android Studio. That Is My Error 不应在 android 清单文件中声明 minSdk 版本 - The minSdk version should not be declared in the android manifest file 从Eclipse导入android项目到Android Studio时发生错误 - Error Occurred while importing android project from Eclipse to Android Studio 我在 android 工作室中遇到错误。 语言 java,使用最新的 bumblebee android studio - I am getting an error in android studio. language java, using latest bumblebee android studio
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM