2016-03-07 146 views
0

我已经从Eclipse导入项目到Android Studio。 Eclipse中的项目有google-play-services_libsapp_compat-V7库。当进口他们成为摇篮单位,而现在当我想要做一个“重建”项目的它会引发这个错误:从Eclipse导入项目到Android Studio的问题

http://imgur.com/089Mu0M

为什么标记Manifest.XML为一个错误,如果它实际上不具有错误?下面是该文件:

<?xml version="1.0" encoding="utf-8"?> 
<manifest xmlns:android="http://schemas.android.com/apk/res/android" 
    package="com.puntoalerta.mx.pa_nic" 
    android:versionCode="23" 
    android:versionName="2.4.1" > 

<uses-sdk 
    android:minSdkVersion="8" 
    android:required="false" 
    android:targetSdkVersion="22" /> 
<permission 
    android:name="com.puntoalerta.mx.pa_nic.MAPS_RECEIVE" 
    android:protectionLevel="signature" /> 

<uses-permission android:name="com.puntoalerta.mx.pa_nic.MAPS_RECEIVE" /> 
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" /> 
<!-- Required to show current location --> 
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> 
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> 
<!-- Required OpenGL ES 2.0. for Maps V2 --> 
<uses-feature 
    android:glEsVersion="0x00020000" 
    android:required="true" /> 
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" > 
</uses-permission> 
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> 
<uses-permission android:name="android.permission.INTERNET" /> 
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> 
<uses-permission android:name="android.permission.READ_PHONE_STATE" /> 
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> 
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" /> 
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /> 
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> 
<uses-permission android:name="android.permission.WRITE_SECURE_SETTING" /> 
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" /> 
<uses-permission 
    android:name="android.permission.CALL_PHONE" 
    android:required="false" /> 
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" /> 
<uses-permission android:name="android.permission.CHANGE_CONFIGURATION" /> 
<uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" /> 
<uses-permission 
    android:name="android.permission.VIBRATE" 
    android:required="false" /> 

<uses-feature 
    android:name="android.hardware.telephony" 
    android:required="false" /> 

<permission 
    android:name="com.puntoalerta.mx.pa_nic.permission.C2D_MESSAGE" 
    android:protectionLevel="signature" /> 

<uses-permission android:name="com.puntoalerta.mx.pa_nic.permission.C2D_MESSAGE" /> 
<uses-permission android:name="android.permission.GET_ACCOUNTS" /> 
<uses-permission android:name="android.permission.WAKE_LOCK" /> 
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" /> 
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" /> 
<uses-permission android:name="android.permission.WRITE_SETTINGS"/> 


<application 
    android:allowBackup="true" 
    android:icon="@drawable/ic_launcher" 
    android:label="@string/app_name" 
    android:theme="@style/Theme.AppCompat.Light.DarkActionBar" 
    > 
    <!-- Goolge API Key --> 
    <meta-data 
     android:name="com.google.android.maps.v2.API_KEY" 
     android:value="AIzaSyAfx0D8aof8wQZJYcPRcRmtI5_LGfcjcXQ" /> 
    <service android:name="com.puntoalerta.mx.pa_nic.ServicioPA_nic" > 
    </service> 

    <service android:name="com.puntoalerta.mx.pa_nic.Fire" > 
    </service> 
    <service android:name="com.puntoalerta.mx.pa_nic.Medica" > 
    </service> 
    <service android:name="com.puntoalerta.mx.pa_nic.minAminPolice" > 
    </service> 
    <service android:name="com.puntoalerta.mx.pa_nic.prueba" > 
    </service> 
    <service android:name="com.puntoalerta.mx.pa_nic.FireTest" > 
    </service> 
    <service android:name="com.puntoalerta.mx.pa_nic.MedicaTest" > 
    </service> 
    <service android:name="com.puntoalerta.mx.pa_nic.ServicioPA_nicTest" > 
    </service> 
    <service android:name="com.puntoalerta.mx.pa_nic.desv" > 
    </service> 
    <service android:name="com.puntoalerta.mx.pa_nic.GCMIntentService" > 
    </service> 

    <receiver 
     android:name="com.google.android.gcm.GCMBroadcastReceiver" 
     android:permission="com.google.android.c2dm.permission.SEND" > 
     <intent-filter> 
      <action android:name="com.google.android.c2dm.intent.RECEIVE" /> 
      <action android:name="com.google.android.c2dm.intent.REGISTRATION" /> 

      <category android:name="com.puntoalerta.mx.pa_nic" /> 
     </intent-filter> 
    </receiver> 

    <activity 
     android:name="com.puntoalerta.mx.pa_nic.MainActivity" 
     android:label="@string/app_name" 
     android:screenOrientation="portrait" > 
     <intent-filter> 
      <action android:name="android.intent.action.MAIN" /> 

      <category android:name="android.intent.category.LAUNCHER" /> 
     </intent-filter> 
    </activity> 
    <activity 
     android:name="com.puntoalerta.mx.pa_nic.Registro" 
     android:label="@string/app_name" 
     android:screenOrientation="portrait" > 
     <intent-filter> 
      <action android:name="android.intent.action.VIEW" /> 

      <category android:name="android.intent.category.DEFAULT" /> 
     </intent-filter> 
    </activity> 
    <activity 
     android:name="com.puntoalerta.mx.pa_nic.Main" 
     android:label="@string/app_name" 
     android:screenOrientation="portrait" > 
     <intent-filter> 
      <action android:name="android.intent.action.VIEW" /> 

      <category android:name="android.intent.category.DEFAULT" /> 
     </intent-filter> 
    </activity> 
    <activity 
     android:name="com.puntoalerta.mx.pa_nic.bajaUsuario" 
     android:label="@string/app_name" 
     android:screenOrientation="portrait" > 
     <intent-filter> 
      <action android:name="android.intent.action.VIEW" /> 

      <category android:name="android.intent.category.DEFAULT" /> 
     </intent-filter> 
    </activity> 
    <activity 
     android:name="com.puntoalerta.mx.pa_nic.MainTest" 
     android:label="@string/app_name" 
     android:screenOrientation="portrait" > 
     <intent-filter> 
      <action android:name="android.intent.action.VIEW" /> 

      <category android:name="android.intent.category.DEFAULT" /> 
     </intent-filter> 
    </activity> 
    <activity 
     android:name="com.puntoalerta.mx.pa_nic.Bloqueo" 
     android:label="@string/app_name" 
     android:screenOrientation="portrait" > 
     <intent-filter> 
      <action android:name="android.intent.action.VIEW" /> 

      <category android:name="android.intent.category.DEFAULT" /> 
     </intent-filter> 
    </activity> 
    <activity 
     android:name="com.puntoalerta.mx.pa_nic.sliderActivity" 
     android:label="@string/app_name" 
     android:screenOrientation="portrait" > 
     <intent-filter> 
      <action android:name="android.intent.action.VIEW" /> 

      <category android:name="android.intent.category.DEFAULT" /> 
     </intent-filter> 
    </activity> 
    <activity 
     android:name="com.puntoalerta.mx.pa_nic.Eventos" 
     android:label="@string/app_name" 
     android:screenOrientation="portrait" > 
     <intent-filter> 
      <action android:name="android.intent.action.VIEW" /> 

      <category android:name="android.intent.category.DEFAULT" /> 
     </intent-filter> 
    </activity> 
    <activity 
     android:name="com.puntoalerta.mx.pa_nic.Noticias" 
     android:label="@string/app_name" 
     android:screenOrientation="portrait" > 
     <intent-filter> 
      <action android:name="android.intent.action.VIEW" /> 

      <category android:name="android.intent.category.DEFAULT" /> 
     </intent-filter> 
    </activity> 
    <activity 
     android:name="com.puntoalerta.mx.pa_nic.AlertaAtendida" 
     android:label="@string/app_name" 
     android:screenOrientation="portrait" > 
     <intent-filter> 
      <action android:name="android.intent.action.VIEW" /> 

      <category android:name="android.intent.category.DEFAULT" /> 
     </intent-filter> 
    </activity> 
    <activity 
     android:name="com.puntoalerta.mx.pa_nic.configuracion" 
     android:label="@string/app_name" 
     android:screenOrientation="portrait" > 
     <intent-filter> 
      <action android:name="android.intent.action.VIEW" /> 

      <category android:name="android.intent.category.DEFAULT" /> 
     </intent-filter> 
    </activity> 
    <activity 
     android:name="com.puntoalerta.mx.pa_nic.Update" 
     android:label="@string/app_name" 
     android:screenOrientation="portrait" > 
     <intent-filter> 
      <action android:name="android.intent.action.VIEW" /> 

      <category android:name="android.intent.category.DEFAULT" /> 
     </intent-filter> 
    </activity> 
    <activity 
     android:name="com.puntoalerta.mx.pa_nic.AcercaDe" 
     android:label="@string/app_name" 
     android:screenOrientation="portrait" > 
     <intent-filter> 
      <action android:name="android.intent.action.VIEW" /> 

      <category android:name="android.intent.category.DEFAULT" /> 
     </intent-filter> 
    </activity> 
    <activity 
     android:name="com.puntoalerta.mx.pa_nic.politica" 
     android:label="@string/app_name" 
     android:screenOrientation="portrait" > 
     <intent-filter> 
      <action android:name="android.intent.action.VIEW" /> 

      <category android:name="android.intent.category.DEFAULT" /> 
     </intent-filter> 
    </activity> 
    <activity 
     android:name="com.puntoalerta.mx.pa_nic.Licencia" 
     android:label="@string/app_name" 
     android:screenOrientation="portrait" > 
     <intent-filter> 
      <action android:name="android.intent.action.VIEW" /> 

      <category android:name="android.intent.category.DEFAULT" /> 
     </intent-filter> 
    </activity> 
    <activity 
     android:name="com.puntoalerta.mx.pa_nic.noInternet" 
     android:label="@string/app_name" 
     android:screenOrientation="portrait" > 
     <intent-filter> 
      <action android:name="android.intent.action.VIEW" /> 

      <category android:name="android.intent.category.DEFAULT" /> 
     </intent-filter> 
    </activity> 
    <activity 
     android:name="com.puntoalerta.mx.pa_nic.soporteTecnico" 
     android:label="@string/app_name" 
     android:screenOrientation="portrait" > 
     <intent-filter> 
      <action android:name="android.intent.action.VIEW" /> 

      <category android:name="android.intent.category.DEFAULT" /> 
     </intent-filter> 
    </activity> 
    <activity 
     android:name="com.puntoalerta.mx.pa_nic.Ventas" 
     android:label="@string/app_name" 
     android:screenOrientation="portrait" > 
     <intent-filter> 
      <action android:name="android.intent.action.VIEW" /> 

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

这是gradlew.dat assemble命令行指令的结果:

C:\Users\NucleoDT3\StudioProjects\Panico>gradlew.bat assembleDebug 

...[downloadng some files .jar]... 

Incremental java compilation is an incubating feature.      
:app:preBuild UP-TO-DATE                
:app:preDebugBuild UP-TO-DATE  
:app:checkDebugManifest     
:app:preReleaseBuild UP-TO-DATE  
:app:prepareComAndroidSupportAnimatedVectorDrawable2320Library UP-TO-DATE  
:app:prepareComAndroidSupportAppcompatV72320Library UP-TO-DATE  
:app:prepareComAndroidSupportMediarouterV72300Library UP-TO-DATE  
:app:prepareComAndroidSupportSupportV42320Library UP-TO-DATE  
:app:prepareComAndroidSupportSupportVectorDrawable2320Library UP-TO-DATE  
:app:prepareComGoogleAndroidGmsPlayServices840Library UP-TO-DATE  
:app:prepareComGoogleAndroidGmsPlayServicesAds840Library UP-TO-DATE  
:app:prepareComGoogleAndroidGmsPlayServicesAnalytics840Library UP-TO-DATE  
:app:prepareComGoogleAndroidGmsPlayServicesAppindexing840Library UP-TO-DATE  
:app:prepareComGoogleAndroidGmsPlayServicesAppinvite840Library UP-TO-DATE  
:app:prepareComGoogleAndroidGmsPlayServicesAppstate840Library UP-TO-DATE  
:app:prepareComGoogleAndroidGmsPlayServicesAuth840Library UP-TO-DATE  
:app:prepareComGoogleAndroidGmsPlayServicesBase840Library UP-TO-DATE  
:app:prepareComGoogleAndroidGmsPlayServicesBasement840Library UP-TO-DATE  
:app:prepareComGoogleAndroidGmsPlayServicesCast840Library UP-TO-DATE  
:app:prepareComGoogleAndroidGmsPlayServicesDrive840Library UP-TO-DATE  
:app:prepareComGoogleAndroidGmsPlayServicesFitness840Library UP-TO-DATE  
:app:prepareComGoogleAndroidGmsPlayServicesGames840Library UP-TO-DATE  
:app:prepareComGoogleAndroidGmsPlayServicesGcm840Library UP-TO-DATE  
:app:prepareComGoogleAndroidGmsPlayServicesIdentity840Library UP-TO-DATE  
:app:prepareComGoogleAndroidGmsPlayServicesLocation840Library UP-TO-DATE  
:app:prepareComGoogleAndroidGmsPlayServicesMaps840Library UP-TO-DATE  
:app:prepareComGoogleAndroidGmsPlayServicesMeasurement840Library UP-TO-DATE  
:app:prepareComGoogleAndroidGmsPlayServicesNearby840Library UP-TO-DATE  
:app:prepareComGoogleAndroidGmsPlayServicesPanorama840Library UP-TO-DATE  
:app:prepareComGoogleAndroidGmsPlayServicesPlus840Library UP-TO-DATE  
:app:prepareComGoogleAndroidGmsPlayServicesSafetynet840Library UP-TO-DATE  
:app:prepareComGoogleAndroidGmsPlayServicesVision840Library UP-TO-DATE  
:app:prepareComGoogleAndroidGmsPlayServicesWallet840Library UP-TO-DATE  
:app:prepareComGoogleAndroidGmsPlayServicesWearable840Library UP-TO-DATE  
:app:prepareDebugDependencies     
:app:compileDebugAidl UP-TO-DATE  
:app:compileDebugRenderscript UP-TO-DATE  
:app:generateDebugBuildConfig UP-TO-DATE  
:app:generateDebugAssets UP-TO-DATE  
:app:mergeDebugAssets UP-TO-DATE  
:app:generateDebugResValues UP-TO-DATE  
:app:generateDebugResources UP-TO-DATE  
:app:mergeDebugResources UP-TO-DATE  
:app:processDebugManifest     
C:\Users\NucleoDT3\StudioProjects\Panico\app\src\main\AndroidManifest.xml:26:5-79 Warni 
ng: 
     Element uses-permission#android.permission.ACCESS_FINE_LOCATION at AndroidManif 
est.xml:26:5-79 duplicated with element declared at AndroidManifest.xml:19:5-79 
C:\Users\NucleoDT3\StudioProjects\Panico\app\src\main\AndroidManifest.xml:28:5-81 Warni 
ng: 
     Element uses-permission#android.permission.ACCESS_COARSE_LOCATION at AndroidMan 
ifest.xml:28:5-81 duplicated with element declared at AndroidManifest.xml:18:5-81 
C:\Users\NucleoDT3\StudioProjects\Panico\app\src\main\AndroidManifest.xml:58:5-78 Warni 
ng: 
     Element uses-permission#android.permission.SYSTEM_ALERT_WINDOW at AndroidManife 
st.xml:58:5-78 duplicated with element declared at AndroidManifest.xml:39:5-78 
C:\Users\NucleoDT3\StudioProjects\Panico\app\src\main\AndroidManifest.xml:7:5-10:41 Err 
or: 
     uses-sdk:minSdkVersion 8 cannot be smaller than version 9 declared in library [ 
com.google.android.gms:play-services:8.4.0] C:\Users\NucleoDT3\StudioProjects\Panico\ap 
p\build\intermediates\exploded-aar\com.google.android.gms\play-services\8.4.0\AndroidMa 
nifest.xml 
     Suggestion: use tools:overrideLibrary="com.google.android.gms.all" to force usa 
ge 

See http://g.co/androidstudio/manifest-merger for more information about the manifest m 
erger. 

:app:processDebugManifest FAILED   

FAILURE: Build failed with an exception. 

* What went wrong: 
Execution failed for task ':app:processDebugManifest'. 
> Manifest merger failed with multiple errors, see logs 

* Try:   
Run with --stacktrace option to get the stack trace. Run with --info or --debug option 
to get more log output. 

BUILD FAILED 

Total time: 4 mins 45.153 secs 

C:\Users\NucleoDT3\StudioProjects\Panico> 
+0

要获得更多信息,请尝试从启用了info和stacktrace的终端自己运行gradle命令。从项目目录,它会像'./gradlew app:processDebugManifest --stacktrace --info' – Jahnold

回答

0

你有minSdkVersion冲突。您的清单是给设置为minSdK 8,但谷歌播放您所使用服务的版本有9

你需要你的清单的minSdkVersion多达9 AFAIK它支持的minSdkVersion 8播放服务的最后一个版本minSdk是4.1.32

相关问题