Tag Archives: android-studio

Android Studio sync build.gradle appears: Failed to resolve: com.android.support:appcompat problem

After initializing a project using Android Studio, you need to sync the app/build.gradle file, but it will report an error such as:

Failed to resolve: com.android.support:appcompat-v7:26.0.0

What is the reason for this?
If your Android SDK is greater than 26.0.0, you will need to add the following statements in build.Gradle in the root directory of your project:

...

allprojects {
    repositories {
        ...
        maven {
            url "https://maven.google.com"
        }
    }
}

...

Refer to the link
In addition, if it still doesn’t work, let’s see if the SDK version is correct. In app/build.gradle, there is a column of data that is buildToolsVersion, and we should write its SDK version

Android Studio: Application Installation Failed (How to Fix)

using Android Studio to run programs on emulators reported this error, there are many reasons for this problem, so there are many solutions, here are some mainstream solutions to solve most of the problems.

Installation error: INSTALL_FAILED_NO_MATCHING_ABI.

Installation error: INSTALL_FAILED_NO_MATCHING_ABI. For this case, please refer to the following Installation error: INSTALL_FAILED_NO_MATCHING_ABIS

scheme 2: it may be that an app with the same name was originally installed on the simulator (mobile phone) but the signature is different, so just delete the app on the mobile phone.

scheme 3: click build-& gt; Clean Project, then Build-> Rebuild Project is sufficient.

scheme 4: click File-> Setting-> Build,Execution,Deployment-> Instant Run, will enable Instant Run... The check for is removed.



Welcome to join the QQ group for discussion.
YinyouPoet – YinyouPoet

Android error installation failed with message invalid file

error cause: unknown, but Android Studio sometimes has this problem.
1. Sometimes because the software is turned off illegally
2. Sometimes the code from someone else’s computer will not run
. Sometimes a file
is missing. 4. Sometimes it is due to the problem of mobile phone terminal
and so on…
solution:
. Click the toolbar

and

Build Clean Project
2. Click the toolbar

and

An Rebulid Project
in Build can solve a large part of the problem

Solve the problem of available for offline mode in Android studio compilation

reprint please indicate the source:
http://blog.csdn.net/aa464971/article/details/68948650

anomaly full text

Error:A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugApkCopy'.
   > Could not resolve com.squareup.okhttp3:okhttp:3.5.0.
     Required by:
         retrofit-rxjava-okhttp:app:unspecified > com.squareup.retrofit2:retrofit:2.1.0
      > No cached version of com.squareup.okhttp3:okhttp:3.5.0 available for offline mode.

solution

screenshot is version 2.2

Settings – Build. Execution, Deployment – Gradle – uncheck the Offline Work, recompile.