AndroidIDEOfficial / AndroidIDE

AndroidIDE is an IDE for Android to develop full featured Android apps.
https://m.androidide.com
GNU General Public License v3.0
2.29k stars 273 forks source link

[Bug] The IDE doesn't handle Circular Dependency properly #1808

Open Rafael2616 opened 4 months ago

Rafael2616 commented 4 months ago

Issue Checklist

Additional terms

Issue explanation

When we have a circular dependency between 2 projects or more, Instead of the IDE simply showing the project initialization error, it goes into an abnormal state where the progress bar keeps loading indefinitely and when opening files their name becomes 'null' and it is not possible to perform some actions in the editor, It is also not possible to identify in the IDE that the reason for the failure is a circular dependency, as it does not show this to us. Also the IDE show that initializization was successful

Expected behavior

Expected: Show something like this

FAILURE: Build failed with an exception.

* What went wrong:
Circular dependency between the following tasks:
:core:navigation:bundleLibCompileToJarDebug
+--- :core:navigation:compileDebugJavaWithJavac
|    +--- :core:navigation:compileDebugKotlin
|    |    +--- :core:ui:bundleLibCompileToJarDebug
|    |    |    \--- :core:ui:transformDebugClassesWithAsm
|    |    |         +--- :core:navigation:bundleLibRuntimeToJarDebug
|    |    |         |    +--- :core:navigation:compileDebugJavaWithJavac (*)
|    |    |         |    \--- :core:navigation:compileDebugKotlin (*)
|    |    |         +--- :core:navigation-wrapper:bundleLibRuntimeToJarDebug
|    |    |         |    +--- :core:navigation-wrapper:compileDebugJavaWithJavac
|    |    |         |    |    +--- :core:navigation:bundleLibCompileToJarDebug (*)
|    |    |         |    |    \--- :core:navigation-wrapper:compileDebugKotlin
|    |    |         |    |         \--- :core:navigation:bundleLibCompileToJarDebug (*)
|    |    |         |    \--- :core:navigation-wrapper:compileDebugKotlin (*)
|    |    |         +--- :core:ui:bundleLibRuntimeToJarDebug
|    |    |         |    \--- :core:ui:transformDebugClassesWithAsm (*)
|    |    |         +--- :core:ui:compileDebugJavaWithJavac
|    |    |         |    +--- :core:ui:compileDebugKotlin
|    |    |         |    |    +--- :core:ui:kspDebugKotlin
|    |    |         |    |    |    \--- :feature:settings:bundleLibCompileToJarDebug
|    |    |         |    |    |         \--- :feature:settings:transformDebugClassesWithAsm
|    |    |         |    |    |              +--- :core:navigation:bundleLibRuntimeToJarDebug (*)
|    |    |         |    |    |              +--- :core:navigation-wrapper:bundleLibCompileToJarDebug
|    |    |         |    |    |              |    +--- :core:navigation-wrapper:compileDebugJavaWithJavac (*)
|    |    |         |    |    |              |    \--- :core:navigation-wrapper:compileDebugKotlin (*)
|    |    |         |    |    |              +--- :core:navigation-wrapper:bundleLibRuntimeToJarDebug (*)
|    |    |         |    |    |              +--- :core:ui:bundleLibRuntimeToJarDebug (*)
|    |    |         |    |    |              +--- :feature:changelogs:bundleLibRuntimeToJarDebug
|    |    |         |    |    |              |    \--- :feature:changelogs:transformDebugClassesWithAsm
|    |    |         |    |    |              |         +--- :core:navigation:bundleLibRuntimeToJarDebug (*)
|    |    |         |    |    |              |         +--- :core:navigation-wrapper:bundleLibRuntimeToJarDebug (*)
|    |    |         |    |    |              |         +--- :core:ui:bundleLibCompileToJarDebug (*)
|    |    |         |    |    |              |         +--- :core:ui:bundleLibRuntimeToJarDebug (*)
|    |    |         |    |    |              |         +--- :feature:changelogs:bundleLibRuntimeToJarDebug (*)
|    |    |         |    |    |              |         +--- :feature:changelogs:compileDebugJavaWithJavac
|    |    |         |    |    |              |         |    +--- :core:ui:bundleLibCompileToJarDebug (*)
|    |    |         |    |    |              |         |    +--- :feature:changelogs:compileDebugKotlin
|    |    |         |    |    |              |         |    |    +--- :core:ui:bundleLibCompileToJarDebug (*)
|    |    |         |    |    |              |         |    |    \--- :feature:changelogs:kspDebugKotlin
|    |    |         |    |    |              |         |    |         \--- :core:ui:bundleLibCompileToJarDebug (*)
|    |    |         |    |    |              |         |    \--- :feature:changelogs:kspDebugKotlin (*)
|    |    |         |    |    |              |         +--- :feature:changelogs:compileDebugKotlin (*)
|    |    |         |    |    |              |         +--- :feature:changelogs:kspDebugKotlin (*)
|    |    |         |    |    |              |         +--- :feature:game:bundleLibRuntimeToJarDebug
|    |    |         |    |    |              |         |    \--- :feature:game:transformDebugClassesWithAsm
|    |    |         |    |    |              |         |         +--- :core:navigation:bundleLibRuntimeToJarDebug (*)
|    |    |         |    |    |              |         |         +--- :core:navigation-wrapper:bundleLibRuntimeToJarDebug (*)
|    |    |         |    |    |              |         |         +--- :core:ui:bundleLibCompileToJarDebug (*)
|    |    |         |    |    |              |         |         +--- :core:ui:bundleLibRuntimeToJarDebug (*)
|    |    |         |    |    |              |         |         +--- :feature:changelogs:bundleLibRuntimeToJarDebug (*)
|    |    |         |    |    |              |         |         +--- :feature:game:bundleLibRuntimeToJarDebug (*)
|    |    |         |    |    |              |         |         +--- :feature:game:compileDebugJavaWithJavac
|    |    |         |    |    |              |         |         |    +--- :core:ui:bundleLibCompileToJarDebug (*)
|    |    |         |    |    |              |         |         |    +--- :feature:game:compileDebugKotlin
|    |    |         |    |    |              |         |         |    |    +--- :core:ui:bundleLibCompileToJarDebug (*)
|    |    |         |    |    |              |         |         |    |    \--- :feature:game:kspDebugKotlin
|    |    |         |    |    |              |         |         |    |         \--- :core:ui:bundleLibCompileToJarDebug (*)
|    |    |         |    |    |              |         |         |    \--- :feature:game:kspDebugKotlin (*)
|    |    |         |    |    |              |         |         +--- :feature:game:compileDebugKotlin (*)
|    |    |         |    |    |              |         |         +--- :feature:game:kspDebugKotlin (*)
|    |    |         |    |    |              |         |         +--- :feature:library-info:bundleLibRuntimeToJarDebug
|    |    |         |    |    |              |         |         |    \--- :feature:library-info:transformDebugClassesWithAsm
|    |    |         |    |    |              |         |         |         +--- :core:navigation:bundleLibRuntimeToJarDebug (*)
|    |    |         |    |    |              |         |         |         +--- :core:navigation-wrapper:bundleLibRuntimeToJarDebug (*)
|    |    |         |    |    |              |         |         |         +--- :core:ui:bundleLibCompileToJarDebug (*)
|    |    |         |    |    |              |         |         |         +--- :core:ui:bundleLibRuntimeToJarDebug (*)
|    |    |         |    |    |              |         |         |         +--- :feature:changelogs:bundleLibRuntimeToJarDebug (*)
|    |    |         |    |    |              |         |         |         +--- :feature:game:bundleLibRuntimeToJarDebug (*)
|    |    |         |    |    |              |         |         |         +--- :feature:library-info:bundleLibRuntimeToJarDebug (*)
|    |    |         |    |    |              |         |         |         +--- :feature:library-info:compileDebugJavaWithJavac
|    |    |         |    |    |              |         |         |         |    +--- :core:ui:bundleLibCompileToJarDebug (*)
|    |    |         |    |    |              |         |         |         |    +--- :feature:library-info:compileDebugKotlin
|    |    |         |    |    |              |         |         |         |    |    +--- :core:ui:bundleLibCompileToJarDebug (*)
|    |    |         |    |    |              |         |         |         |    |    \--- :feature:library-info:kspDebugKotlin
|    |    |         |    |    |              |         |         |         |    |         \--- :core:ui:bundleLibCompileToJarDebug (*)
|    |    |         |    |    |              |         |         |         |    \--- :feature:library-info:kspDebugKotlin (*)
|    |    |         |    |    |              |         |         |         +--- :feature:library-info:compileDebugKotlin (*)
|    |    |         |    |    |              |         |         |         +--- :feature:library-info:kspDebugKotlin (*)
|    |    |         |    |    |              |         |         |         +--- :feature:main:bundleLibRuntimeToJarDebug
|    |    |         |    |    |              |         |         |         |    \--- :feature:main:transformDebugClassesWithAsm
|    |    |         |    |    |              |         |         |         |         +--- :core:navigation:bundleLibRuntimeToJarDebug (*)
|    |    |         |    |    |              |         |         |         |         +--- :core:navigation-wrapper:bundleLibRuntimeToJarDebug (*)
|    |    |         |    |    |              |         |         |         |         +--- :core:ui:bundleLibCompileToJarDebug (*)
|    |    |         |    |    |              |         |         |         |         +--- :core:ui:bundleLibRuntimeToJarDebug (*)
|    |    |         |    |    |              |         |         |         |         +--- :feature:changelogs:bundleLibRuntimeToJarDebug (*)
|    |    |         |    |    |              |         |         |         |         +--- :feature:game:bundleLibRuntimeToJarDebug (*)
|    |    |         |    |    |              |         |         |         |         +--- :feature:library-info:bundleLibRuntimeToJarDebug (*)
|    |    |         |    |    |              |         |         |         |         +--- :feature:main:bundleLibRuntimeToJarDebug (*)
|    |    |         |    |    |              |         |         |         |         +--- :feature:main:compileDebugJavaWithJavac
|    |    |         |    |    |              |         |         |         |         |    +--- :core:ui:bundleLibCompileToJarDebug (*)
|    |    |         |    |    |              |         |         |         |         |    +--- :feature:main:compileDebugKotlin
|    |    |         |    |    |              |         |         |         |         |    |    +--- :core:ui:bundleLibCompileToJarDebug (*)
|    |    |         |    |    |              |         |         |         |         |    |    \--- :feature:main:kspDebugKotlin
|    |    |         |    |    |              |         |         |         |         |    |         \--- :core:ui:bundleLibCompileToJarDebug (*)
|    |    |         |    |    |              |         |         |         |         |    \--- :feature:main:kspDebugKotlin (*)
|    |    |         |    |    |              |         |         |         |         +--- :feature:main:compileDebugKotlin (*)
|    |    |         |    |    |              |         |         |         |         +--- :feature:main:kspDebugKotlin (*)
|    |    |         |    |    |              |         |         |         |         +--- :feature:settings:bundleLibRuntimeToJarDebug
|    |    |         |    |    |              |         |         |         |         |    \--- :feature:settings:transformDebugClassesWithAsm (*)
|    |    |         |    |    |              |         |         |         |         \--- :feature:settings-search:bundleLibRuntimeToJarDebug
|    |    |         |    |    |              |         |         |         |              \--- :feature:settings-search:transformDebugClassesWithAsm
|    |    |         |    |    |              |         |         |         |                   +--- :core:navigation:bundleLibRuntimeToJarDebug (*)
|    |    |         |    |    |              |         |         |         |                   +--- :core:navigation-wrapper:bundleLibRuntimeToJarDebug (*)
|    |    |         |    |    |              |         |         |         |                   +--- :core:ui:bundleLibCompileToJarDebug (*)
|    |    |         |    |    |              |         |         |         |                   +--- :core:ui:bundleLibRuntimeToJarDebug (*)
|    |    |         |    |    |              |         |         |         |                   +--- :feature:changelogs:bundleLibRuntimeToJarDebug (*)
|    |    |         |    |    |              |         |         |         |                   +--- :feature:game:bundleLibRuntimeToJarDebug (*)
|    |    |         |    |    |              |         |         |         |                   +--- :feature:library-info:bundleLibRuntimeToJarDebug (*)
|    |    |         |    |    |              |         |         |         |                   +--- :feature:main:bundleLibRuntimeToJarDebug (*)
|    |    |         |    |    |              |         |         |         |                   +--- :feature:settings:bundleLibCompileToJarDebug (*)
|    |    |         |    |    |              |         |         |         |                   +--- :feature:settings:bundleLibRuntimeToJarDebug (*)
|    |    |         |    |    |              |         |         |         |                   +--- :feature:settings-search:bundleLibRuntimeToJarDebug (*)
|    |    |         |    |    |              |         |         |         |                   +--- :feature:settings-search:compileDebugJavaWithJavac
|    |    |         |    |    |              |         |         |         |                   |    +--- :core:ui:bundleLibCompileToJarDebug (*)
|    |    |         |    |    |              |         |         |         |                   |    +--- :feature:settings:bundleLibCompileToJarDebug (*)
|    |    |         |    |    |              |         |         |         |                   |    +--- :feature:settings-search:compileDebugKotlin
|    |    |         |    |    |              |         |         |         |                   |    |    +--- :core:ui:bundleLibCompileToJarDebug (*)
|    |    |         |    |    |              |         |         |         |                   |    |    +--- :feature:settings:bundleLibCompileToJarDebug (*)
|    |    |         |    |    |              |         |         |         |                   |    |    +--- :feature:settings-search:kaptDebugKotlin
|    |    |         |    |    |              |         |         |         |                   |    |    |    \--- :feature:settings-search:kaptGenerateStubsDebugKotlin
|    |    |         |    |    |              |         |         |         |                   |    |    |         +--- :core:ui:bundleLibCompileToJarDebug (*)
|    |    |         |    |    |              |         |         |         |                   |    |    |         +--- :feature:settings:bundleLibCompileToJarDebug (*)
|    |    |         |    |    |              |         |         |         |                   |    |    |         \--- :feature:settings-search:kspDebugKotlin
|    |    |         |    |    |              |         |         |         |                   |    |    |              +--- :core:ui:bundleLibCompileToJarDebug (*)
|    |    |         |    |    |              |         |         |         |                   |    |    |              \--- :feature:settings:bundleLibCompileToJarDebug (*)
|    |    |         |    |    |              |         |         |         |                   |    |    \--- :feature:settings-search:kspDebugKotlin (*)
|    |    |         |    |    |              |         |         |         |                   |    +--- :feature:settings-search:kaptDebugKotlin (*)
|    |    |         |    |    |              |         |         |         |                   |    \--- :feature:settings-search:kspDebugKotlin (*)
|    |    |         |    |    |              |         |         |         |                   +--- :feature:settings-search:compileDebugKotlin (*)
|    |    |         |    |    |              |         |         |         |                   \--- :feature:settings-search:kspDebugKotlin (*)
|    |    |         |    |    |              |         |         |         +--- :feature:settings:bundleLibRuntimeToJarDebug (*)
|    |    |         |    |    |              |         |         |         \--- :feature:settings-search:bundleLibRuntimeToJarDebug (*)
|    |    |         |    |    |              |         |         +--- :feature:main:bundleLibRuntimeToJarDebug (*)
|    |    |         |    |    |              |         |         +--- :feature:settings:bundleLibRuntimeToJarDebug (*)
|    |    |         |    |    |              |         |         \--- :feature:settings-search:bundleLibRuntimeToJarDebug (*)
|    |    |         |    |    |              |         +--- :feature:library-info:bundleLibRuntimeToJarDebug (*)
|    |    |         |    |    |              |         +--- :feature:main:bundleLibRuntimeToJarDebug (*)
|    |    |         |    |    |              |         +--- :feature:settings:bundleLibRuntimeToJarDebug (*)
|    |    |         |    |    |              |         \--- :feature:settings-search:bundleLibRuntimeToJarDebug (*)
|    |    |         |    |    |              +--- :feature:game:bundleLibRuntimeToJarDebug (*)
|    |    |         |    |    |              +--- :feature:library-info:bundleLibRuntimeToJarDebug (*)
|    |    |         |    |    |              +--- :feature:main:bundleLibRuntimeToJarDebug (*)
|    |    |         |    |    |              +--- :feature:settings:bundleLibRuntimeToJarDebug (*)
|    |    |         |    |    |              +--- :feature:settings:compileDebugJavaWithJavac
|    |    |         |    |    |              |    +--- :core:navigation-wrapper:bundleLibCompileToJarDebug (*)
|    |    |         |    |    |              |    +--- :feature:settings:compileDebugKotlin
|    |    |         |    |    |              |    |    +--- :core:navigation-wrapper:bundleLibCompileToJarDebug (*)
|    |    |         |    |    |              |    |    \--- :feature:settings:kspDebugKotlin
|    |    |         |    |    |              |    |         \--- :core:navigation-wrapper:bundleLibCompileToJarDebug (*)
|    |    |         |    |    |              |    \--- :feature:settings:kspDebugKotlin (*)
|    |    |         |    |    |              +--- :feature:settings:compileDebugKotlin (*)
|    |    |         |    |    |              +--- :feature:settings:kspDebugKotlin (*)
|    |    |         |    |    |              \--- :feature:settings-search:bundleLibRuntimeToJarDebug (*)
|    |    |         |    |    \--- :feature:settings:bundleLibCompileToJarDebug (*)
|    |    |         |    +--- :core:ui:kspDebugKotlin (*)
|    |    |         |    \--- :feature:settings:bundleLibCompileToJarDebug (*)
|    |    |         +--- :core:ui:compileDebugKotlin (*)
|    |    |         +--- :core:ui:kspDebugKotlin (*)
|    |    |         +--- :feature:changelogs:bundleLibRuntimeToJarDebug (*)
|    |    |         +--- :feature:game:bundleLibRuntimeToJarDebug (*)
|    |    |         +--- :feature:library-info:bundleLibRuntimeToJarDebug (*)
|    |    |         +--- :feature:main:bundleLibRuntimeToJarDebug (*)
|    |    |         +--- :feature:settings:bundleLibCompileToJarDebug (*)
|    |    |         +--- :feature:settings:bundleLibRuntimeToJarDebug (*)
|    |    |         \--- :feature:settings-search:bundleLibRuntimeToJarDebug (*)
|    |    +--- :feature:changelogs:bundleLibCompileToJarDebug
|    |    |    \--- :feature:changelogs:transformDebugClassesWithAsm (*)
|    |    +--- :feature:game:bundleLibCompileToJarDebug
|    |    |    \--- :feature:game:transformDebugClassesWithAsm (*)
|    |    +--- :feature:library-info:bundleLibCompileToJarDebug
|    |    |    \--- :feature:library-info:transformDebugClassesWithAsm (*)
|    |    +--- :feature:main:bundleLibCompileToJarDebug
|    |    |    \--- :feature:main:transformDebugClassesWithAsm (*)
|    |    +--- :feature:settings:bundleLibCompileToJarDebug (*)
|    |    \--- :feature:settings-search:bundleLibCompileToJarDebug
|    |         \--- :feature:settings-search:transformDebugClassesWithAsm (*)
|    +--- :core:ui:bundleLibCompileToJarDebug (*)
|    +--- :feature:changelogs:bundleLibCompileToJarDebug (*)
|    +--- :feature:game:bundleLibCompileToJarDebug (*)
|    +--- :feature:library-info:bundleLibCompileToJarDebug (*)
|    +--- :feature:main:bundleLibCompileToJarDebug (*)
|    +--- :feature:settings:bundleLibCompileToJarDebug (*)
|    \--- :feature:settings-search:bu

Version name

Version : v2.7.1-beta (27101) CI Build : true Branch : dev Commit : b7e8464d5 Variant : armeabi-v7a (release) Build type : OFFICIAL F-Droid Build : false F-Droid Version : null F-Droid Version code : -1 SDK Version : 28 Supported ABIs : [armeabi-v7a, armeabi] Manufacturer : LGE Device : LM-X420

Video:

https://github.com/AndroidIDEOfficial/AndroidIDE/assets/93414086/c6b47b51-8f61-4eb4-8c33-877736a8ad2b

Download source

GitHub

Relevant log output

%PARSER_ERROR[date] %PARSER_ERROR[level] [%PARSER_ERROR[thread]] %PARSER_ERROR[logger]:java.lang.RuntimeException: Failure from system
    at android.app.Instrumentation.execStartActivity(Instrumentation.java:1677)
    at android.app.ContextImpl.startActivity(ContextImpl.java:944)
    at android.app.ContextImpl.startActivity(ContextImpl.java:915)
    at android.content.ContextWrapper.startActivity(ContextWrapper.java:379)
    at com.itsaky.androidide.app.IDEApplication$$ExternalSyntheticLambda0.uncaughtException(Unknown Source:179)
    at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:1068)
    at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:1063)
    at org.apache.commons.io.file.Counters.handleUncaughtCoroutineException(Unknown Source:67)
    at _COROUTINE._BOUNDARY.handleCoroutineException(Unknown Source:16)
    at kotlinx.coroutines.StandaloneCoroutine.handleJobException(Unknown Source:2)
    at kotlinx.coroutines.JobSupport.finalizeFinishingState(Unknown Source:159)
    at kotlinx.coroutines.JobSupport.tryMakeCompleting(Unknown Source:220)
    at kotlinx.coroutines.JobSupport.makeCompletingOnce$kotlinx_coroutines_core(Unknown Source:4)
    at kotlinx.coroutines.AbstractCoroutine.resumeWith(Unknown Source:13)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(Unknown Source:36)
    at kotlinx.coroutines.DispatchedTask.run(Unknown Source:110)
    at androidx.work.Worker$2.run(Unknown Source:38)
    at kotlinx.coroutines.scheduling.TaskImpl.run(Unknown Source:2)
    at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(Unknown Source:95)
Caused by: android.os.TransactionTooLargeException: data parcel size 2583480 bytes
    at android.os.BinderProxy.transactNative(Native Method)
    at android.os.BinderProxy.transact(Binder.java:1157)
    at android.app.IActivityManager$Stub$Proxy.startActivity(IActivityManager.java:3633)
    at android.app.Instrumentation.execStartActivity(Instrumentation.java:1671)
    ... 18 common frames omitted
 Unable to show crash handler activity
%PARSER_ERROR[date] %PARSER_ERROR[level] [%PARSER_ERROR[thread]] %PARSER_ERROR[logger]: Failed to compile /data/data/com.itsaky.androidide/files/home/android-sdk/platforms/android-34/data/res/values/config_telephony.xml