Jellyfin Forum
Building APK - Error AAPT: error: resource string/app_name_debug not found - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Development (https://forum.jellyfin.org/f-development)
+--- Forum: Client Development (https://forum.jellyfin.org/f-client-development)
+---- Forum: Android TV Development (https://forum.jellyfin.org/f-android-tv-development)
+---- Thread: Building APK - Error AAPT: error: resource string/app_name_debug not found (/t-building-apk-error-aapt-error-resource-string-app-name-debug-not-found)



Building APK - Error AAPT: error: resource string/app_name_debug not found - Skankhunt42 - 2023-08-01

Hello,

i wanted to clone the github repo of the Android TV Client and build an APK out of it.
Gradle Sync and Gradle Build are running fine, deploying the debug build to AVD also works.

When building an APK it gives me the following error:

Code:
...\debugAndroidTest\mergeDebugAndroidTestResources\merged.dir\values\values.xml:4: AAPT: error: resource string/app_name_debug (aka org.jellyfin.androidtv.debug.test:string/app_name_debug) not found.

jellyfin-androidtv\app\build\intermediates\incremental\debugAndroidTest\mergeDebugAndroidTestResources\merged.dir\values\values.xml:4 looks as follows:

Code:
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <string name="app_id" translatable="false">org.jellyfin.androidtv.debug</string>
    <string name="app_name" translatable="false">@string/app_name_debug</string>
    <string name="app_search_suggest_authority" translatable="false">org.jellyfin.androidtv.debug.content</string>
    <string name="app_search_suggest_intent_data" translatable="false">content://org.jellyfin.androidtv.debug.content/intent</string>
</resources>

The file res/values/strings/strings.xml contains the app_name_debug string:
Code:
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:tools="http://schemas.android.com/tools" tools:ignore="MissingTranslation">
    <string name="app_name_release" translatable="false" tools:ignore="UnusedResources">Jellyfin</string>
    <string name="app_name_debug" translatable="false" tools:ignore="UnusedResources">Jellyfin Debug</string>


Has anyone also had this issue?

I am not able to find the issue.

Thank you!


RE: Building APK - Error AAPT: error: resource string/app_name_debug not found - niels - 2023-08-02

We recently released a new beta version so you can easily get an up-to-date signed APK from GitHub: https://github.com/jellyfin/jellyfin-androidtv/releases/tag/v0.16.0-beta.1

If you still want to build it yourself it should be relatively easy:

1. Clone the project from GitHub
2. Open it in Android Studio (must be version 2022.3.1 giraffe or newer)
3. Let it index the project,
4. Press the build button

The error you're getting could be caused by an invalid Android Studio version, corrupt caches or invalid changes. I'd try to clean the project with the Gradle clean task (in terminal: ./gradlew clean) and maybe try the "invalidate caches" option in Android Studio (in the File menu).


RE: Building APK - Error AAPT: error: resource string/app_name_debug not found - Skankhunt42 - 2023-08-03

(2023-08-02, 07:21 AM)niels Wrote: We recently released a new beta version so you can easily get an up-to-date signed APK from GitHub: https://github.com/jellyfin/jellyfin-androidtv/releases/tag/v0.16.0-beta.1

If you still want to build it yourself it should be relatively easy:

1. Clone the project from GitHub
2. Open it in Android Studio (must be version 2022.3.1 giraffe or newer)
3. Let it index the project,
4. Press the build button

The error you're getting could be caused by an invalid Android Studio version, corrupt caches or invalid changes. I'd try to clean the project with the Gradle clean task (in terminal: ./gradlew clean) and maybe try the "invalidate caches" option in Android Studio (in the File menu).

Thanks for your reply.

I followed every of your steps.

Cloned the Git and Opened in Android Studio, didnt make any changes to the source code and ran a build.
Build runs fine as previously.

Building an APK still gave me these resource linking failure.

I
ve cleaned the Gradle with ./gradlew clean and also ran invalidate caches and checked all checkboxes.

Build runs still fine, buidling an APK still gives me resource linking error as before.

I have tried it on another system with freshly installed latest Android Studio, did all the same again and got the same error.

Android Studio Version:

https://imgur.com/a/YMUZJKQ


RE: Building APK - Error AAPT: error: resource string/app_name_debug not found - niels - 2023-08-04

How exactly are you building the APK? Are you directly deploying to a device from Android Studio with the run button or using some other method?


RE: Building APK - Error AAPT: error: resource string/app_name_debug not found - Skankhunt42 - 2023-08-06

(2023-08-04, 07:13 PM)niels Wrote: How exactly are you building the APK? Are you directly deploying to a device from Android Studio with the run button or using some other method?

Over the Build Context Menu Build Bundle(s)/APK. 
Deploying to AVD works fine.


RE: Building APK - Error AAPT: error: resource string/app_name_debug not found - vittatus - 2024-05-29

I get the same error, could you solve it?

thanks!