The import and builds are separate steps.

When you import we first get the model (This is the actual "sync"
operation). This cannot fail or we don't know anything about the project.
Since 1.0 we've made the plugin more and more lenient toward issues.
Instead of the sync failing, the sync will succeed and the model includes a
list of error found that can usually be fixed with quick fixes.

After the sync is done, then we try to build. Anything there can be fixed
normally with the IDE.

Of course, if the error is a broken dependency then you need to fix it and
re-sync, there's no other way. The IDE does have some quick fixes for
adding dependency and we'll make this update the build.gradle files in the
future (soon hopefully), but you'll need to sync again no matter what.

I don't think there is an architecture problem. Yes, sync is needed every
time you change the project model but this is expected. What we need to do
is to make this much faster to be able to do it all the time, whenever a
build.gradle file is touched. This is something we are actively working on.

On Fri, Jun 5, 2015 at 3:11 AM, Tomáš Procházka <[email protected]>
wrote:

> Is there some plan to change this?
>
>
> Dne sobota 16. května 2015 18:26:19 UTC+2 Tomáš Procházka napsal(a):
>
>> Current version of AS has one really serious architecture problem.
>> If you open project AS first run the gradle and then setup IDE according
>> the result.
>> But problem is if project contain some error, then is almost impossible
>> to fix them.
>>
>> For example I created new gradle submodule in my project and copy some
>> sources from the main project to new module.
>> It create some compile errors because of missing dependencies, different
>> packageName than main project, etc.
>>
>> If I run compilation it still fail on some compilation error, so it is
>> not possible to update project and IDE still think that R or BuildConfig
>> doesn't exists and it is not possible to import them.
>> All codes are generated in the build folder properly, but IDE doesn't
>> know about them.
>>
>> Also changes in the dependencies are not reflected in the IDE.
>>
>> So IDE mark almost every 3rd party class with red color like Error and it
>> is not possible to found real problem.
>> Only way is run build again and again and check bug in the build outputs
>> and import missing classes manually.
>>
>> In this situation works IDE like Notepad, no advanced feature is
>> available :-(
>>
>> I think that IDE configuration should be upgraded also if gradle build
>> fail.
>>
>>
>>  --
> You received this message because you are subscribed to the Google Groups
> "adt-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Xavier Ducrohet
Android SDK Tech Lead
Google Inc.
http://developer.android.com | http://tools.android.com

Please do not send me questions directly. Thanks!

-- 
You received this message because you are subscribed to the Google Groups 
"adt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to