I installed Android Studio 4.1.
I get the "build fail" error.
PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
I have tried to change the Gradle version and Gradle Plugin version, also the Java (8 and 11)but it doesn't work.
Due to limit 30000 charaters, so I posted it fully in the google doc.
Full error in google doc
The detailed error is:
A problem occurred configuring root project 'First'.
> Could not resolve all artifacts for configuration ':classpath'.
> Could not resolve com.google.flatbuffers:flatbuffers-java:1.12.0.
Required by:
project : > com.android.tools.build:gradle:4.2.0-alpha14
> Could not resolve com.google.flatbuffers:flatbuffers-java:1.12.0.
> Could not get resource 'https://jcenter.bintray.com/com/google/flatbuffers/flatbuffers-java/1.12.0/flatbuffers-java-1.12.0.pom'.
> Could not GET 'https://jcenter.bintray.com/com/google/flatbuffers/flatbuffers-java/1.12.0/flatbuffers-java-1.12.0.pom'.
> PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
> Could not resolve org.tensorflow:tensorflow-lite-metadata:0.1.0-rc2.
Required by:
project : > com.android.tools.build:gradle:4.2.0-alpha14
> Could not resolve org.tensorflow:tensorflow-lite-metadata:0.1.0-rc2.
> Could not get resource 'https://jcenter.bintray.com/org/tensorflow/tensorflow-lite-metadata/0.1.0-rc2/tensorflow-lite-metadata-0.1.0-rc2.pom'.
> Could not GET 'https://jcenter.bintray.com/org/tensorflow/tensorflow-lite-metadata/0.1.0-rc2/tensorflow-lite-metadata-0.1.0-rc2.pom'.
> PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
> Could not resolve org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.10.
Required by:
project : > com.android.tools.build:gradle:4.2.0-alpha14
project : > com.android.tools.build:gradle:4.2.0-alpha14 > com.android.tools.build:builder:4.2.0-alpha14
project : > com.android.tools.build:gradle:4.2.0-alpha14 > com.android.tools.build:aaptcompiler:4.2.0-alpha14
project : > com.android.tools.build:gradle:4.2.0-alpha14 > com.android.tools.lint:lint-gradle-api:27.2.0-alpha14
project : > com.android.tools.build:gradle:4.2.0-alpha14 > com.android.tools.build:gradle-api:4.2.0-alpha14
project : > com.android.tools.build:gradle:4.2.0-alpha14 > androidx.databinding:databinding-compiler-common:4.2.0-alpha14
project : > com.android.tools.build:gradle:4.2.0-alpha14 > com.android.tools.build:builder:4.2.0-alpha14 > com.android.tools.build:builder-model:4.2.0-alpha14
project : > com.android.tools.build:gradle:4.2.0-alpha14 > com.android.tools.build:builder:4.2.0-alpha14 > com.android.tools:sdk-common:27.2.0-alpha14
project : > com.android.tools.build:gradle:4.2.0-alpha14 > com.android.tools.build:builder:4.2.0-alpha14 > com.android.tools:common:27.2.0-alpha14
project : > com.android.tools.build:gradle:4.2.0-alpha14 > com.android.tools.build:builder:4.2.0-alpha14 > com.android.tools.build:manifest-merger:27.2.0-alpha14
project : > com.android.tools.build:gradle:4.2.0-alpha14 > com.android.tools.build:builder:4.2.0-alpha14 > com.android.tools.analytics-library:tracker:27.2.0-alpha14
project : > com.android.tools.build:gradle:4.2.0-alpha14 > com.android.tools.lint:lint-gradle-api:27.2.0-alpha14 > com.android.tools.lint:lint-model:27.2.0-alpha14
project : > com.android.tools.build:gradle:4.2.0-alpha14 > com.android.tools.build:builder:4.2.0-alpha14 > com.android.tools:sdklib:27.2.0-alpha14 > com.android.tools:repository:27.2.0-alpha14
project : > com.android.tools.build:gradle:4.2.0-alpha14 > com.android.tools.build:builder:4.2.0-alpha14 > com.android.tools:sdk-common:27.2.0-alpha14 > com.android.tools.analytics-library:shared:27.2.0-alpha14
> Could not resolve org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.10.
> Could not get resource 'https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.4.10/kotlin-stdlib-jdk8-1.4.10.pom'.
> Could not GET 'https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.4.10/kotlin-stdlib-jdk8-1.4.10.pom'.
> PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
In my case, I got this error when I upgraded Android Studio to 4.2 and commented jcenter maven repository in build.gradle, Got it resolved after uncommenting repository.
Example:
repositories {
google()
mavenCentral()
//jcenter()
/*maven {
url "https://maven.google.com"
}*/
}
In my case, I added mavenCentral() and commented "maven { ..." like below in build.gradle.
buildscript {
repositories {
google()
mavenCentral()
/*maven {
url "https://maven.google.com"
}*/
//jcenter()
}
...
Its problem come windowns 10
if u have same issues then only solutions is change network configration in control panal in windowns 10 firewal not give access you this download gradle file
or let conneted with wifi .
as well as win+r >> servics>dns restart and restart pc
Related
I'm trying to upgrade Gradle version from 4.10.3 to 6.8 for project https://archive.apache.org/dist/groovy/2.5.8/sources/apache-groovy-src-2.5.8.zip
and for that I modified build.gradle this way https://gist.github.com/iva-nova-e-katerina/c2fe31c429d19ecf2e08e53f638de451 , but I have the following error building this project:
└─$ ./gradlew -PskipIndy clean distBin 1 ⨯
Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'groovy'.
> Could not resolve all artifacts for configuration ':classpath'.
> Could not resolve me.champeau.gradle:gradle-javadoc-hotfix-plugin:0.1.
Required by:
project :
> Could not resolve me.champeau.gradle:gradle-javadoc-hotfix-plugin:0.1.
> Could not get resource 'https://dl.bintray.com/melix/gradle-javadoc-hotfix-plugin/me/champeau/gradle/gradle-javadoc-hotfix-plugin/0.1/gradle-javadoc-hotfix-plugin-0.1.pom'.
> Could not GET 'https://dl.bintray.com/melix/gradle-javadoc-hotfix-plugin/me/champeau/gradle/gradle-javadoc-hotfix-plugin/0.1/gradle-javadoc-hotfix-plugin-0.1.pom'. Received status code 403 from server: Forbidden
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 3s
Could you tell me how to fix that?
This plugin found in the repository
maven `{ url "https://repo.spring.io/plugins-release" }
look here https://gitee.com/mirrors/spring-social/blob/master/build.gradle`
Everything was woing Great, getting ready to test APK on diferent devices, but now, when i try to build, gave me this error:
Executing tasks: [:app:assembleDebug] in project C:\Users\Diego\Desktop\Kaiser
> Task :app:preBuild UP-TO-DATE
> Task :app:preDebugBuild UP-TO-DATE
> Task :app:compileDebugAidl NO-SOURCE
> Task :app:generateDebugBuildConfig UP-TO-DATE
> Task :app:compileDebugRenderscript NO-SOURCE
> Task :app:generateDebugResValues UP-TO-DATE
> Task :app:generateDebugResources UP-TO-DATE
> Task :app:processDebugGoogleServices UP-TO-DATE
> Task :app:mergeDebugResources UP-TO-DATE
> Task :app:createDebugCompatibleScreenManifests UP-TO-DATE
> Task :app:extractDeepLinksDebug UP-TO-DATE
> Task :app:processDebugManifest UP-TO-DATE
> Task :app:processDebugResources
AGPBI: {"kind":"error","text":"Android resource linking failed","sources":[{"file":"C:\\Users\\Diego\\.gradle\\caches\\transforms-2\\files-2.1\\42c451172659b686dff6601c1a023c68\\jetified-ui_legacy-8.12.0\\res\\layout\\list_preference_layout.xml","position":{"startLine":11}}],"original":"C:\\Users\\Diego\\.gradle\\caches\\transforms-2\\files-2.1\\42c451172659b686dff6601c1a023c68\\jetified-ui_legacy-8.12.0\\res\\layout\\list_preference_layout.xml:12: AAPT: warn: generated id 'android:id/icon' for external package 'android'.\n ","tool":"AAPT"}
AGPBI: {"kind":"error","text":"Android resource linking failed","sources":[{"file":"C:\\Users\\Diego\\.gradle\\caches\\transforms-2\\files-2.1\\42c451172659b686dff6601c1a023c68\\jetified-ui_legacy-8.12.0\\res\\layout\\list_preference_layout.xml","position":{"startLine":31}}],"original":"C:\\Users\\Diego\\.gradle\\caches\\transforms-2\\files-2.1\\42c451172659b686dff6601c1a023c68\\jetified-ui_legacy-8.12.0\\res\\layout\\list_preference_layout.xml:32: AAPT: warn: generated id 'android:id/summary' for external package 'android'.\n ","tool":"AAPT"}
AGPBI: {"kind":"error","text":"Android resource linking failed","sources":[{"file":"C:\\Users\\Diego\\.gradle\\caches\\transforms-2\\files-2.1\\42c451172659b686dff6601c1a023c68\\jetified-ui_legacy-8.12.0\\res\\layout\\list_preference_layout.xml","position":{"startLine":25}}],"original":"C:\\Users\\Diego\\.gradle\\caches\\transforms-2\\files-2.1\\42c451172659b686dff6601c1a023c68\\jetified-ui_legacy-8.12.0\\res\\layout\\list_preference_layout.xml:26: AAPT: warn: generated id 'android:id/title' for external package 'android'.\n ","tool":"AAPT"}
AGPBI: {"kind":"error","text":"Android resource linking failed","sources":[{"file":"C:\\Users\\Diego\\.gradle\\caches\\transforms-2\\files-2.1\\42c451172659b686dff6601c1a023c68\\jetified-ui_legacy-8.12.0\\res\\layout\\list_preference_layout.xml","position":{"startLine":42}}],"original":"C:\\Users\\Diego\\.gradle\\caches\\transforms-2\\files-2.1\\42c451172659b686dff6601c1a023c68\\jetified-ui_legacy-8.12.0\\res\\layout\\list_preference_layout.xml:43: AAPT: warn: generated id 'android:id/widget_frame' for external package 'android'.\n ","tool":"AAPT"}
AGPBI: {"kind":"error","text":"Android resource linking failed","sources":[{"file":"C:\\Users\\Diego\\Desktop\\Kaiser\\app\\src\\main\\res\\layout\\activity_main.xml","position":{"startLine":9}}],"original":"C:\\Users\\Diego\\Desktop\\Kaiser\\app\\src\\main\\res\\layout\\activity_main.xml:10: AAPT: error: resource drawable/mas (aka com.kaiser:drawable/mas) not found.\n ","tool":"AAPT"}
> Task :app:processDebugResources FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugResources'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> Android resource linking failed
C:\Users\Diego\.gradle\caches\transforms-2\files-2.1\42c451172659b686dff6601c1a023c68\jetified-ui_legacy-8.12.0\res\layout\list_preference_layout.xml:12: AAPT: warn: generated id 'android:id/icon' for external package 'android'.
C:\Users\Diego\.gradle\caches\transforms-2\files-2.1\42c451172659b686dff6601c1a023c68\jetified-ui_legacy-8.12.0\res\layout\list_preference_layout.xml:32: AAPT: warn: generated id 'android:id/summary' for external package 'android'.
C:\Users\Diego\.gradle\caches\transforms-2\files-2.1\42c451172659b686dff6601c1a023c68\jetified-ui_legacy-8.12.0\res\layout\list_preference_layout.xml:26: AAPT: warn: generated id 'android:id/title' for external package 'android'.
C:\Users\Diego\.gradle\caches\transforms-2\files-2.1\42c451172659b686dff6601c1a023c68\jetified-ui_legacy-8.12.0\res\layout\list_preference_layout.xml:43: AAPT: warn: generated id 'android:id/widget_frame' for external package 'android'.
C:\Users\Diego\Desktop\Kaiser\app\src\main\res\layout\activity_main.xml:10: AAPT: error: resource drawable/mas (aka com.kaiser:drawable/mas) not found.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 9s
8 actionable tasks: 1 executed, 7 up-to-date
i've allready try "Clean & Rebuild Project", "Invalidate Cache and Restart", "Deleting the cache folder under .gradle" "org.gradle.jvmargs=-Xmx4608m on the Grade.Property", "Advanved profiling is Disable"
I'm out of ideas (Except, maybe to burn the entire building down.. :( )
You have to open all your xml files and see if there are any errors. Fix the errors then run again. It took my hours to figure it out.
I got this error when I try to building in the console also in the event log I got some error. I don't know why.
Event log:
24/04/2019
13:35 Gradle sync started
13:36 Gradle sync failed: Cause: startup failed:
build file 'C:\Users\PC\Dropbox\Programacion\androidstudio\primera app\build.gradle': 7: unexpected token: ... # line 7, column 9.
...
^
1 error
Consult IDE log for more details (Help | Show Log) (15 s 244 ms)
14:12 Gradle sync started
14:12 Gradle sync failed: Cause: startup failed:
build file 'C:\Users\PC\Dropbox\Programacion\androidstudio\primera app\build.gradle': 7: unexpected token: ... # line 7, column 9.
...
^
1 error
Consult IDE log for more details (Help | Show Log) (672 ms)
14:15 Executing tasks: [assemble]
14:15 Gradle build finished in 329 ms
14:15 Gradle sync started
14:15 Gradle sync failed: Cause: startup failed:
build file 'C:\Users\PC\Dropbox\Programacion\androidstudio\primera app\build.gradle': 7: unexpected token: ... # line 7, column 9.
...
^
1 error
Consult IDE log for more details (Help | Show Log) (669 ms)
14:16 Executing tasks: [assemble]
14:16 Gradle build finished in 174 ms
startup failed:
build file 'C:\Users\PC\Dropbox\Programacion\androidstudio\primera app\build.gradle': 7: unexpected token: ... # line 7, column 9.
...
^
1 error
Open File
I have tried to solve this error but I don't find any fail in the file.
buildscript {
repositories {
// Gradle 4.1 and higher include support for Google's Maven repo using
// the google() method. And you need to include this repo to download
// Android Gradle plugin 3.0.0 or higher.
google()
...
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.0'
}
}
App terminates with below gradle error after two jar files added in lib folder.
Gradle Script Error
:app:packageDebug
Error:duplicate files during packaging of APK C:\Users\Admin\AndroidProjects\ImageUpload\app\build\outputs\apk\app-debug-unaligned.apk
Path in archive: META-INF/LICENSE.txt
Origin 1: C:\Users\Admin\AndroidProjects\ImageUpload\app\libs\httpmime-4.1.jar
Origin 2: C:\Users\Admin\AndroidProjects\ImageUpload\app\libs\httpclient-4.1.jar
You can ignore those files in your build.gradle:
android {
packagingOptions {
exclude 'META-INF/LICENSE.txt'
}
}
Error:Execution failed for task ':app:packageDebug'.
> Duplicate files copied in APK META-INF/LICENSE.txt
File 1: C:\Users\Admin\AndroidProjects\ImageUpload\app\libs\httpmime-4.1.jar
File 2: C:\Users\Admin\AndroidProjects\ImageUpload\app\libs\httpmime-4.1.jar
Information:BUILD FAILED
Information:Total time: 21.709 secs
Information:2 errors
Information:0 warnings
Information:See complete output in console
A test project is created in Android Studio. Then immediately clicked on run or debug.
The following message pos up:
'Execution failed for task ':app:generateDebugBuildConfig'.
Failed to create D:\Project\Android\Asd\app\build\source\buildConfig\debug\com1\example\app`
One thing I found that Java folder is empty. But in the tutorial a default file is created by the IDE. Unfortunately here it is missing. If more information is needed please post it here.
What I am missing, please help me.
***Sorry for the trouble. In response to the message:
Executing tasks: [:app:generateDebugSources]
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:prepareDebugDependencies
:app:compileDebugAidl UP-TO-DATE
:app:compileDebugRenderscript UP-TO-DATE
:app:generateDebugBuildConfig FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:generateDebugBuildConfig'.
> Failed to create D:\Project\Android\Asd\app\build\source\buildConfig\debug\com1\example\app
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 2.994 secs
This appears to be because Windows won't let you name folders COM1, COM2, etc. I had to navigate to app > manifests > AndroidManifest.xml. Then, I edited the AndroidManifest.xml file package value to take out the number after 'com'. So for you, change package=com1... to package=com..., then try re-compiling (Build > Make Project, or CTRL + F9.)
Example of the AndroidManifest.xml file that you need to edit:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.yourdomain.httpssubdomain.yourappname >
List of forbidden names:
CON, PRN, AUX, NUL, COM1, COM2, COM3, COM4, COM5, COM6, COM7, COM8, COM9, LPT1, LPT2, LPT3, LPT4, LPT5, LPT6, LPT7, LPT8, and LPT9.
Source: https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396