Ich versuche, eine Aktivität zu nennen, die aus einer Bibliothek im Hauptprojekt istwie eine Aktivität aus einer Bibliothek nennen android
Bibliothek Code
Intent in = new Intent(this, com.process.agenda.activity.MainActivity.class);
startActivity(in);
Fehler: Rundreferenz zwischen Projekten: app ->: autenticadorCadastro ->: app
Hauptprojekt
apply plugin: 'com.android.application'
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:design:23.1.1'
compile project(':autenticadorCadastro')
}
Bibliothek
apply plugin: 'com.android.library'
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:design:23.1.1'
compile project(path: ':app') // here throws the error
}
Dank
Dies ist meistens richtig, aber es gibt bestimmte Eckfälle. Zum Beispiel ein UI-Widget mit einer Home-Schaltfläche, aber die Home-Schaltfläche ändert sich basierend auf der App. Es hängt auch davon ab, um welche Art von Bibliothek es sich handelt (einige Bibliotheken sind im Grunde Apps, die zum Beispiel nur einige Assets für White Boxing austauschen). –
dann gibt es keine Möglichkeit, wieder mit dem Haupt zu kommunizieren? – WillOliveira