Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content

Cannot build apps/app

  • /e/ version: N/A
  • Device model(s): N/A

Summary

The apps/app repo is not clonable: I wanted to help and fix some issues but I cannot build the repo.

The problem

  • Install Android Studio
  • Install SDK 28
  • Clone apps/app
  • Run it the app in an emulator or an actual device (with /e/)

What is the current behavior?

The app crashes

What is the expected correct behavior?

The app should open...

Technical informations

 Process: foundation.e.apps, PID: 7341
    java.lang.RuntimeException: Unable to start activity ComponentInfo{foundation.e.apps/foundation.e.apps.MainActivity}: android.view.InflateException: Binary XML file line #36 in foundation.e.apps:layout/activity_main: Binary XML file line #36 in foundation.e.apps:layout/activity_main: Error inflating class com.google.android.material.bottomnavigation.BottomNavigationView
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3449)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3601)
        at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85)
        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2066)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loop(Looper.java:223)
        at android.app.ActivityThread.main(ActivityThread.java:7656)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
     Caused by: android.view.InflateException: Binary XML file line #36 in foundation.e.apps:layout/activity_main: Binary XML file line #36 in foundation.e.apps:layout/activity_main: Error inflating class com.google.android.material.bottomnavigation.BottomNavigationView
     Caused by: android.view.InflateException: Binary XML file line #36 in foundation.e.apps:layout/activity_main: Error inflating class com.google.android.material.bottomnavigation.BottomNavigationView
     Caused by: java.lang.reflect.InvocationTargetException
        at java.lang.reflect.Constructor.newInstance0(Native Method)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:343)
        at android.view.LayoutInflater.createView(LayoutInflater.java:852)
        at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:1004)
        at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:959)
        at android.view.LayoutInflater.rInflate(LayoutInflater.java:1121)
        at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1082)
        at android.view.LayoutInflater.inflate(LayoutInflater.java:680)
        at android.view.LayoutInflater.inflate(LayoutInflater.java:532)
        at android.view.LayoutInflater.inflate(LayoutInflater.java:479)
        at androidx.appcompat.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:555)
        at androidx.appcompat.app.AppCompatActivity.setContentView(AppCompatActivity.java:161)
        at foundation.e.apps.MainActivity.onCreate(MainActivity.kt:86)
        at android.app.Activity.performCreate(Activity.java:8000)
        at android.app.Activity.performCreate(Activity.java:7984)
        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1309)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3422)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3601)
        at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85)
        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2066)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loop(Looper.java:223)
        at android.app.ActivityThread.main(ActivityThread.java:7656)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
     Caused by: android.content.res.Resources$NotFoundException: Resource ID #0x3f080002
        at android.content.res.ResourcesImpl.getValue(ResourcesImpl.java:237)
2021-01-18 13:56:15.044 7341-7341/foundation.e.apps E/AndroidRuntime:     at android.content.res.Resources.getValue(Resources.java:1428)
        at androidx.appcompat.widget.ResourceManagerInternal.createDrawableIfNeeded(ResourceManagerInternal.java:176)
        at androidx.appcompat.widget.ResourceManagerInternal.getDrawable(ResourceManagerInternal.java:141)
        at androidx.appcompat.widget.ResourceManagerInternal.getDrawable(ResourceManagerInternal.java:132)
        at androidx.appcompat.content.res.AppCompatResources.getDrawable(AppCompatResources.java:104)
        at androidx.appcompat.view.menu.MenuItemImpl.getIcon(MenuItemImpl.java:505)
        at com.google.android.material.bottomnavigation.BottomNavigationItemView.initialize(BottomNavigationItemView.java:107)
        at com.google.android.material.bottomnavigation.BottomNavigationMenuView.buildMenuView(BottomNavigationMenuView.java:525)
        at com.google.android.material.bottomnavigation.BottomNavigationPresenter.updateMenuView(BottomNavigationPresenter.java:62)
        at com.google.android.material.bottomnavigation.BottomNavigationView.inflateMenu(BottomNavigationView.java:302)
        at com.google.android.material.bottomnavigation.BottomNavigationView.<init>(BottomNavigationView.java:214)
        at com.google.android.material.bottomnavigation.BottomNavigationView.<init>(BottomNavigationView.java:124)

Solutions

Workaround

I think the main issue is that the e-ui-sdk.jar doesn't seem to build properly because I removed any reference to it and it seems to work (I basically removed every reference starting with @lineageos.platform).

image

Does anyone have experience building the apps project with Android Studio 4.1.1?

Possible fixes

Please write a Build.md or something to overcome this issue because it would help finding contributors :)