#Android App project with Maven

35 messages · Page 1 of 1 (latest)

slim lance
#

using mvn archetype:generate -DarchetypeArtifactId=android-release -DarchetypeGroupId=de.akquinet.android.archetypes -DarchetypeVersion=1.0.9 -DgroupId=... -DartifactId=... -Dpackage=....android

and building with mvn clean install

tardy wrenBOT
#

This post has been reserved for your question.

Hey @slim lance! Please use /close or the Close Post button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically marked as dormant after 720 minutes of inactivity.

TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.

slim lance
#

changed the platform to 35 instead of the 16 it was in the generated pom, because that's what I have installed. changed the android plugin's version from 3.5.x to 3.8.0 because that's the latest without rc or snapshot.

I have done the installations with sdkmanager, and have $ANDROID_HOME pointed to the directory where that stuff is located in. it gives me Error reading /home/fabricio/installed/android-tools/tools/source.properties

if I point the env var to the platform-tools/android-35 inside of that directory, I get ```
Execution default-generate-sources of goal com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.8.0:generate-sources failed: Invalid SDK: Platform/API level 35 not available. This command should give you all you need:
[ERROR] /home/fabricio/installed/android-tools/platform-tools/android-35/tools/android update sdk --no-ui --obsolete --force

#

cc @west juniper

#

there is no directory named tools btw

west juniper
#

And here's how an SDK directory structure should look like

slim lance
#
total 158M
drwxrwxr-x 2 fabricio fabricio 4.0K Apr 27 16:42 add-ons
drwxrwxr-x 5 fabricio fabricio 4.0K Jul  1  2025 build-tools
drwxrwxr-x 5 fabricio fabricio 4.0K Jun 27  2025 cmdline-tools
-rw-rw-r-- 1 fabricio fabricio 158M Mar 13  2025 commandlinetools-linux-13114758_latest.zip
drwxrwxr-x 8 fabricio fabricio 4.0K Jun 27  2025 emulator
drwxrwxr-x 2 fabricio fabricio 4.0K Jul  1  2025 licenses
drwxrwxr-x 3 fabricio fabricio 4.0K Jul  1  2025 ndk
drwxrwxr-x 3 fabricio fabricio 4.0K Jul  1  2025 platforms
drwxrwxr-x 3 fabricio fabricio 4.0K Jul  1  2025 platform-tools
drwxrwxr-x 3 fabricio fabricio 4.0K Apr 27 17:15 sources
drwxrwxr-x 3 fabricio fabricio 4.0K Jul  1  2025 system-images
#

I have no tools dir there for some reason?

west juniper
#

How did you install the SDK?

slim lance
west juniper
#

Okay lemme check something

#

If I recall correctly, the directory where sdkmanager resides should be the tools directory

slim lance
#

mine is called cmdline-tools

west juniper
#

is there source.properties in there?

slim lance
#

yes

#

there's also a latest directory inside of it which has the bin/ with the latest sdkmanager executable

#

I renamed the dir to tools/ and then moved latest/ outside and renamed that one to tools/, both cases give Execution default-generate-sources of goal com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.8.0:generate-sources failed: Cannot invoke "com.android.sdklib.BuildToolInfo.getPath(com.android.sdklib.BuildToolInfo$PathId)" because the return value of "com.android.sdklib.IAndroidTarget.getBuildToolInfo()" is null

west juniper
#

Also, can you show your pom.xml and what maven command you are using?

slim lance
slim lance
# west juniper how does the `tools` directory structure look like now?
tools/
├── bin
│   ├── apkanalyzer
│   ├── avdmanager
│   ├── d8
│   ├── lint
│   ├── profgen
│   ├── r8
│   ├── resourceshrinker
│   ├── retrace
│   ├── screenshot2
│   └── sdkmanager
├── lib
│   ├── analytics-library
│   ├── annotations
│   ├── apkanalyzer-classpath.jar
│   ├── apkparser
│   ├── avdmanager-classpath.jar
│   ├── build-system
│   ├── common
│   ├── d8-classpath.jar
│   ├── ddmlib
│   ├── device_validator
│   ├── external
│   ├── layoutlib-api
│   ├── lint
│   ├── lint-classpath.jar
│   ├── misc
│   ├── profgen
│   ├── profgen-classpath.jar
│   ├── r8-classpath.jar
│   ├── r8.jar
│   ├── README
│   ├── repository
│   ├── resourceshrinker-classpath.jar
│   ├── retrace-classpath.jar
│   ├── screenshot2-classpath.jar
│   ├── sdk-common
│   ├── sdklib
│   ├── sdkmanager-classpath.jar
│   └── zipflinger
├── NOTICE.txt
├── package.xml
└── source.properties

18 directories, 25 files
west juniper
#

Have you tried adding <path> in <sdk> to point to your SDK location?

slim lance
#

hm, do I have to do that? thought that's what the $ANDROID_HOME was needed for

#

can I read $ANDROID_HOME from within the pom? hardcoding it feels icky

#

ah, found it

#

${env.ANDROID_HOME}, still the same error

tardy wrenBOT
#

💤 Post marked as dormant

This post has been inactive for over 720 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.
In case your post is not getting any attention, you can try to use /help ping.
Warning: abusing this will result in moderative actions taken against you.

slim lance
#

@west juniper hello?

west juniper
#

Ah sorry, I didn't respond because I had no idea what else you could try at this point :/

slim lance
#

oh well,

#

thanks

tardy wrenBOT
# slim lance thanks

If you are finished with your post, please close it.
If you are not, please ignore this message.
Note that you will not be able to send further messages here after this post have been closed but you will be able to create new posts.