2017-08-07 31 views
0

清單中的名稱標籤第一,我只是一個初學者,我使用Android的工作室,我嘗試導入Eclipse項目中,我得到這個:多個應用程序的Android:通過配置引起了我的應用程序的multidex

"Error:The number of method references in a .dex file cannot exceed 64K"

我試圖解決它,但我得到重複的屬性名稱,有沒有辦法解決它?

<application 
    android:name="android.support.multidex.MultiDexApplication" 
    android:allowBackup="true" 
    android:icon="@drawable/ic_launcher" 
    android:label="@string/app_name" 
    android:theme="@style/AppTheme" 
    android:name=".App" android:largeHeap="true" 
    tools:replace="android:icon,android:label,android:theme"> 

Error:L'attribut "name" lié à l'espace de noms " http://schemas.android.com/apk/res/android " a déjà été spécifié pour l'élément "application".

回答

0

嘗試從清單文件中刪除此:

android:name=".App" 

所以,你的代碼是這樣的:

<application 
    android:name="android.support.multidex.MultiDexApplication" 
    android:allowBackup="true" 
    android:icon="@drawable/ic_launcher" 
    android:label="@string/app_name" 
    android:theme="@style/AppTheme" 
    android:largeHeap="true" 
    tools:replace="android:icon,android:label,android:theme"> 
1

必須只有一個android:name條目,該條目錯誤消息明確告訴你。不知道你想要什麼,加入這實現:

android:name="android.support.multidex.MultiDexApplication" 

,但如果這是你做的繼承方式,那麼它是錯誤的,必須拆除。你需要有一個android:name指向你的應用程序類的子類。如果您不提供自定義應用程序類,請從您的<application>

中刪除所有 android:name
相關問題