ksoichiro / gradle-eclipse-aar-plugin

Gradle plugin to use Android AAR libraries on Eclipse.
Apache License 2.0
126 stars 27 forks source link

The hierarchy of the type "MainActivity" is inconsistent #18

Open laiis opened 7 years ago

laiis commented 7 years ago

environment: eclipse neon.2 , android SDK 25

I have a testing project with 'gradle-eclipse-aar-plugin' and 'andmore'. When I add libraries like 'support-v4:25.0.0' , 'appcompat-v7:25.0.0' , then Eclipse IDE has an error for that: 'The hierarchy of the type "MainActivity" is inconsistent'. The project structure is very simple , only one activity there, MainActivity, extends AppCompatActivity. I reference these links:

  1. The hierarchy of the type MainActivity is inconsistent
  2. The hierarchy of the type activity is inconsistent when extending ActionBarActivity,
  3. If I use new “ V7 Appcompat library ”, do I still need “ V4 Support Library ” for a minimum SDK = 7?,

they all mention one thing is 'you have to remove the android v4 support library from the libs folder of your project,ensure that the library has added to your project and compile again.'. so I add some statements in my build.gradle to exclude duplicate library like this:

// Write your dependencies
dependencies {
    // jar files
    //compile fileTree(dir: 'libs', include: '*.jar')

    compile "com.android.support:support-v4:25.0.0"

    compile('com.android.support:appcompat-v7:25.0.0') {
        exclude module: 'support-v4'
    }

}

But ! There is nothing change for "The hierarchy of the type "MainActivity" is inconsistent" this Error message. Can anybody help me? Thank you~

ksoichiro commented 7 years ago

Thank you for your report. I'd like to reproduce the issue in my environment. Do you have any sample project to confirm this issue?