Giter Club home page Giter Club logo

Comments (8)

m-awadi avatar m-awadi commented on May 13, 2024 1

if you need only oneapk you can send which that contains all the features, you can use Gradle command to generate it for you ./gradlew :app:packageDebugUniversalApk.
it will generate one apk containing all the features that has <dist:fusing dist:include="true"/> in their manifest.

from android-showcase.

igorwojda avatar igorwojda commented on May 13, 2024

Both Build APK(s) and Build Bundles(s) work for me.
Make sure you use AS 3.5

from android-showcase.

ronnyremesnik avatar ronnyremesnik commented on May 13, 2024

It works for me too, but when installing the APK it crashes...
I'm on 3.5, cloned the repo, without any changes...
Here is the log..

Process: com.igorwojda.showcase, PID: 25064
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.igorwojda.showcase/com.igorwojda.showcase.app.presentation.NavHostActivity}: android.view.InflateException: Binary XML file line #11: Binary XML file line #11: Error inflating class fragment
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3120)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3263)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1960)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7089)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:975)
Caused by: android.view.InflateException: Binary XML file line #11: Binary XML file line #11: Error inflating class fragment
Caused by: android.view.InflateException: Binary XML file line #11: Error inflating class fragment
Caused by: androidx.fragment.app.Fragment$InstantiationException: Unable to instantiate fragment com.igorwojda.showcase.feature.album.presentation.albumlist.AlbumListFragment: make sure class name exists
at androidx.fragment.app.FragmentFactory.loadFragmentClass(FragmentFactory.java:91)
at androidx.fragment.app.Fragment.instantiate(Fragment.java:521)
at androidx.fragment.app.FragmentContainer.instantiate(FragmentContainer.java:57)
at androidx.fragment.app.FragmentManagerImpl$6.instantiate(FragmentManagerImpl.java:2851)
at androidx.navigation.fragment.FragmentNavigator.instantiateFragment(FragmentNavigator.java:132)
at androidx.navigation.fragment.FragmentNavigator.navigate(FragmentNavigator.java:162)
at androidx.navigation.fragment.FragmentNavigator.navigate(FragmentNavigator.java:58)
at androidx.navigation.NavGraphNavigator.navigate(NavGraphNavigator.java:71)
at androidx.navigation.NavGraphNavigator.navigate(NavGraphNavigator.java:28)
at androidx.navigation.NavGraphNavigator.navigate(NavGraphNavigator.java:71)
at androidx.navigation.NavGraphNavigator.navigate(NavGraphNavigator.java:28)
at androidx.navigation.NavController.navigate(NavController.java:859)
at androidx.navigation.NavController.onGraphCreated(NavController.java:503)
at androidx.navigation.NavController.setGraph(NavController.java:460)
at androidx.navigation.NavController.setGraph(NavController.java:425)
at androidx.navigation.NavController.setGraph(NavController.java:407)
at androidx.navigation.fragment.NavHostFragment.onCreate(NavHostFragment.java:236)
at androidx.fragment.app.Fragment.performCreate(Fragment.java:2586)
at androidx.fragment.app.FragmentManagerImpl.moveToState(FragmentManagerImpl.java:838)
at androidx.fragment.app.FragmentManagerImpl.moveToState(FragmentManagerImpl.java:1133)
at androidx.fragment.app.FragmentManagerImpl.addFragment(FragmentManagerImpl.java:1393)
at androidx.fragment.app.FragmentManagerImpl.onCreateView(FragmentManagerImpl.java:3205)
at androidx.fragment.app.FragmentController.onCreateView(FragmentController.java:134)
at androidx.fragment.app.FragmentActivity.dispatchFragmentsOnCreateView(FragmentActivity.java:357)
at androidx.fragment.app.FragmentActivity.onCreateView(FragmentActivity.java:336)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:819)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:769)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:902)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:863)
2019-09-05 11:03:26.707 25064-25064/com.igorwojda.showcase E/AndroidRuntime: at android.view.LayoutInflater.inflate(LayoutInflater.java:554)
at android.view.LayoutInflater.inflate(LayoutInflater.java:461)
at android.view.LayoutInflater.inflate(LayoutInflater.java:383)
at androidx.appcompat.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:545)
at androidx.appcompat.app.AppCompatActivity.setContentView(AppCompatActivity.java:161)
at com.igorwojda.showcase.library.base.presentation.activity.BaseActivity.onCreate(BaseActivity.kt:16)
at com.igorwojda.showcase.app.presentation.NavHostActivity.onCreate(NavHostActivity.kt:15)
at andro

from android-showcase.

igorwojda avatar igorwojda commented on May 13, 2024

I did some testing on Emulators API 21, 28, 29 (clean checkout) and all of them runs fine.

Looks like it may be a build problem maybe related to cache. Try to clean all caches:

  1. Project Gradle cache (android-showcase/.gradle folder)
  2. System Gradle cache (~/.dradle)
  3. Build cache (delete all module\build folders)
  4. Run Android Studio File -> Invalidate Caches / Restart

If above will not help try to build app on another machine (just to test it) and please post a link to the generated apk file.

from android-showcase.

ronnyremesnik avatar ronnyremesnik commented on May 13, 2024

@igorwojda I tried all your steps, nothing helped, here is the APK
https://drive.google.com/file/d/16vUeIB7oNce53w_i0COaVwiExMc9A74j/view?usp=sharing

from android-showcase.

ronnyremesnik avatar ronnyremesnik commented on May 13, 2024

Hey @igorwojda what's up ?
did you have a chance to look into the generated APK ?
I constantly see this error

     Caused by: java.lang.ClassNotFoundException: Didn't find class "com.igorwojda.showcase.feature.album.presentation.albumlist.AlbumListFragment" on path: DexPathList[[zip file "/data/app/com.igorwojda.showcase-1/base.apk"],nativeLibraryDirectories=[/data/app/com.igorwojda.showcase-1/lib/x86, /system/lib, /vendor/lib]]

And I looked into the generated APK with the Analyze APK and didn't find this class inside...

from android-showcase.

ronnyremesnik avatar ronnyremesnik commented on May 13, 2024

@igorwojda I think I understand the problem now, the project contains multiple apk's and when I'm installing the app, it's only this APK and is not include the other feature modules APKs.

In order to install it right, I used the bundle tool
https://developer.android.com/studio/command-line/bundletool

and first created one unified APK that contains all the APK's - build-apks
and afterward, install it on the device using install-apks

I think it's worth to include that in the readme file.

from android-showcase.

igorwojda avatar igorwojda commented on May 13, 2024

I didn't really have time to investigate it properly but thank you for the contribution.

I guess I also never experienced the p[roblem because I am always installing and "running" the app on the device using AS.

Did you installed it manually? If yes why not use AS?

from android-showcase.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.