android build from source

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
borr
Prole
Posts: 42
Joined: Wed Oct 16, 2019 7:39 pm

android build from source

Post by borr »

Hello. I have a few questions about building on android.
How can I change the application label? The AndroidManifest doesn't look like it does in the docks.
android:label="${NAME}" what is this entry where is the name variable source?

gradle.properties file has commet line #app.name=LÖVE for Android
there are no other mentions of the label name

how can i change the tarject sdk version

I had to import the project into android studio.
bild from gradlew.bat give me error:

Code: Select all

* What went wrong:
A problem occurred configuring root project 'love-android'.
> Could not resolve all files for configuration ':classpath'.
   > Could not resolve com.android.tools.build:gradle:8.0.0.
     Required by:
         project :
      > No matching variant of com.android.tools.build:gradle:8.0.0 was found. The consumer was configured to find a library for use during runtime, compatible with Java 8, packaged as a jar, and its dependencies declared externally, as well as attribute 'org.gradle.plugin.api-version' with value '8.0' but:
          - Variant 'apiElements' capability com.android.tools.build:gradle:8.0.0 declares a library, packaged as a jar, and its dependencies declared externally:
              - Incompatible because this component declares a component for use during compile-time, compatible with Java 11 and the consumer needed a component for use during runtime, compatible with Java 8
              - Other compatible attribute:
                  - Doesn't say anything about org.gradle.plugin.api-version (required '8.0')
          - Variant 'javadocElements' capability com.android.tools.build:gradle:8.0.0 declares a component for use during runtime, and its dependencies declared externally:
              - Incompatible because this component declares documentation and the consumer needed a library
              - Other compatible attributes:
                  - Doesn't say anything about its target Java version (required compatibility with Java 8)
                  - Doesn't say anything about its elements (required them packaged as a jar)
                  - Doesn't say anything about org.gradle.plugin.api-version (required '8.0')
          - Variant 'runtimeElements' capability com.android.tools.build:gradle:8.0.0 declares a library for use during runtime, packaged as a jar, and its dependencies declared externally:
              - Incompatible because this component declares a component, compatible with Java 11 and the consumer needed a component, compatible with Java 8
              - Other compatible attribute:
                  - Doesn't say anything about org.gradle.plugin.api-version (required '8.0')
          - Variant 'sourcesElements' capability com.android.tools.build:gradle:8.0.0 declares a component for use during runtime, and its dependencies declared externally:
              - Incompatible because this component declares documentation and the consumer needed a library
              - Other compatible attributes:
                  - Doesn't say anything about its target Java version (required compatibility with Java 8)
                  - Doesn't say anything about its elements (required them packaged as a jar)
                  - Doesn't say anything about org.gradle.plugin.api-version (required '8.0')

* 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
User avatar
Bigfoot71
Party member
Posts: 287
Joined: Fri Mar 11, 2022 11:07 am

Re: android build from source

Post by Bigfoot71 »

Now you don't need to modify the manifests and graddle files to change the version, package names and application name, everything happens in the gradle.properties.

For the sdk target you can modify it in `app/build.graddle` but only do it if you know why, otherwise you don't need to do it.

For your error it is indeed strange, did you get a return in the console looking like this when you first launched graddle.bat:

Code: Select all

Downloading https://services.gradle.org/distributions/gradle-8.0-bin.zip
...........10%............20%............30%............40%............50%............60%...........70%............80%............90%............100%

Welcome to Gradle 8.0!
By the way, in doubt, have you cloned the repository with its dependencies like this:

Code: Select all

git clone --recurse-submodules https://github.com/love2d/love-android
My avatar code for the curious :D V1, V2, V3.
borr
Prole
Posts: 42
Joined: Wed Oct 16, 2019 7:39 pm

Re: android build from source

Post by borr »

yes, i cloned github

some problem with gradl.
------------------------
C:\Projects\love-android>gradlew.bat
Starting a Gradle Daemon, 1 incompatible and 1 stopped Daemons could not be reused, use --status for details

project builds successfully from android studio
Andlac028
Party member
Posts: 174
Joined: Fri Dec 14, 2018 2:27 pm
Location: Slovakia

Re: android build from source

Post by Andlac028 »

Some gradle build process is running in background, kill it using task manager
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 3 guests