【错误记录】安卓编译错误 ( Could not find xxx.tools.build:aapt2 )

简介: 【错误记录】安卓编译错误 ( Could not find xxx.tools.build:aapt2 )

一、报错信息

二、解决方案


一、报错信息


打开了一个古老的项目 , 运行后报如下错误 ;

Execution failed for task ':app:mergeDebugResources'.
> Could not resolve all files for configuration ':app:_internal_aapt2_binary'.
   > Could not find com.android.tools.build:aapt2:4.1.0-6503028.
     Searched in the following locations:
       - https://jcenter.bintray.com/com/android/tools/build/aapt2/4.1.0-6503028/aapt2-4.1.0-6503028.pom
     If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration.
     Required by:
         project :app
Possible solution:
 - Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html



二、解决方案


在很久很久以前 , Android 项目的仓库 , 只有 jcenter 库 ;


allprojects {
    repositories {
        jcenter()
    }
}

现在需要两个仓库 : jcenter() 和 google() ;


现在需要两个仓库 : jcenter() 和 google() ;
allprojects {
    repositories {
        jcenter()
        google()




目录
相关文章
|
Android开发 开发者
Error:Could not find com.android.support:appcompat-v7:27.0.2.
Error:Could not find com.android.support:appcompat-v7:27.0.2.
|
Android开发 iOS开发
[ionic]解决运行Android、IOS出现Could not find the web assets directory
[ionic]解决运行Android、IOS出现Could not find the web assets directory
530 1
|
Android开发 开发者
安卓投屏神器 Scrcpy安 报错ERROR: Could not find any ADB device
安卓投屏神器 Scrcpy安 报错ERROR: Could not find any ADB device
1686 9
|
Android开发 开发者
安卓投屏神器 Scrcpy安 报错ERROR: Could not find any ADB device
使用Scrcpy安卓投屏工具时遇到报错,问题根源是未开启开发者模式。解决步骤:进入设置,点击【关于手机】→连续点击版本号激活开发者模式,然后在【系统设置】→【开发者选项】中开启USB调试。参照此方法后可正常执行。Scrcpy软件下载链接和GitHub页面也已提供。
3838 1
|
开发工具 Android开发
Android Studio 报错Emulator: PANIC: Cannot find AVD system path. Please define ANDROID_SDK_ROOT(解决方案)
Android Studio 报错Emulator: PANIC: Cannot find AVD system path. Please define ANDROID_SDK_ROOT(解决方案)
Android Studio 报错Emulator: PANIC: Cannot find AVD system path. Please define ANDROID_SDK_ROOT(解决方案)
|
Shell Android开发
理解adb错误:Can‘t find service: android.service.gatekeeper.IGateKeeperService
理解adb错误:Can‘t find service: android.service.gatekeeper.IGateKeeperService
理解adb错误:Can‘t find service: android.service.gatekeeper.IGateKeeperService
|
开发工具 Android开发
Appium问题解决方案(7)- Could not find 'adb.exe' in PATH. Please set the ANDROID_HOME environment variable with the Android SDK root directory path
Appium问题解决方案(7)- Could not find 'adb.exe' in PATH. Please set the ANDROID_HOME environment variable with the Android SDK root directory path
1082 0
Appium问题解决方案(7)- Could not find 'adb.exe' in PATH. Please set the ANDROID_HOME environment variable with the Android SDK root directory path
|
Java Android开发
【错误记录】Android 应用配置第三方 so 动态库 ( /data/app/comxxx==/base.apk/lib/arm64-v8a]couldn‘t find “libx.so“ )
【错误记录】Android 应用配置第三方 so 动态库 ( /data/app/comxxx==/base.apk/lib/arm64-v8a]couldn‘t find “libx.so“ )
1288 0
【错误记录】Android 应用配置第三方 so 动态库 ( /data/app/comxxx==/base.apk/lib/arm64-v8a]couldn‘t find “libx.so“ )
|
Android开发
【错误记录】Android Studio 编译报错 ( Could not find com.android.tools.build:gradle:4.2.1. )
【错误记录】Android Studio 编译报错 ( Could not find com.android.tools.build:gradle:4.2.1. )
1227 0
【错误记录】Android Studio 编译报错 ( Could not find com.android.tools.build:gradle:4.2.1. )
|
Java
Could not find class 'android.support.v4.view.ViewPager', referenced from method***
Could not find class 'android.support.v4.view.ViewPager', referenced from method***
333 0
Could not find class 'android.support.v4.view.ViewPager', referenced from method***

热门文章

最新文章