Giter Site home page Giter Site logo

athkalia / just-another-android-app Goto Github PK

View Code? Open in Web Editor NEW
1.6K 48.0 174.0 2.18 MB

An Android base app with loads of cool libraries/configuration NOT MAINTAINED

License: Apache License 2.0

Java 88.54% Kotlin 11.46%
android android-development android-architecture mvp-android dagger2 mosby fabric crashlytics rxjava retrofit2

just-another-android-app's Introduction

> help --info
> Engineering manager with 11 years of experience. I have managed teams of up to 70 people,
> putting a big focus on creating inclusive, high-performing teams. Curious and passionate about
> technology and how it affects the society that we live in.
> help --contact
> follow on www.sakiskaliakoudas.com
> read about my adventures on medium: https://medium.com/@skaliakoudas
> ..or twitter: https://twitter.com/skaliakoudas
> checkout the books I am reading at https://www.goodreads.com/review/list/108597651
> checkout the podcasts I am listening to at http://sakiskaliakoudas.com/podcasts.html

just-another-android-app's People

Contributors

egor-n avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

just-another-android-app's Issues

Create a details Activity

Hello, there is any possibility to add a details activity? I would like to see how works with SubComponent and etc..

gradlew test fails

not sure if I am executing the right command, but running

gradlew test

results in

...
com.example.lint.detectors.AndroidLogDetectorTest > test_detector_triggering FAILED
    junit.framework.AssertionFailedError at AndroidLogDetectorTest.java:43

com.example.lint.detectors.AndroidLogDetectorTest > test_detector_not_triggering FAILED
    junit.framework.AssertionFailedError at AndroidLogDetectorTest.java:33

4 tests completed, 2 failed
:lint:test FAILED

Examining the generated result (using build/reports/tests/test/index.html) is not particularly helpful, at least to me.

junit.framework.AssertionFailedError: Found compilation problems in lint test not overriding allowCompilationErrors():
AndroidLogNotExistingTestCase.java:Error: 1: The type java.lang.Object cannot be resolved. It is indirectly referenced from required .class files
AndroidLogNotExistingTestCase.java:Error: 5: Implicit super constructor Object() is undefined. Must explicitly invoke another constructor

	at junit.framework.Assert.fail(Assert.java:57)

Was very tricky to integrate React-native into the app

This is not a bug.

But it turned out to be very very tricky to integrate react native into the Just-another-android app.
The problem turned out to be conflict in versions of okhttp

See this discussion
http://stackoverflow.com/questions/43020878/react-native-activity-crashes-probably-related-to-packaging-okhttp3

so just sharing, if others run into it.
Or may be, it would make sense to add some comments in to the gradle wrt this potential conflict (if it persists in the next couple of iterations of react native).

While app launch: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/facebook/stetho/Stetho

Environment: Android Studio 2.23
Gradle: 3.2.1

The stack trace is here:

E/AndroidRuntime: FATAL EXCEPTION: main
                  Process: com.example.develop, PID: 4309
                  java.lang.NoClassDefFoundError: Failed resolution of: Lcom/facebook/stetho/Stetho;
                      at com.example.util.StethoToolImpl.init(StethoToolImpl.java:24)
                      at com.example.App.initStetho(App.java:93)
                      at com.example.App.onCreate(App.java:32)
                      at com.android.tools.fd.runtime.BootstrapApplication.onCreate(BootstrapApplication.java:370)
                      at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1036)
                      at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5492)
                      at android.app.ActivityThread.-wrap2(ActivityThread.java)
                      at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1571)
                      at android.os.Handler.dispatchMessage(Handler.java:102)
                      at android.os.Looper.loop(Looper.java:154)
                      at android.app.ActivityThread.main(ActivityThread.java:6209)
                      at java.lang.reflect.Method.invoke(Native Method)
                      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865)
                      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)
E/AndroidRuntime: Caused by: java.lang.ClassNotFoundException: Didn't find class "com.facebook.stetho.Stetho" on path: DexPathList[[dex file "/data/data/com.example.develop/files/instant-run/dex/slice-support-annotations-25.1.1_dfefee911e18261d2128ab14c28ff3558b0a6e4e-classes.dex", dex file "/data/data/com.example.develop/files/instant-run/dex/slice-slice_9-classes.dex", dex file "/data/data/com.example.develop/files/instant-run/dex/slice-slice_8-classes.dex", dex file "/data/data/com.example.develop/files/instant-run/dex/slice-slice_7-classes.dex", dex file "/data/data/com.example.develop/files/instant-run/dex/slice-slice_6-classes.dex", dex file "/data/data/com.example.develop/files/instant-run/dex/slice-slice_5-classes.dex", dex file "/data/data/com.example.develop/files/instant-run/dex/slice-slice_4-classes.dex", dex file "/data/data/com.example.develop/files/instant-run/dex/slice-slice_3-classes.dex", dex file "/data/data/com.example.develop/files/instant-run/dex/slice-slice_2-classes.dex", dex file "/data/data/com.example.develop/files/instant-run/dex/slice-slice_1-classes.dex", dex file "/data/data/com.example.develop/files/instant-run/dex/slice-slice_0-classes.dex", dex file "/data/data/com.example.develop/files/instant-run/dex/slice-retrofit-mock-2.1.0_20acf898747ed2b5aea8574ad8b28a56e295c7bd-classes.dex", dex file "/data/data/com.example.develop/files/instant-run/dex/slice-retrofit-2.1.0_d08a4fe87b2eedd5fcddf3c1613c08274b04542b-classes.dex", dex file "/data/data/com.example.develop/files/instant-run/dex/slice-okio-1.9.0_5b3627987d6cb4bcccd7450ffe5951f2b7e40eea-classes.dex", dex file "/data/data/com.example.develop/files/instant-run/dex/slice-nl.littlerobots.rxlint-rxlint-1.1_1267bf6a80c8f1d546a2834b1934cebadede0fa7-classes.dex", dex file "/data/data/com.example.develop/files/instant-run/dex/slice-mvp-common-2.0.1_8e3316f36c2fb44012af1712b007de9d56e9e2df-classes.dex", dex file "/data/data/com.example.develop/files/instant-run/dex/slice-logging-interceptor-3.4.2_f6bef079f71b174b0a377cc156a745543e889458-classes.dex", dex file "/data/data/com.example.develop/files/instant-run/dex/slice-javax.inject-1_95309d88f62e0e5ae92674ebc77695ae406206a4-classes.dex", dex file "/data/data/com.example.develop/files/instant-run/dex/slice-io.reactivex-rxandroid-1.2.1_607f4bcd5845bc6492191050ded4a61ed1d51fd0-classes.dex", dex file "/data/data/com.example.develop/files/instant-run/dex/slice-io.fabric.sdk.android-fabric-1.3.14_1e0a9a9d0a06273d8a6ad5b7e53a8d055e92edc6-classes.dex", dex file "/data/data/com.example.develop/files/instant-run/dex/slice-gson-2.7_383633617374820f09d175a61ba649b649396bca-classes.dex", dex file "/data/data/com.example.develop/files/instant-run/dex/slice-dagger-2.7_1a87ca17ae0b9929681ad7246648556e27329938-classes.dex", dex file "/data/data/com.example.develop/files/instant-run/dex/slice-converter-gson-2.1.0_e8e506bc66855717700ce98d82f021729957e054-classes.dex", dex file "/data/data/com.example.develop/files/instant-run/dex/slice-commons-cli-1.2_96c24d7520f35645d6371a1082a8728ea8781ef5-classes.dex", dex file "/data/data/com.example.develop/files/instant-run/dex/slice-com.jakewharton.timber-timber-4.5.1_76b27343422d69f488c8c7ac1cd46d9ebcd56523-classes.dex", dex file "/data/data/com.example.develop/files/instant-run/dex/slice-com.jakewharton-butterknife-8.5.1_e9bdc7c02c1db4264ae2f2144306d6e8eccb2992-classes.dex", dex file "/data/data/com.example.develop/files/instant-run/dex/slice-com.hannesdorfmann.mosby-viewstate-2.0.1_a5a0954275db8764deba9476390d32aae9b160d7-classes.dex", dex file "/data/data/com.example.develop/files/instant-run/dex/slice-com.hannesdorfmann.mosby-mvp-2.0.1_6aa0b174f54ed73a38ead4c616d8fa33ba232e94-classes.dex", dex file "/data/data/com.example.develop/files/instant-run/dex/slice-com.facebook.stetho-stetho-okhttp3-1.4.2_c2660d1bc97134c9f85eed142be688e5ef1ad4a1-classes.dex", dex file "/data/data/com.example.develop/files/instant-run/dex/slice-com.facebook.android-facebook-android-sdk-4.10.0_06a008f9c7fe54133e79d203829a3073632bec9a-classes
E/AndroidRuntime: .dex", dex file "/data/data/com.example.develop/files/instant-run/dex/slice-com.crashlytics.sdk.android-crashlytics-core-2.3.14_6cf2eb24d5b258b549423db7e9cf52e7b6bd407f-classes.dex", dex file "/data/data/com.example.develop/files/instant-run/dex/slice-com.crashlytics.sdk.android-crashlytics-2.6.5_16af0bf55b4c81f01f8c366f2577bf6731b6e3e4-classes.dex", dex file "/data/data/com.example.develop/files/instant-run/dex/slice-com.crashlytics.sdk.android-beta-1.2.2_d70c92730da784e744687cf6ac5f171124a4a754-classes.dex", dex file "/data/data/com.example.develop/files/instant-run/dex/slice-com.crashlytics.sdk.android-answers-1.3.10_02615646608fe8dcf1e8685d880c6ec0c2669897-classes.dex", dex file "/data/data/com.example.develop/files/instant-run/dex/slice-com.android.support.test.espresso-espresso-idling-resource-2.2.2_62809e7264bcd1018b825d078ccf623c9928a3cd-classes.dex", dex file "/data/data/com.example.develop/files/instant-run/dex/slice-com.android.support-support-vector-drawable-25.1.1_80e413894e3895c57c6cd5511cb5f13315dbe515-classes.dex", dex file "/data/data/com.example.develop/files/instant-run/dex/slice-com.android.support-support-v4-25.1.1_64eb787ff00381bd39de19f241da92c7c22d9695-classes.dex", dex file "/data/data/com.example.develop/files/instant-run/dex/slice-com.android.support-support-media-compat-25.1.1_227b3fc179969b390ffef7d1f40e14e585565608-classes.dex", dex file "/data/data/com.example.develop/files/instant-run/dex/slice-com.android.support-support-fragment-25.1.1_4a6dcd1af950af471bd79da072210ee7ddf7fc3a-classes.dex", dex file "/data/data/com.example.develop/files/instant-run/dex/slice-com.android.support-support-core-utils-25.1.1_15ecf2a0ff46e4e396629230e3c2b226dee24c5e-classes.dex", dex file "/data/data/com.example.develop/files/instant-run/dex/slice-com.android.support-support-core-ui-25.1.1_e1e1ccbe1a3683ce8d4a152029f56ee1e9a38e0c-classes.dex", dex file "/data/data/com.example.develop/files/instant-run/dex/slice-com.android.support-support-compat-25.1.1_addfabc2846c9ce368ff749697e01e6e0f6c3dd2-classes.dex", dex file "/data/data/com.example.develop/files/instant-run/dex/slice-com.android.support-recyclerview-v7-25.1.1_84a5e65d606d4bfc81172b51da992051e168f044-classes.dex", dex file "/data/data/com.example.develop/files/instant-run/dex/slice-com.android.support-multidex-1.0.1_6e558d4b5533beb308b8fb20613be4a5c87f2e3e-classes.dex", dex file "/data/data/com.example.develop/files/instant-run/dex/slice-com.android.support-cardview-v7-23.4.0_2f158647b14988d7fec4152a937479b2e016a388-classes.dex", dex file "/data/data/com.example.develop/files/instant-run/dex/slice-com.android.support-appcompat-v7-25.1.1_c67f60d5c86f2a02499744b126452c32d5ceb14b-classes.dex", dex file "/data/data/com.example.develop/files/instant-run/dex/slice-com.android.support-animated-vector-drawable-25.1.1_3e2ef11865299d7e77f495c1f776d0d8683a62f5-classes.dex", dex file "/data/data/com.example.develop/files/instant-run/dex/slice-butterknife-annotations-8.5.1_c624622a7361f1b94a0ecb56778b100c13132ea1-classes.dex", dex file "/data/data/com.example.develop/files/instant-run/dex/slice-bolts-tasks-1.3.0_ca831ced3df47f5762172a380e06fd22af4150ef-classes.dex", dex file "/data/data/com.example.develop/files/instant-run/dex/slice-bolts-applinks-1.3.0_75ce204d49f8c7d7bc7633845970b427ae934954-classes.dex", dex file "/data/data/com.example.develop/files/instant-run/dex/slice-annotations-2.0.1_e40182c42347edfcee33760093b1997d7faf5f2d-classes.dex", dex file "/data/data/com.example.develop/files/instant-run/dex/slice-adapter-rxjava-2.1.0_7f6d2a0d04e52fa760d394e9a2a115433c462092-classes.dex"],nativeLibraryDirectories=[/data/app/com.example.develop-1/lib/arm64, /system/lib64, /vendor/lib64]]
                      at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
                      at com.android.tools.fd.runtime.IncrementalClassLoader$DelegateClassLoader.findClass(IncrementalClassLoader.java:90)
                      at java.lang.ClassLoader.loadClass(ClassLoader.java:380)
                      at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
E/AndroidRuntime: 	... 14 more

Any ideas how to fix it?

[Question] better way to create component factory

Hello, I have a question, there is a better way to implement a factory for all components if the project has many component alot of boilerplate will be needed, with 4 component that Component Factory looks like

public final class ComponentFactory {

    @ForTestingPurposes
    @Nullable
    private static SplashActivityComponent splashActivityComponent;
    
    @ForTestingPurposes
    @Nullable
    private static LoginActivityComponent loginActivityComponent;
    
    @ForTestingPurposes
    @Nullable
    private static HomeActivityComponent homeActivityComponent;
    
    @ForTestingPurposes
    @Nullable
    private static DetailsActivityComponent detailsActivityComponent;

    private ComponentFactory() {
        throw new AssertionError();
    }

    public static SplashActivityComponent getSplashComponent() {
        if(splashActivityComponent == null) {
            splashActivityComponent = DaggerSplashActivityComponent.builder()
                    .applicationComponent(App.getApplicationComponent())
                    .build();
            return splashActivityComponent;
        }
        return splashActivityComponent;

    }

    public static LoginActivityComponent getLoginComponent() {
        if(loginActivityComponent == null) {
            loginActivityComponent = DaggerLoginActivityComponent.builder()
                    .applicationComponent(App.getApplicationComponent())
                    .build();
            return loginActivityComponent;
        }
        return loginActivityComponent;
    }

    public static HomeActivityComponent getHomeComponent() {
        if(homeActivityComponent == null) {
            homeActivityComponent = DaggerHomeActivityComponent.builder()
                    .applicationComponent(App.getApplicationComponent())
                    .build();
            return homeActivityComponent;
        }

        return  homeActivityComponent;
    }

    public static DetailsActivityComponent getDetailComponent() {
        if(detailsActivityComponent == null) {
            detailsActivityComponent = DaggerDetailsActivityComponent.builder()
                    .applicationComponent(App.getApplicationComponent())
                    .build();
            return detailsActivityComponent;
        }

        return  detailsActivityComponent;
    }

    @ForTestingPurposes
    @VisibleForTesting
    public static void setSplashActivityComponent(@Nullable SplashActivityComponent splashActivityComponent) {
        ComponentFactory.splashActivityComponent = splashActivityComponent;
    }

    @ForTestingPurposes
    @VisibleForTesting
    public static void setLoginActivityComponent(LoginActivityComponent loginActivityComponent) {
        ComponentFactory.loginActivityComponent = loginActivityComponent;
    }

    @ForTestingPurposes
    @VisibleForTesting
    public static void setHomeActivityComponent(HomeActivityComponent homeActivityComponent) {
        ComponentFactory.homeActivityComponent = homeActivityComponent;
    }

    @ForTestingPurposes
    @VisibleForTesting
    public static void setDetailsActivityComponent(DetailsActivityComponent detailsActivityComponent) {
        ComponentFactory.detailsActivityComponent = detailsActivityComponent;
    }
}

any suggestion?

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.