• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

have Android Studio 3.1.1 configuration problem

try to run HelloWorld at studio . encounter a lot of problems.

long time ago, try to do the same thing in Eclipse . no problem at all. why Android Studio try to scare people away??

I have Android Studio 3.1.1 install when I try to run my first Android app . I got the following error messge

1) Failed to find Build Tools revision 27.0.3.

but my build gradle is

ndroid {
compileSdkVersion 28
defaultConfig {
applicationId "com.example.mslutry.myapplication"
minSdkVersion 26
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
2) Module not specified
 
I once has 3.3 , but I am unable to solve the dependencies problem. I get error on the following part . I Google and found a lot of people said they have this problem , but no of the solution is work for me

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:design:28.0.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}
 
Upvote 0
So now that you have android studio 3.3 installed, what does the error say? Can you post the error?

Also this is what build.gradle looks like in a newly created project in AS 3.3:
Code:
apply plugin: 'com.android.application'

android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "com.gt.helloworld"
        minSdkVersion 15
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}
 
Upvote 0
Unresolved dependencies at app/build.gradle the detail message shown as: there are totally 9 error message.

Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve com.android.support:appcompat-v7:28.0.0.
<a href="Unable to resolve dependency for &#39;:app@debug/compileClasspath&#39;: Could not resolve com.android.support:appcompat-v7:28.0.0.">Show Details</a>
Affected Modules: <a href="openFile:C:/Android/Project/HelloWorld/app/build.gradle">app</a>

Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve com.android.support.constraint:constraint-layout:1.1.3.
<a href="Unable to resolve dependency for &#39;:app@debug/compileClasspath&#39;: Could not resolve com.android.support.constraint:constraint-layout:1.1.3.">Show Details</a>
Affected Modules: <a href="openFile:C:/Android/Project/HelloWorld/app/build.gradle">app</a>

Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Could not resolve com.android.support.test:runner:1.0.2.
<a href="Unable to resolve dependency for &#39;:app@debugAndroidTest/compileClasspath&#39;: Could not resolve com.android.support.test:runner:1.0.2.">Show Details</a>
Affected Modules: <a href="openFile:C:/Android/Project/HelloWorld/app/build.gradle">app</a>

Unable to resolve dependency for ':app@debugUnitTest/compileClasspath': Could not resolve junit:junit:4.12.
<a href="Unable to resolve dependency for &#39;:app@debugUnitTest/compileClasspath&#39;: Could not resolve junit:junit:4.12.">Show Details</a>
Affected Modules: <a href="openFile:C:/Android/Project/HelloWorld/app/build.gradle">app</a>
 
Upvote 0
I also noticed if I common the following I did not have Gradle sync problem
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:design:28.0.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'

if I am unable to get those jar online , can I download and put in where? how my Gradle build need to change?
 
Upvote 0
Is anyone can told me
if I am unable to get those jar online , can I download and put in where? how my Gradle build need to change?

No, if android studio(AS) is not installing correctly then you need to completely remove it from windows and reinstall it.

Here is a guide to completely remove it.
https://stackoverflow.com/a/39953746

And here is another thread where a user was having issues with his AS installation and simply removing it and then reinstalling it fixed it.
https://androidforums.com/threads/c...in-android-studio.1296456/page-2#post-7857984

We can spend a bunch of time trouble shooting, but if your installation of AS is botched, then nothing will work.
 
  • Like
Reactions: Learn Android
Upvote 0
Thanks for the reply ! actually I try to remove before , I do all other steps, but I did not do the step 3 before . I will try it again !
for the install studio , I sample click next and next .
do you have a recommend step by step install guide ?

by the way does my download has a problem ?
android-studio-ide-182.5264788-windows.exe


*****************************************
Step 1: Run the Android Studio uninstaller

The first step is to run the uninstaller. Open the Control Panel and under Programs, select Uninstall a Program. After that, click on "Android Studio" and press Uninstall. If you have multiple versions, uninstall them as well.

Step 2: Remove the Android Studio files

To delete any remains of Android Studio setting files, in File Explorer, go to your user folder (%USERPROFILE%), and delete .android, .AndroidStudio and any analogous directories with versions on the end, i.e. .AndroidStudio1.2, as well as .gradle and .m2 if they exist.

Then go to %APPDATA% and delete the JetBrains directory.

Finally, go to C:\Program Files and delete the Android directory.

Step 3: Remove SDK

To delete any remains of the SDK, go to %LOCALAPPDATA% and delete the Android directory.

Step 4: Delete Android Studio projects
 
Upvote 0
Upvote 0
Hi Thanks for the reply !

I following your suggestions to remove Android Studio and reinstall it again. I still have the following error message
Unresolved dependencies at app/build.gradle the detail message shown as: there are totally 9 error message.

Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve com.android.support:appcompat-v7:28.0.0.
<a href="Unable to resolve dependency for &#39;:app@debug/compileClasspath&#39;: Could not resolve com.android.support:appcompat-v7:28.0.0.">Show Details</a>
Affected Modules: <a href="openFile:C:/Android/Project/HelloWorld/app/build.gradle">app</a>

Unable to resolve dependency for ':app@debug/compileClasspath': Could not resolve com.android.support.constraint:constraint-layout:1.1.3.
<a href="Unable to resolve dependency for &#39;:app@debug/compileClasspath&#39;: Could not resolve com.android.support.constraint:constraint-layout:1.1.3.">Show Details</a>
Affected Modules: <a href="openFile:C:/Android/Project/HelloWorld/app/build.gradle">app</a>

Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath': Could not resolve com.android.support.test:runner:1.0.2.
<a href="Unable to resolve dependency for &#39;:app@debugAndroidTest/compileClasspath&#39;: Could not resolve com.android.support.test:runner:1.0.2.">Show Details</a>
Affected Modules: <a href="openFile:C:/Android/Project/HelloWorld/app/build.gradle">app</a>

Unable to resolve dependency for ':app@debugUnitTest/compileClasspath': Could not resolve junit:junit:4.12.
<a href="Unable to resolve dependency for &#39;:app@debugUnitTest/compileClasspath&#39;: Could not resolve junit:junit:4.12.">Show Details</a>
Affected Modules: <a href="openFile:C:/Android/Project/HelloWorld/app/build.gradle">app</a>
 
Upvote 0
The best tutorial to follow would be in the following link which includes both a written and video tutorial for the supported operating systems.
https://developer.android.com/studio/install

I don't use Windows so I cannot assist with any windows troubleshooting.
just want you know , after setting proxy the problem is gone.

thanks for all the replies .
 
  • Like
Reactions: GameTheory
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones