Erro ao executar projeto no netbeans 8.2 associado ao android sdk

23/12/2016

0

Fui em busca de soluções associadas a bibliotecas e afins, e me deram uma solução de forma a fazer um downgrade do netbeans 8.2 para o 8.1
Antes de recorrer a isso gostaria de saber se poderia haver uma outra solução

Foco nessas 2 linhas:

"D:\\Users\\Boneco_Sinforoso\\AppData\\Local\\Android\\Sdk\\tools\\ant\\build.xml:958: The following error occurred while executing this line:
D:\\Users\\Boneco_Sinforoso\\AppData\\Local\\Android\\Sdk\\tools\\ant\\build.xml:969: The following error occurred while executing this line:"

O que saiu quando executei:

ant -f "D:\\\\Usuários\\\\Boneco Sinforoso\\\\Documents\\\\NetBeansProjects\\\\AndroidApp_03" debug
Android SDK Tools Revision 25.2.4
Installed at D:\\Users\\Boneco_Sinforoso\\AppData\\Local\\Android\\Sdk
Project Name: AndroidApp_03
Project Type: Application
Using latest Build Tools: 25.0.2
Resolving Build Target for AndroidApp_03...
Project Target: Android 4.4.2
API level: 19
WARNING: No minSdkVersion value set. Application will install on all Android versions.
----------
Creating output directories if needed...
Created dir: D:\\Usuários\\Boneco Sinforoso\\Documents\\NetBeansProjects\\AndroidApp_03\\bin\\rsObj
Created dir: D:\\Usuários\\Boneco Sinforoso\\Documents\\NetBeansProjects\\AndroidApp_03\\bin\\rsLibs
----------
Resolving Dependencies for AndroidApp_03...
Library dependencies:
No Libraries
------------------
----------
Building Libraries with 'debug'...
No sub-builds to iterate on
Found Deleted Target File
Merging AndroidManifest files into one.
Manifest merger disabled. Using project manifest only.
Handling aidl files...
No AIDL files to compile.
----------
Handling RenderScript files...
----------
Handling Resources...
Found Deleted Target File
Generating resource IDs...
----------
Handling BuildConfig class...
Generating BuildConfig class.
Compiling 2 source files to D:\\Usuários\\Boneco Sinforoso\\Documents\\NetBeansProjects\\AndroidApp_03\\bin\\classes
warning: [options] source value 1.5 is obsolete and will be removed in a future release
warning: [options] target value 1.5 is obsolete and will be removed in a future release
warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
3 warnings
input: D:\\Usuários\\Boneco Sinforoso\\Documents\\NetBeansProjects\\AndroidApp_03\\bin\\classes
Found Deleted Target File
Converting compiled files and external libraries into D:\\Usuários\\Boneco Sinforoso\\Documents\\NetBeansProjects\\AndroidApp_03\\bin\\classes.dex...
Crunching PNG Files in source dir: D:\\Usuários\\Boneco Sinforoso\\Documents\\NetBeansProjects\\AndroidApp_03\\res
To destination dir: D:\\Usuários\\Boneco Sinforoso\\Documents\\NetBeansProjects\\AndroidApp_03\\bin\\res
Crunched 0 PNG files to update cache
Creating full resource package...
Current build type is different than previous build: forced apkbuilder run.
Creating AndroidApp_03-debug-unaligned.apk and signing it with a debug key...
D:\\Users\\Boneco_Sinforoso\\AppData\\Local\\Android\\Sdk\\tools\\ant\\build.xml:958: The following error occurred while executing this line:
D:\\Users\\Boneco_Sinforoso\\AppData\\Local\\Android\\Sdk\\tools\\ant\\build.xml:969: The following error occurred while executing this line:
D:\\Users\\Boneco_Sinforoso\\AppData\\Local\\Android\\Sdk\\tools\\ant\\build.xml:312:
java.lang.NoClassDefFoundError: Could not initialize class sun.security.x509.X500Name
at com.android.sdklib.internal.build.SignedJarBuilder.writeSignatureBlock(SignedJarBuilder.java:384)
at com.android.sdklib.internal.build.SignedJarBuilder.close(SignedJarBuilder.java:273)
at com.android.sdklib.build.ApkBuilder.sealApk(ApkBuilder.java:795)
at com.android.ant.ApkBuilderTask.execute(ApkBuilderTask.java:371)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293)
at sun.reflect.GeneratedMethodAccessor64.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293)
at sun.reflect.GeneratedMethodAccessor64.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:396)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293)
at sun.reflect.GeneratedMethodAccessor64.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68)
at com.android.ant.IfElseTask.execute(IfElseTask.java:124)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293)
at sun.reflect.GeneratedMethodAccessor64.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68)
at com.android.ant.IfElseTask.execute(IfElseTask.java:124)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293)
at sun.reflect.GeneratedMethodAccessor64.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:68)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293)
at sun.reflect.GeneratedMethodAccessor64.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:396)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:293)
at sun.reflect.GeneratedMethodAccessor64.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:435)
at org.apache.tools.ant.Target.performTasks(Target.java:456)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1405)
at org.apache.tools.ant.Project.executeTarget(Project.java:1376)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1260)
at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:286)
at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:555)
at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:153)
FALHA NA CONSTRUÇÃO (tempo total: 1 segundo)
ícaro Carvalho

ícaro Carvalho

Responder

Posts

29/08/2017

Marcos Campos

Olá Ícaro, tudo bem?
O plugin nbandroid não é compatível com o NetBeans 8.2, tive o mesmo problema que você. Solução é downgrade.
Abraços!
Fonte:
https://stackoverflow.com/questions/40041658/netbeans-clean-build-android-error-java-lang-x500principal-access
Responder

Utilizamos cookies para fornecer uma melhor experiência para nossos usuários, consulte nossa política de privacidade.

Aceitar