Reputation: 11
first I'm just a beginner, I'm using android studio and I try to import an Eclipse project, I get this:
"Error:The number of method references in a .dex file cannot exceed 64K"
I try to solve it but I get a duplicate attribute name, is there a way to fix it?
<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".
Upvotes: 0
Views: 214
Reputation: 75619
You must have only one android:name
entry, which error message clearly tells you about. Not sure what you wanted to achieve by adding this:
android:name="android.support.multidex.MultiDexApplication"
but if that's your way of doing inheritance, then it's wrong and must be removed. You need to have one android:name
pointing to your application class subclass. If you do not provide custom application class then remove all android:name
from your <application>
Upvotes: 1
Reputation: 1571
Try remove this from manifest file:
android:name=".App"
So your code be like this:
<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">
Upvotes: 0