Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exercise-1, solution-1 issue #1

Open
aya-salama1989 opened this issue May 9, 2017 · 6 comments
Open

exercise-1, solution-1 issue #1

aya-salama1989 opened this issue May 9, 2017 · 6 comments

Comments

@aya-salama1989
Copy link

aya-salama1989 commented May 9, 2017

Hi guys, while trying to follow up with espresso lesson repos, I found the following

1- Warning:Conflict with dependency 'com.android.support:support-annotations'. Resolved versions for app (25.1.0) and test app (23.1.1) differ. See http://g.co/androidstudio/app-test-app-conflict for details.
"I guess my build tools issue but wasn't solved after changing the build number "

and I can't really get what's the reason for the following issues;

2- Error:Failed to crunch file D:\NanoDegree\TeaTime\AdvancedAndroid_TeaTime-TESP.01-Exercise-FinishOrderActivityBasicTest\app\build\intermediates\exploded-aar\com.google.android.gms\play-services-base\9.8.0\res\drawable-xhdpi-v4\common_google_signin_btn_text_dark_pressed.9.png into D:\NanoDegree\TeaTime\AdvancedAndroid_TeaTime-TESP.01-Exercise-FinishOrderActivityBasicTest\app\build\intermediates\res\merged\debug\drawable-xhdpi-v4\common_google_signin_btn_text_dark_pressed.9.png

3- Error:Execution failed for task ':app:mergeDebugResources'.

Error: Failed to crunch file D:\NanoDegree\TeaTime\AdvancedAndroid_TeaTime-TESP.01-Exercise-FinishOrderActivityBasicTest\app\build\intermediates\exploded-aar\com.google.android.gms\play-services-base\9.8.0\res\drawable-xhdpi-v4\common_google_signin_btn_text_dark_pressed.9.png into
D:\NanoDegree\TeaTime\AdvancedAndroid_TeaTime-TESP.01-Exercise-FinishOrderActivityBasicTest\app\build\intermediates\res\merged\debug\drawable-xhdpi-v4\common_google_signin_btn_text_dark_pressed.9.png

Besides android studio can't recognize testing classes

@Amejia481
Copy link

Could you post your dependencies ?

@Amejia481
Copy link

The problem is that your app.apk and app test.apk share the same libraries, your denpendency compile "com.android.support:support-annotations:25.3.1" is greater than the one 'com.android.support:support-annotations:23.1.1' that is getting in your androidTestCompile.

You should indicate to gradle with which one do you want to work with. You can do it telling explicitly that uses in your androidTestCompile "com.android.support:support-annotations:25.3.1"

You can find more info here https://sites.google.com/a/android.com/tools/tech-docs/new-build-system/user-guide#TOC-Resolving-conflicts-between-main-and-test-APK
and here http://stackoverflow.com/questions/36833606/android-support-library-error-after-updating-to-23-3-0

@aya-salama1989
Copy link
Author

My mentor helped me solve it.
It was due too long file paths and names as you can notice in point 2 and 3

@Amejia481
Copy link

How did you solve it ?

@aya-salama1989
Copy link
Author

moved project files to a shorter path and renamed it to shorter names also, for instance

from:

D:\NanoDegree\TeaTime\AdvancedAndroid_TeaTime-TESP.01-Exercise-FinishOrderActivityBasicTest\app\build\intermediates\res\merged\debug\drawable-xhdpi-v4\common_google_signin_btn_text_dark_pressed.9.png

to:

D:\TeaTime-TESP.01-Exercise-FinishOrderActivityBasicTest\app\build\intermediates\res\merged\debug\drawable-xhdpi-v4\common_google_signin_btn_text_dark_pressed.9.png

@Amejia481
Copy link

It works like a charm!
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants