424 views
in Getting started by

Hello,

I am trying to follow this guide: https://doc.embedded-wizard.de/getting-started-android

My environment

- Windows 10 running on a Virtual Machine
- The Android command line tool downloaded is this version: commandlinetools-win-6858069_latest.zip

Where I am

I am able to install the tools and when first started StartGradleBuildEnvironment.bat was able to install all the AndroidSDK development tools (and have a file called AndroidSdkInstallDone created).

Where I got stuck

when trying to do `gradlew -q appStart` the build stop with this message:

FAILURE: Build failed with an exception. 
* What went wrong: A problem occurred configuring project ':app'.
> java.lang.NullPointerException (no error message)

Following the guide, I have tried to split the command and run gradlew -q assembleDebug --stacktrace (the output is long so I'll embed it at the end)

Q1. What have I messed up this time? :-)
Q2. I also noticed that the Java JDK used is version 14.0.2 - Is there a technical reason for that or just licensing issues? I am concerned because oracle says the older versions won't get security fixes.

Thank you very much for everyone's time and patience with me.

update: I exceeded the 20,000 char limit with the stack trace (if there is a way to attach a text file, that will be great)
I'll try to snip the middle of the stacktrace output for now.

C:\EmbWiz\Android\Application\Project>gradlew -q assembleDebug --stacktrace

FAILURE: Build failed with an exception.

* Exception is:
org.gradle.api.ProjectConfigurationException: A problem occurred configuring project ':app'.

<snip to stay under 20,000 chars>   
       
        at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
        at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
        at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
Caused by: java.lang.NullPointerException
        at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:782)
        at com.android.build.gradle.internal.ndk.NdkHandler.getPlatformVersion(NdkHandler.java:158)
        at com.android.build.gradle.internal.ndk.NdkHandler.supports64Bits(NdkHandler.java:331)
        at com.android.build.gradle.internal.ndk.NdkHandler.getSupportedAbis(NdkHandler.java:403)
        at com.android.build.gradle.tasks.ExternalNativeJsonGenerator.create(ExternalNativeJsonGenerator.java:738)
        at com.android.build.gradle.internal.TaskManager.createExternalNativeBuildJsonGenerators(TaskManager.java:1711)
        at com.android.build.gradle.internal.ApplicationTaskManager.lambda$createTasksForVariantScope$10(ApplicationTaskManager.java:210)
        at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:81)
        at com.android.build.gradle.internal.ApplicationTaskManager.createTasksForVariantScope(ApplicationTaskManager.java:205)
        at com.android.build.gradle.internal.VariantManager.createTasksForVariantData(VariantManager.java:530)
<snip to stay under 20,000 chars>   
* Get more help at https://help.gradle.org 
BUILD FAILED in 12s

1 Answer

0 votes
by
Hello,

thank you for the detailed description of the issue.

We just tried to reinstall and rebuild everything according to the Getting Started manual and we got the same "java.lang.NullPointerException (no error message)"... Unfortunately this error message is not very helpful.

Building the GUI application still works in case of using an older version of the Android SDK command line tools.

We will do further investigations and hope to find a solution very soon. We will inform you here.

Thanks again and best regards,

Manfred.
by

Hello,

good news: the problem is fixed now and building the Android app with the latest Android SDK Build-Tools works again.

Please download once more the Android Build Environment from our website and let us know if it is working now...

Best regards,

Manfred.

Embedded Wizard Website | Privacy Policy | Imprint

...