Skip to content
This repository has been archived by the owner on Jan 5, 2023. It is now read-only.

Cannot import project using Android-Studio : #72

Closed
AndroidDeveloperLB opened this issue Oct 23, 2014 · 27 comments
Closed

Cannot import project using Android-Studio : #72

AndroidDeveloperLB opened this issue Oct 23, 2014 · 27 comments

Comments

@AndroidDeveloperLB
Copy link

I get the next error:
Error:A problem occurred configuring project ':Wearable'.

Could not resolve all dependencies for configuration ':Wearable:_debugCompile'.
Could not find any version that matches com.google.android.support:wearable:+.
Required by:
iosched:Wearable:unspecified
Could not find any version that matches com.google.android.gms:play-services-wearable:6.1.+.
Required by:
iosched:Wearable:unspecified

I've tried installing various stuff on the SDK manager, but I can't handle those errors for some reason.
Any help would be appreciated .

@ardock
Copy link
Contributor

ardock commented Oct 23, 2014

Do you have tihs one? compile 'com.android.support:support-v13:21.+'

https://github.com/google/iosched/blob/master/doc/BUILDING.md
In the Android SDK Manager, ensure that the following are installed, and are updated to the latest available version:
Tools > Android SDK Platform-tools (rev 21 or above)
Tools > Android SDK Tools (rev 23.0.5 or above)
Tools > Android SDK Build-tools version 20
Tools > Android SDK Build-tools version 21 (rev 21.0.2 or above)
Android 4.4W > SDK Platform (API 20)
Android 5.0 > SDK Platform (API 21)
Extras > Android Support Repository
Extras > Android Support Library
Extras > Google Play services
Extras > Google Repository

2014-10-23 20 53 09 sdk1

2014-10-23 20 54 08 sdk2

@ardock
Copy link
Contributor

ardock commented Oct 23, 2014

If you previously installed the Android L Preview SDK, select all those packages in the SDK Manager and click Delete packages.

http://developer.android.com/preview/index.html
Android 5.0 (Lollipop) is almost here and users will begin receiving device updates in November. To help you prepare, the Android 5.0 SDK is now available with final APIs.

Since the L Developer Preview began, various APIs and behaviors have changed, so if you've been using the Preview SDK you should update now to test your apps and take advantage of new features.

To get the latest Android 5.0 SDK:

Start the Android SDK Manager.
In the Tools section, select the latest SDK Tools, SDK Platform-tools, and SDK Build-tools.
Select everything under the Android 5.0 section, then click Install packages...
Accept the licensing agreement for the packages, then click Install.
If you previously installed the Android L Preview SDK, select all those packages in the SDK Manager and click Delete packages.
Now you're ready to develop and test on Android 5.0 with your normal workflow and begin publishing app updates to Google Play.

@ardock
Copy link
Contributor

ardock commented Oct 23, 2014

http://developer.android.com/training/wearables/apps/index.html
Android Studio 0.8 or later and Gradle 0.12 or later

2014-10-23 21 43 14 gradle

If you dont find a package Check addons in sdk manager menu tools / manage add-ons sites
2014-10-23 21 44 50 addons

This solution is outdated but check my image add-ons,
http://stackoverflow.com/questions/24453971/building-gradle-for-wear-app-failed

@ardock
Copy link
Contributor

ardock commented Oct 23, 2014

In the link recommends check google repository version (update to rev 12 no 9)
https://code.google.com/p/android/issues/detail?id=72454

If you need upgrade android studio
http://tools.android.com/download
or
http://developer.android.com/sdk/index.html

@AndroidDeveloperLB
Copy link
Author

OK, I've re-installed Android-Studio as I think something went wrong there.
I've also checked the components on the SDK-Manager.
From the list, the one that was missing is "Extras > Google Repository" . The rest are ok, and everything is updated.

Now it writes:
"Error:Execution failed for task ':Wearable:preBuild'.

failed to find Build Tools revision 20.0.0
"

That's even though I have installed the wearables SDK.
Here's a screenshot of what I have:
2014-10-24_001853

@ardock
Copy link
Contributor

ardock commented Oct 23, 2014

you need both
Tools > Android SDK Build-tools version 20 (for wear) <-- check this in sdk manager
Tools > Android SDK Build-tools version 21 (rev 21.0.2 or above) (for android lollipop)

Try
./gradlew clean assembleDebug

@AndroidDeveloperLB
Copy link
Author

@ardock But I already have them. I've now updated my answer to show what I've installed.

@ardock
Copy link
Contributor

ardock commented Oct 23, 2014

You have not installed it. You need both

In tools:
Android SDK Build-tools 20 not installed

@AndroidDeveloperLB
Copy link
Author

Why do i need 20 if I have 21.0.2 ?
Also, for some reason Android-Studio still complained (even after I've installed v20) , so I clicked on the warning and it installed it by itself. Neat.

@ardock
Copy link
Contributor

ardock commented Oct 23, 2014

I dont know the details lol, i m not expert, they are specific for platfom, wear it 's independent.
I read need both, i install both :)
They released it after kitkat and before lollipop.
I only can say that you need it :)

And they can upgrade android wear independently as it s included in google play services i think.
If is not casual, they ll need the separation for it, i dont know, perhaps someone will answer you

@AndroidDeveloperLB
Copy link
Author

Sorry for all the trouble.
Say, do you know if it's possible (or will soon be possible) to style dialogs in material style using the support library? I know that preferences are still neglected, but have dialogs been neglected too?
I've even written about it here:
https://code.google.com/p/android/issues/detail?id=78083
I was hoping seeing it now in this sample, and sadly I didn't... :(

@ardock
Copy link
Contributor

ardock commented Oct 23, 2014

Sorry, i dont know, im still learning the new stuff as you, sure someone answers you here
https://code.google.com/p/android/issues/detail?id=78088

@AndroidDeveloperLB
Copy link
Author

@ardock I know of this issue. It's a duplicate...
anyway thanks.

@ardock
Copy link
Contributor

ardock commented Oct 24, 2014

you're welcome, and thanks for the blog link i had missed :). I just read it, they doing great, be patient, sure someone find a solution for dialogs or they ll update the support library soon. Lollipop official release starts on November 3 :)

@AndroidDeveloperLB
Copy link
Author

@ardock Actually I've found something yesterday but didn't check it out yet, as I was hoping I would find something more official :
https://github.com/fengdai/AlertDialogPro

@ardock
Copy link
Contributor

ardock commented Oct 24, 2014

Try to ask to Chris Banes directly
https://chris.banes.me/2014/10/17/appcompat-v21/

@romannurik updated DevBytes: ActionBarCompat Support Library with Banesy Top Tips requested L

2014-10-24 11 27 55 banesy top tip

@ardock
Copy link
Contributor

ardock commented Oct 27, 2014

@AndroidDeveloperLB You are right. If you update build.gradle for wear, you dont need buildToolsVersion 20.

android {
compileSdkVersion 21
buildToolsVersion "21.0.2"

defaultConfig {
    minSdkVersion 20
    targetSdkVersion 21

@coodoing
Copy link

Same issues occurs to my environment before, now it works well with android studio 0.8.9.

Like AndroidDeveloperLB, I installed the following packages
1
2

And I just changed the sdkversion of build.gradle file. The setting of build.gradle of android and Wear project just like:
1)

android {
compileSdkVersion 19
buildToolsVersion '21.0.2'

defaultConfig {
    minSdkVersion 19
    targetSdkVersion 21
}

.....
}

android {
compileSdkVersion 20
buildToolsVersion "20.0.0"

defaultConfig {
    minSdkVersion 20
    targetSdkVersion 20
    versionCode 1
    versionName "1.0"
}

...
}

Hope this will be helpful for you.

@AndroidDeveloperLB
Copy link
Author

@coodoing Thank you. Seems to work now, but you didn't have to set the number to be this high. I think those are better:

for build.gradble(android) :

android {
compileSdkVersion 21
buildToolsVersion "21.0.2"

defaultConfig {
    minSdkVersion 14
    targetSdkVersion 21
    versionCode 1
    versionName "1.0"
} 

for build.gradle(wearable) :

android {
compileSdkVersion 21
buildToolsVersion "21.0.2"

defaultConfig {
    applicationId "com.google.samples.apps.iosched"
    minSdkVersion 20
    targetSdkVersion 20
    versionCode 1
    versionName "1.0"
}

@xu6148152
Copy link

why my project fail to find some library , just like com.google.api-client:google-api-client:1.+

@PaulRashidi
Copy link
Contributor

2015 Source and Android Studio have changed quite a bit, closing this out. Please open a new bug if the 2015 source isn't importable.

@AndroidDeveloperLB
Copy link
Author

@PaulRashidi I've just cloned the project again, and I get this error when trying to run it:
Error:A problem was found with the configuration of task ':android:packageDebug'.

File 'D:\android\Android studio Projects\iosched\android\debug.keystore' specified for property 'signingConfig.storeFile' does not exist.

So it still can't run out of the box. What's wrong with it?

@ardock
Copy link
Contributor

ardock commented Oct 16, 2015

Build instructions, step 6

Add your debug keystore to the project (save it as android/debug.keystore), or modify the build.gradle file to point to your key.

@AndroidDeveloperLB
Copy link
Author

@ardock Why doesn't it include it, if it's needed?
Anyway, added my own, and now it shows this error:

Error:(132, 1) A problem occurred evaluating project ':android'.

Could not find method compile() for arguments [com.google.android.gms:play-services-drive:7.0.0] on DefaultExternalModuleDependency{group='com.google.android.gms', name='play-services-analytics', version='7.0.0', configuration='default'}.

@PaulRashidi
Copy link
Contributor

Thanks @ardock

@ardock
Copy link
Contributor

ardock commented Oct 17, 2015

@AndroidDeveloperLB They are not required to do so and it's better that we use our own keys in our builds. Sorry I can not reproduce your latest issue, works fine here, try to open a new issue.

@PaulRashidi Thanks for share the source code.

@AndroidDeveloperLB
Copy link
Author

@ardock Why create a new issue? it has the same problem: I can't import the project properly. It shows errors.

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

No branches or pull requests

5 participants