android源码编译错误,求指点: out/target/product/generic/obj/lib/libcamera.so', nee

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了android源码编译错误,求指点: out/target/product/generic/obj/lib/libcamera.so', nee相关的知识,希望对你有一定的参考价值。

out/target/product/generic/obj/SHARED_LIBRARIES/libcameraservice_intermediates/LINKED/libcameraservice.so'. Stop 没分但我很迫切,

参考技术A 在生成libcamera.so库文件的android.mk中即~/device/sumsumg/libcamera中,去掉其中的ifneq和ifeq条件即可编译生成libcamera.so 参考技术B 表示需要这个libcameraservice.so文件,有源文件你可以自己编译出来

错误记录Android Studio 编译报错 ( Error:Connection timed out: connect | 更新配置依赖仓库方式 )





一、报错信息



编译 VirtualAppEx 源码时 , 报如下错误 :

Gradle 'VirtualAppEx-master' project refresh failed
Error:Connection timed out: connect

使用

gradlew assembleDebug --stacktrace

命令 , 查看详细报错信息 :

D:\\002_Project\\002_Android_Learn\\VirtualApp\\003_VirtualAppEx\\VirtualAppEx-master>gradlew assembleDebug --stacktrace
Starting a Gradle Daemon, 2 incompatible Daemons could not be reused, use --status for details

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'VirtualAppEx-master'.
> Could not resolve all files for configuration ':classpath'.
   > Could not resolve com.android.tools.build:gradle:3.0.1.
     Required by:
         project :
      > Could not resolve com.android.tools.build:gradle:3.0.1.
         > Could not get resource 'https://maven.google.com/com/android/tools/build/gradle/3.0.1/gradle-3.0.1.pom'.
            > Could not HEAD 'https://maven.google.com/com/android/tools/build/gradle/3.0.1/gradle-3.0.1.pom'.
               > Connect to maven.google.com:443 [maven.google.com/142.251.43.14] failed: Connection timed out: connect
   > Could not resolve com.android.tools.build:gradle-experimental:0.11.0.
     Required by:
         project :
      > Could not resolve com.android.tools.build:gradle-experimental:0.11.0.
         > Could not get resource 'https://maven.google.com/com/android/tools/build/gradle-experimental/0.11.0/gradle-experimental-0.11.0.pom'.
            > Could not HEAD 'https://maven.google.com/com/android/tools/build/gradle-experimental/0.11.0/gradle-experimental-0.11.0.pom'.
               > Connect to maven.google.com:443 [maven.google.com/142.251.43.14] failed: Connection timed out: connect

* Try:
Run with --info or --debug option to get more log output.





二、解决方案



下面这种依赖库的配置方式无法获取到 Gradle 编译相关依赖库 ;

    repositories {
        jcenter()
        maven {
            url 'https://maven.google.com/'
            name 'Google'
        }
    }

添加 google()mavenCentral() 即可 ;

    repositories {
        jcenter()
        google()
        mavenCentral()
        maven {
            url 'https://maven.google.com/'
            name 'Google'
        }
    }

完整的 build.gradle 构建脚本如下 :

buildscript {
    repositories {
        jcenter()
        google()
        mavenCentral()
        maven {
            url 'https://maven.google.com/'
            name 'Google'
        }
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.0.1'
        classpath 'com.android.tools.build:gradle-experimental:0.11.0'
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        jcenter()
        google()
        mavenCentral()
        maven {
            url "https://jitpack.io"
        }
        maven {
            url 'https://maven.google.com/'
            name 'Google'
        }
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

修改完毕后可以正常编译 ;

以上是关于android源码编译错误,求指点: out/target/product/generic/obj/lib/libcamera.so', nee的主要内容,如果未能解决你的问题,请参考以下文章

STM32编译错误,初学者求指点

在java 事件处理中,我这段代码为啥就是没有响应啊!!编译也通过了,求大神指点啊 !!!!!!!

Android反编译调试源码

android5.0源码编译错误小结

Ubuntu(64位)编译Android源码常见错误解决办法

瑞友天翼提示Socket Error #10060 connection timed out....求高手指点