I am building android source code on ubuntu 10.04.While Building source code I got following build error.
javadoc: error - In doclet class com.google.doclava.Doclava, method
start has thrown an exception
java.lang.reflect.InvocationTargetException
java.lang.NoSuchMethodError: java.lang.String.isEmpty()Z
I am using /usr/lib/jvm/java-6-sun
Related
I have downloaded sdk-tools-windows-4333796.zip file from official website and extracted in a folder. But I am facing below issue while opening sdkmanager.bat from cmd.
Error : Exception in thread "main"
java.lang.IncompatibleClassChangeError at
java.lang.invoke.MethodHandleNatives.linkMethodHandleConstant(MethodH
andleNatives.java:383) at
com.android.sdklib.tool.sdkmanager.InstallAction.register(InstallActi
on.java:46) at
com.android.sdklib.tool.sdkmanager.SdkManagerCliSettings.(Sdk
ManagerCliSettings.java:65) at
com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.j
ava:57) at
com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.j
ava:48) Caused by: java.lang.NoSuchMethodException: no such method:
java.lang.invoke.Lam
bdaMetafactory.metafactory(Lookup,String,MethodType,MethodType,MethodHandle,Meth
odType)CallSite/invokeStatic at
java.lang.invoke.MemberName.makeAccessException(MemberName.java:765)
at
java.lang.invoke.MemberName$Factory.resolveOrFail(MemberName.java:882
) at
java.lang.invoke.MethodHandles$Lookup.resolveOrFail(MethodHandles.jav
a:1018) at
java.lang.invoke.MethodHandles$Lookup.linkMethodHandleConstant(Method
Handles.java:1322) at
java.lang.invoke.MethodHandleNatives.linkMethodHandleConstant(MethodH
andleNatives.java:381) ... 4 more Caused by:
java.lang.NoSuchMethodError: java.lang.invoke.LambdaMetafactory.metaf
actory(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invok
e/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/l
ang/invoke/MethodType;)Ljava/lang/invoke/CallSite; at
java.lang.invoke.MethodHandleNatives.resolve(Native Method) at
java.lang.invoke.MemberName$Factory.resolve(MemberName.java:854)
at
java.lang.invoke.MemberName$Factory.resolveOrFail(MemberName.java:879
) ... 7 more
I installed the whole Android Studio that comes with the SDK Manager.
Others seem to have solved this by updating Java or installing the latest Java jdk.
If that doesnt help post your Java version here.
I receive on my hosted (Hosted VS2017) VSTS Build the following error:
COMPILETODALVIK(0,0): Error :
Processed: ##vso[task.logissue type=Error;sourcepath=COMPILETODALVIK;linenumber=0;columnnumber=0;code=;]
COMPILETODALVIK : UNEXPECTED TOP-LEVEL error : [d:\a\1\s\src\Android\Android.csproj]
Exception in thread "main"
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "main"
The build locally works without errors.
Thanks to #Milen to add the link.
Increasing the Java Max Heap Size to 1G in my project solves the problem. You will found this configuration in your project properties under Android Options and the click the button Advanced.
ATTENTION: Do this in the build configuration where you need it. I added it to both Debug and Release.
I am new here. When I use Inspect Code in Android Studio 0.9.2, I get the error:
null
java.lang.StackOverflowError
at com.android.tools.lint.checks.RelativeOverlapDetector$LayoutNode.canGrowLeft(RelativeOverlapDetector.java:265)
at com.android.tools.lint.checks.RelativeOverlapDetector$LayoutNode.canGrowLeft(RelativeOverlapDetector.java:266)
at com.android.tools.lint.checks.RelativeOverlapDetector$LayoutNode.canGrowLeft(RelativeOverlapDetector.java:266)
at com.android.tools.lint.checks.RelativeOverlapDetector$LayoutNode.canGrowLeft(RelativeOverlapDetector.java:266)
at com.android.tools.lint.checks.RelativeOverlapDetector$LayoutNode.canGrowLeft(RelativeOverlapDetector.java:266)
But when I run lint command in Term, it works fine.
I have the following errors after installing android sdk, and android plugin for NetBeans:
c:/Android/android-sdk/tools/ant/build.xml:892:The following error occurred while executing this line:
c:/Android/android-sdk/tools/ant/build.xml:894: The following error occurred while executing this line:
c:/Android/android-sdk/tools/ant/build.xml:906: The following error occurred while executing this line:
c:/Android/android-sdk/tools/ant/build.xml:284: null return: 2
My guess is that the environment is not properly configured to run the build. You can look into c:/Android/android-sdk/tools/ant/build.xml:284 to see what is executed there. You may need to tell Ant where is Java installed or something similar.
I get the following stack trace when running my Android tests on the Emulator:
java.lang.NoClassDefFoundError: client.HttpHelper
at client.Helper.<init>(Helper.java:14)
at test.Tests.setUp(Tests.java:15)
at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:164)
at android.test.AndroidTestRunner.runTest(AndroidTestRunner.java:151)
at android.test.InstrumentationTestRunner.onStart(InstrumentationTestRunner.java:425)
at android.app.Instrumentation$InstrumentationThread.run(Instrumentation.java:1520)
Caused by: java.lang.IllegalAccessError: cross-loader access from pre-verified class
at dalvik.system.DexFile.defineClass(Native Method)
at dalvik.system.DexFile.loadClass(DexFile.java:193)
at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:203)
at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
at java.lang.ClassLoader.loadClass(ClassLoader.java:532)
... 11 more
I run my tests from an extra project. And it seems there are some problems with loading the classes from the other project. I have run the tests before but now they are failing. The project under tests runs without problems.
Line 14 of the Helper Class is:
this.httpHelper = new HttpHelper(userProfile);
I start a HttpHelper class that is responsible for executing httpqueries. I think somehow this helper class is not available anymore, but I have no clue why.
I was having the same problem but in my case I was adding the library reference to both the application and test projects.
By removing the reference to library from the test project and leaving only the reference to the application project the problem was solved. The java.lang.IllegalAccessError exception and the message 'Class resolved by unexpected DEX' were the clues to help solve this problem.