Page 1 of 1

android build from source

Posted: Thu Apr 27, 2023 8:57 pm
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

Re: android build from source

Posted: Fri Apr 28, 2023 10:52 am
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

Re: android build from source

Posted: Sat Apr 29, 2023 1:00 pm
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

Re: android build from source

Posted: Sat Apr 29, 2023 1:57 pm
by Andlac028
Some gradle build process is running in background, kill it using task manager