A gardening app illustrating Android development best practices with Android Jetpack.

Related tags

App sunflower
Overview

Android Sunflower

A gardening app illustrating Android development best practices with Android Jetpack.

Android Sunflower is currently under heavy development. Note that some changes (such as database schema modifications) are not backwards compatible and may cause the app to crash. In this case, please uninstall and re-install the app.

Introduction

Android Jetpack is a set of components, tools and guidance to make great Android apps. They bring together the existing Support Library and Architecture Components and arrange them into four categories:

Android Jetpack

Android Sunflower demonstrates utilizing these components to create a simple gardening app. Read the Introducing Android Sunflower article for a walkthrough of the app.

Getting Started

This project uses the Gradle build system. To build this project, use the gradlew build command or use "Import Project" in Android Studio.

There are two Gradle tasks for testing the project:

  • connectedAndroidTest - for running Espresso on a connected device
  • test - for running unit tests

For more resources on learning Android development, visit the Developer Guides at developer.android.com.

Unsplash API key

Sunflower uses the Unsplash API to load pictures on the gallery screen. To use the API, you will need to obtain a free developer API key. See the Unsplash API Documentation for instructions.

Once you have the key, add this line to the gradle.properties file, either in your user home directory (usually ~/.gradle/gradle.properties on Linux and Mac) or in the project's root folder:

unsplash_access_key=<your Unsplash access key>

The app is still usable without an API key, though you won't be able to navigate to the gallery screen.

Screenshots

List of plants Plant details My Garden

Libraries Used

  • Foundation - Components for core system capabilities, Kotlin extensions and support for multidex and automated testing.
    • AppCompat - Degrade gracefully on older versions of Android.
    • Android KTX - Write more concise, idiomatic Kotlin code.
    • Test - An Android testing framework for unit and runtime UI tests.
  • Architecture - A collection of libraries that help you design robust, testable, and maintainable apps. Start with classes for managing your UI component lifecycle and handling data persistence.
    • Data Binding - Declaratively bind observable data to UI elements.
    • Lifecycles - Create a UI that automatically responds to lifecycle events.
    • LiveData - Build data objects that notify views when the underlying database changes.
    • Navigation - Handle everything needed for in-app navigation.
    • Room - Access your app's SQLite database with in-app objects and compile-time checks.
    • ViewModel - Store UI-related data that isn't destroyed on app rotations. Easily schedule asynchronous tasks for optimal execution.
    • WorkManager - Manage your Android background jobs.
  • UI - Details on why and how to use UI Components in your apps - together or separate
  • Third party and miscellaneous libraries

Upcoming features

Updates will include incorporating additional Jetpack components and updating existing components as the component libraries evolve.

Interested in seeing a particular feature of the Android Framework or Jetpack implemented in this app? Please open a new issue.

Android Studio IDE setup

For development, the latest version of Android Studio is required. The latest version can be downloaded from here.

Sunflower uses ktlint to enforce Kotlin coding styles. Here's how to configure it for use with Android Studio (instructions adapted from the ktlint README):

Additional resources

Check out these Wiki pages to learn more about Android Sunflower:

Non-Goals

The focus of this project is on Android Jetpack and the Android framework. Thus, there are no immediate plans to implement features outside of this scope.

Support

If you've found an error in this sample, please file an issue: https://github.com/android/sunflower/issues

Patches are encouraged, and may be submitted by forking this project and submitting a pull request through GitHub.

Third Party Content

Select text used for describing the plants (in plants.json) are used from Wikipedia via CC BY-SA 3.0 US (license in ASSETS_LICENSE).

"seed" by Aisyah is licensed under CC BY 3.0

License

Copyright 2018 Google, Inc.

Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Comments
  • Detail page has two toolbars

    Detail page has two toolbars

    After converting to single-activity, there're two toolbars on detail screen. The app needs a ux/ui decision what should be shown in detail page. @tiembo

    bug enhancement 
    opened by XinyueZ 28
  • Navigation component crashes.

    Navigation component crashes.

    I guess this is just broken Navigation, and i'm going to post this issue at Navigation bug tracker but still.

    1. Open Plant list screen
    2. With 2 or more fingers tap different Plant items at the same time
    3. You will get exception

    java.lang.IllegalArgumentException: navigation destination com.google.samples.apps.sunflower:id/action_plant_list_fragment_to_plant_detail_fragment is unknown to this NavController

    Seems like after first click Navigation framework thinks you are already at Plant detail part of the nav graph. And this fragment can't use this action. It seems just broken as for me. I'd like it opens two separate screens if you do things like this. This probably will crash you app everywhere when you can navigate with more then 1 then click listener (for example 2 buttons to register/forgot password screens)

    In the current situation i have found few workarounds with this problem:

    1. We can wrap it.findNavController().navigate(direction) with tryCatch block, catch IllegalArgumentException and do nothing. But it seems just broken, don't forget to leave a commentary in that catch block
    2. You can use Global actions only https://developer.android.com/topic/libraries/architecture/navigation/navigation-global-action But this is again will look just horrible tho. This seems acceptable if we add search into the app
    3. You can add to PlantDetailFragment in nav graph action to navigate to itself (recursive). This is horrible as well.

    Offtopic: if you use recursive destination and tie ActonBar with NavController - check you home/back button. This will be broken if your recursive destination is first in nav graph.

    Well, i don't have the good looking solution for the issue quite yet. Still working

    UPD: Copy of this bug at google tracker https://issuetracker.google.com/issues/118975714

    bug blocked 
    opened by KoTius 16
  • Fix #132: the PlantAndGardenPlantingsViewModel decoupled from context and string-resource

    Fix #132: the PlantAndGardenPlantingsViewModel decoupled from context and string-resource

    This bug is critical and obscure, there's already issue on Google, see also:

    • https://github.com/googlesamples/android-sunflower/issues/132
    • https://issuetracker.google.com/u/2/issues/111961971

    @tiembo I think this fix is important for this project which is the official demo to declare how people use the Jetpack, so please check out.

    opened by XinyueZ 15
  • Refactor some build logic to the buildSrc & gradle kotlin-dsl

    Refactor some build logic to the buildSrc & gradle kotlin-dsl

    Refactor some build logic to the buildSrc & gradle kotlin-dsl

    Files buildSrc/src/main/java/{Versions.kt,Libs.kt} generated by kotlinpoet and the task $ ./gradlew syncLibs

    See https://blog.kotlin-academy.com/gradle-kotlin-the-missing-piece-of-the-puzzle-7528a85f0d2c

    opened by jmfayard 13
  • Plugin [id: 'com.diffplug.gradle.spotless', version: '3.13.0'] was not found in any of the following sources

    Plugin [id: 'com.diffplug.gradle.spotless', version: '3.13.0'] was not found in any of the following sources

    Executing tasks: [assemble]

    Parallel execution with configuration on demand is an incubating feature.

    FAILURE: Build failed with an exception.

    • Where: Build file '/Users/futurexiong/projects/android/android-sunflower/build.gradle' line: 59

    • What went wrong: Plugin [id: 'com.diffplug.gradle.spotless', version: '3.13.0'] was not found in any of the following sources:

    • Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
    • Plugin Repositories (could not resolve plugin artifact 'com.diffplug.gradle.spotless:com.diffplug.gradle.spotless.gradle.plugin:3.13.0') Searched in the following repositories: Gradle Central Plugin Repository
    • 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

    BUILD FAILED in 0s

    opened by futurexiong 11
  • Material Design specs

    Material Design specs

    The sample app UI is quite crude, and parts of it does not follow the MD specs. e.g. the Add icon used in the FAB is using the wrong size e.g. paddings of text

    Are there any plans to touch up the UI? or a mock that i can follow for a PR

    enhancement 
    opened by andhie 11
  • Optimized data-binding of fragments

    Optimized data-binding of fragments

    • Ensure that the setLifecycleOwner is called after the data-binding of the fragment is created.
      • Partially using the creation of data-binding in the PlantDetailFragment.
    opened by XinyueZ 11
  • Compiler Error

    Compiler Error

    Hi, I am pretty new to Kotlin as a development language for Android and I decided to give it a try with this sample app especially since it also introduces me to the Android Jetpack set of libraries and components. I, unfortunately, cannot seem to get it to build once I clone it into my Android Studio. I keep getting the following error and I can't seem to fix it.

     Task :app:kaptGenerateStubsDebugKotlin UP-TO-DATE
    e: C:\Users\hiseh\Documents\Android Studio Projects\android-sunflower\app\build\generated\data_binding_base_class_source_out\debug\dataBindingGenBaseClassesDebug\out\com\google\samples\apps\sunflower\databinding\ActivityGardenBinding.java:29: error: cannot find symbol
      protected ActivityGardenBinding(DataBindingComponent _bindingComponent, View _root,
                                      ^
      symbol:   class DataBindingComponent
      location: class ActivityGardenBinding
    e: C:\Users\hiseh\Documents\Android Studio Projects\android-sunflower\app\build\generated\data_binding_base_class_source_out\debug\dataBindingGenBaseClassesDebug\out\com\google\samples\apps\sunflower\databinding\ActivityGardenBinding.java:47: error: cannot find symbol
          @Nullable ViewGroup root, boolean attachToRoot, @Nullable DataBindingComponent component) {
                                                                    ^
      symbol:   class DataBindingComponent
      location: class ActivityGardenBinding
    e: C:\Users\hiseh\Documents\Android Studio Projects\android-sunflower\app\build\generated\data_binding_base_class_source_out\debug\dataBindingGenBaseClassesDebug\out\com\google\samples\apps\sunflower\databinding\ActivityGardenBinding.java:58: error: cannot find symbol
          @Nullable DataBindingComponent component) {
                    ^
      symbol:   class DataBindingComponent
      location: class ActivityGardenBinding
    e: C:\Users\hiseh\Documents\Android Studio Projects\android-sunflower\app\build\generated\data_binding_base_class_source_out\debug\dataBindingGenBaseClassesDebug\out\com\google\samples\apps\sunflower\databinding\ActivityGardenBinding.java:67: error: cannot find symbol
          @Nullable DataBindingComponent component) {
                    ^
      symbol:   class DataBindingComponent
      location: class ActivityGardenBinding
    e: C:\Users\hiseh\Documents\Android Studio Projects\android-sunflower\app\build\generated\data_binding_base_class_source_out\debug\dataBindingGenBaseClassesDebug\out\com\google\samples\apps\sunflower\databinding\FragmentPlantDetailBinding.java:49: error: cannot find symbol
      protected FragmentPlantDetailBinding(DataBindingComponent _bindingComponent, View _root,
                                           ^
      symbol:   class DataBindingComponent
      location: class FragmentPlantDetailBinding
    e: C:\Users\hiseh\Documents\Android Studio Projects\android-sunflower\app\build\generated\data_binding_base_class_source_out\debug\dataBindingGenBaseClassesDebug\out\com\google\samples\apps\sunflower\databinding\FragmentPlantDetailBinding.java:79: error: cannot find symbol
          @Nullable ViewGroup root, boolean attachToRoot, @Nullable DataBindingComponent component) {
                                                                    ^
      symbol:   class DataBindingComponent
      location: class FragmentPlantDetailBinding
    e: C:\Users\hiseh\Documents\Android Studio Projects\android-sunflower\app\build\generated\data_binding_base_class_source_out\debug\dataBindingGenBaseClassesDebug\out\com\google\samples\apps\sunflower\databinding\FragmentPlantDetailBinding.java:90: error: cannot find symbol
          @Nullable DataBindingComponent component) {
                    ^
      symbol:   class DataBindingComponent
      location: class FragmentPlantDetailBinding
    e: C:\Users\hiseh\Documents\Android Studio Projects\android-sunflower\app\build\generated\data_binding_base_class_source_out\debug\dataBindingGenBaseClassesDebug\out\com\google\samples\apps\sunflower\databinding\FragmentPlantDetailBinding.java:99: error: cannot find symbol
          @Nullable DataBindingComponent component) {
                    ^
      symbol:   class DataBindingComponent
      location: class FragmentPlantDetailBinding
    e: C:\Users\hiseh\Documents\Android Studio Projects\android-sunflower\app\build\generated\data_binding_base_class_source_out\debug\dataBindingGenBaseClassesDebug\out\com\google\samples\apps\sunflower\databinding\FragmentPlantListBinding.java:17: error: cannot find symbol
      protected FragmentPlantListBinding(DataBindingComponent _bindingComponent, View _root,
                                         ^
      symbol:   class DataBindingComponent
      location: class FragmentPlantListBinding
    e: C:\Users\hiseh\Documents\Android Studio Projects\android-sunflower\app\build\generated\data_binding_base_class_source_out\debug\dataBindingGenBaseClassesDebug\out\com\google\samples\apps\sunflower\databinding\FragmentPlantListBinding.java:31: error: cannot find symbol
          @Nullable ViewGroup root, boolean attachToRoot, @Nullable DataBindingComponent component) {
                                                                    ^
      symbol:   class DataBindingComponent
      location: class FragmentPlantListBinding
    e: C:\Users\hiseh\Documents\Android Studio Projects\android-sunflower\app\build\generated\data_binding_base_class_source_out\debug\dataBindingGenBaseClassesDebug\out\com\google\samples\apps\sunflower\databinding\FragmentPlantListBinding.java:42: error: cannot find symbol
          @Nullable DataBindingComponent component) {
                    ^
      symbol:   class DataBindingComponent
      location: class FragmentPlantListBinding
    e: C:\Users\hiseh\Documents\Android Studio Projects\android-sunflower\app\build\generated\data_binding_base_class_source_out\debug\dataBindingGenBaseClassesDebug\out\com\google\samples\apps\sunflower\databinding\FragmentPlantListBinding.java:51: error: cannot find symbol
          @Nullable DataBindingComponent component) {
                    ^
      symbol:   class DataBindingComponent
      location: class FragmentPlantListBinding
    e: C:\Users\hiseh\Documents\Android Studio Projects\android-sunflower\app\build\generated\data_binding_base_class_source_out\debug\dataBindingGenBaseClassesDebug\out\com\google\samples\apps\sunflower\databinding\ListItemGardenPlantingBinding.java:29: error: cannot find symbol
      protected ListItemGardenPlantingBinding(DataBindingComponent _bindingComponent, View _root,
                                              ^
      symbol:   class DataBindingComponent
      location: class ListItemGardenPlantingBinding
    e: C:\Users\hiseh\Documents\Android Studio Projects\android-sunflower\app\build\generated\data_binding_base_class_source_out\debug\dataBindingGenBaseClassesDebug\out\com\google\samples\apps\sunflower\databinding\ListItemGardenPlantingBinding.java:52: error: cannot find symbol
          @Nullable ViewGroup root, boolean attachToRoot, @Nullable DataBindingComponent component) {
                                                                    ^
      symbol:   class DataBindingComponent
      location: class ListItemGardenPlantingBinding
    e: C:\Users\hiseh\Documents\Android Studio Projects\android-sunflower\app\build\generated\data_binding_base_class_source_out\debug\dataBindingGenBaseClassesDebug\out\com\google\samples\apps\sunflower\databinding\ListItemGardenPlantingBinding.java:63: error: cannot find symbol
          @Nullable DataBindingComponent component) {
                    ^
      symbol:   class DataBindingComponent
      location: class ListItemGardenPlantingBinding
    e: C:\Users\hiseh\Documents\Android Studio Projects\android-sunflower\app\build\generated\data_binding_base_class_source_out\debug\dataBindingGenBaseClassesDebug\out\com\google\samples\apps\sunflower\databinding\ListItemGardenPlantingBinding.java:72: error: cannot find symbol
          @Nullable DataBindingComponent component) {
                    ^
      symbol:   class DataBindingComponent
      location: class ListItemGardenPlantingBinding
    e: C:\Users\hiseh\Documents\Android Studio Projects\android-sunflower\app\build\generated\data_binding_base_class_source_out\debug\dataBindingGenBaseClassesDebug\out\com\google\samples\apps\sunflower\databinding\ListItemPlantBinding.java:29: error: cannot find symbol
      protected ListItemPlantBinding(DataBindingComponent _bindingComponent, View _root,
                                     ^
      symbol:   class DataBindingComponent
      location: class ListItemPlantBinding
    e: C:\Users\hiseh\Documents\Android Studio Projects\android-sunflower\app\build\generated\data_binding_base_class_source_out\debug\dataBindingGenBaseClassesDebug\out\com\google\samples\apps\sunflower\databinding\ListItemPlantBinding.java:58: error: cannot find symbol
          @Nullable ViewGroup root, boolean attachToRoot, @Nullable DataBindingComponent component) {
                                                                    ^
      symbol:   class DataBindingComponent
      location: class ListItemPlantBinding
    e: C:\Users\hiseh\Documents\Android Studio Projects\android-sunflower\app\build\generated\data_binding_base_class_source_out\debug\dataBindingGenBaseClassesDebug\out\com\google\samples\apps\sunflower\databinding\ListItemPlantBinding.java:69: error: cannot find symbol
          @Nullable DataBindingComponent component) {
                    ^
      symbol:   class DataBindingComponent
      location: class ListItemPlantBinding
    e: C:\Users\hiseh\Documents\Android Studio Projects\android-sunflower\app\build\generated\data_binding_base_class_source_out\debug\dataBindingGenBaseClassesDebug\out\com\google\samples\apps\sunflower\databinding\ListItemPlantBinding.java:78: error: cannot find symbol
          @Nullable DataBindingComponent component) {
                    ^
      symbol:   class DataBindingComponent
      location: class ListItemPlantBinding
    w: C:\Users\hiseh\Documents\Android Studio Projects\android-sunflower\app\build\tmp\kapt3\stubs\debug\com\google\samples\apps\sunflower\data\GardenPlanting.java:15: warning: plant_id column references a foreign key but it is not part of an index. This may trigger full table scans whenever parent table is modified so you are highly advised to create an index that covers this column.
    public final class GardenPlanting {
                 ^
    e: [kapt] An exception occurred: java.lang.UnsatisfiedLinkError: org.sqlite.core.NativeDB._open_utf8([BI)V
    	at org.sqlite.core.NativeDB._open_utf8(Native Method)
    	at org.sqlite.core.NativeDB._open(NativeDB.java:71)
    	at org.sqlite.core.DB.open(DB.java:174)
    	at org.sqlite.core.CoreConnection.open(CoreConnection.java:220)
    	at org.sqlite.core.CoreConnection.<init>(CoreConnection.java:76)
    	at org.sqlite.jdbc3.JDBC3Connection.<init>(JDBC3Connection.java:25)
    	at org.sqlite.jdbc4.JDBC4Connection.<init>(JDBC4Connection.java:24)
    	at org.sqlite.SQLiteConnection.<init>(SQLiteConnection.java:45)
    	at org.sqlite.JDBC.createConnection(JDBC.java:114)
    	at android.arch.persistence.room.verifier.DatabaseVerifier$Companion.create(DatabaseVerifier.kt:71)
    	at android.arch.persistence.room.processor.DatabaseProcessor.doProcess(DatabaseProcessor.kt:76)
    	at android.arch.persistence.room.processor.DatabaseProcessor.process(DatabaseProcessor.kt:53)
    	at android.arch.persistence.room.RoomProcessor$DatabaseProcessingStep.process(RoomProcessor.kt:57)
    	at com.google.auto.common.BasicAnnotationProcessor.process(BasicAnnotationProcessor.java:318)
    	at com.google.auto.common.BasicAnnotationProcessor.process(BasicAnnotationProcessor.java:171)
    	at org.jetbrains.kotlin.kapt3.base.ProcessorWrapper.process(annotationProcessing.kt:99)
    	at com.sun.tools.javac.processing.JavacProcessingEnvironment.callProcessor(JavacProcessingEnvironment.java:794)
    	at com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs(JavacProcessingEnvironment.java:705)
    	at com.sun.tools.javac.processing.JavacProcessingEnvironment.access$1800(JavacProcessingEnvironment.java:91)
    	at com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.run(JavacProcessingEnvironment.java:1035)
    	at com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:1176)
    	at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1170)
    	at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1068)
    	at org.jetbrains.kotlin.kapt3.base.AnnotationProcessingKt.doAnnotationProcessing(annotationProcessing.kt:55)
    	at org.jetbrains.kotlin.kapt3.base.AnnotationProcessingKt.doAnnotationProcessing$default(annotationProcessing.kt:27)
    	at org.jetbrains.kotlin.kapt3.AbstractKapt3Extension.runAnnotationProcessing(Kapt3Extension.kt:216)
    	at org.jetbrains.kotlin.kapt3.AbstractKapt3Extension.analysisCompleted(Kapt3Extension.kt:164)
    	at org.jetbrains.kotlin.kapt3.ClasspathBasedKapt3Extension.analysisCompleted(Kapt3Extension.kt:93)
    	at org.jetbrains.kotlin.cli.jvm.compiler.TopDownAnalyzerFacadeForJVM$analyzeFilesWithJavaIntegration$2.invoke(TopDownAnalyzerFacadeForJVM.kt:98)
    	at org.jetbrains.kotlin.cli.jvm.compiler.TopDownAnalyzerFacadeForJVM.analyzeFilesWithJavaIntegration(TopDownAnalyzerFacadeForJVM.kt:108)
    	at org.jetbrains.kotlin.cli.jvm.compiler.TopDownAnalyzerFacadeForJVM.analyzeFilesWithJavaIntegration$default(TopDownAnalyzerFacadeForJVM.kt:85)
    	at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler$analyze$1.invoke(KotlinToJVMBytecodeCompiler.kt:370)
    	at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler$analyze$1.invoke(KotlinToJVMBytecodeCompiler.kt:61)
    	at org.jetbrains.kotlin.cli.common.messages.AnalyzerWithCompilerReport.analyzeAndReport(AnalyzerWithCompilerReport.kt:101)
    	at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.analyze(KotlinToJVMBytecodeCompiler.kt:361)
    	at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.compileModules$cli(KotlinToJVMBytecodeCompiler.kt:126)
    	at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:154)
    	at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:51)
    	at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.java:95)
    	at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.java:50)
    	at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:88)
    	at org.jetbrains.kotlin.daemon.CompileServiceImpl$compile$1$1$2.invoke(CompileServiceImpl.kt:405)
    	at org.jetbrains.kotlin.daemon.CompileServiceImpl$compile$1$1$2.invoke(CompileServiceImpl.kt:98)
    	at org.jetbrains.kotlin.daemon.CompileServiceImpl$doCompile$$inlined$ifAlive$lambda$2.invoke(CompileServiceImpl.kt:927)
    	at org.jetbrains.kotlin.daemon.CompileServiceImpl$doCompile$$inlined$ifAlive$lambda$2.invoke(CompileServiceImpl.kt:98)
    	at org.jetbrains.kotlin.daemon.common.DummyProfiler.withMeasure(PerfUtils.kt:137)
    	at org.jetbrains.kotlin.daemon.CompileServiceImpl.checkedCompile(CompileServiceImpl.kt:957)
    	at org.jetbrains.kotlin.daemon.CompileServiceImpl.doCompile(CompileServiceImpl.kt:926)
    	at org.jetbrains.kotlin.daemon.CompileServiceImpl.compile(CompileServiceImpl.kt:404)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    	at java.lang.reflect.Method.invoke(Method.java:498)
    	at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:346)
    	at sun.rmi.transport.Transport$1.run(Transport.java:200)
    	at sun.rmi.transport.Transport$1.run(Transport.java:197)
    	at java.security.AccessController.doPrivileged(Native Method)
    	at sun.rmi.transport.Transport.serviceCall(Transport.java:196)
    	at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568)
    	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:826)
    	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:683)
    	at java.security.AccessController.doPrivileged(Native Method)
    	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:682)
    	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    	at java.lang.Thread.run(Thread.java:745)
    
    > Task :app:kaptDebugKotlin FAILED
    
    FAILURE: Build failed with an exception.
    

    I have tried looking up resources online but can't seem to find anything to point me in the right direction. Any and all help will be appreciated. Thanks!

    opened by hiseholuwa 10
  • AndroidX?

    AndroidX?

    Hello, I was wondering if you guys/gals are going to do a namespace migration to androidx in this project.

    I'm asking this because on my current project I'm getting errors:

    Failed to resolve: com.google.android.material:material:1.1.0
    Failed to resolve: androidx.fragment:fragment:1.1.0
    Failed to resolve: androidx.recyclerview:recyclerview:1.1.0
    
    (...)
    

    It would be good to see a working sample with recommended practices. I've been following the guide but with no success, also I included the experimental:

    # AndroidX
    android.enableJetifier=true
    android.useAndroidX=true
    

    Running on:

    Android Studio 3.2 Canary 15
    Build #AI-181.4668.68.32.4773949, built on May 10, 2018
    JRE: 1.8.0_152-release-1136-b02 x86_64
    JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
    macOS 10.12.6
    

    Project: https://github.com/JoaquimLey/transport-eta/tree/migration/jetpack

    opened by JoaquimLey 10
  • Crash while adding the plant

    Crash while adding the plant

    App crashes when I click on add_plant Button(FAB)

    2019-10-03 23:17:35.509 6603-6631/com.google.samples.apps.sunflower E/OpenGLRenderer: resultIndex is -1, the polygon must be invalid!
    2019-10-03 23:17:35.510 6603-6631/com.google.samples.apps.sunflower A/OpenGLRenderer: Error: Spot pair overflow!!! used 38, total 22
    --------- beginning of crash
    2019-10-03 23:17:35.510 6603-6631/com.google.samples.apps.sunflower A/libc: Fatal signal 6 (SIGABRT), code -6 in tid 6631 (hwuiTask1)
    
    opened by ashraf-patel 9
  • Update Gradle wrapper to 4.10.2

    Update Gradle wrapper to 4.10.2

    This updates Gradle wrapper to the latest stable version 4.10.2. All files were updated automatically using the Gradle integrated wrapper task.

    Once approved, please use a normal GitHub merge (i.e. NO rebase/squash merge) to integrate the commit(s) from the branch of this pull request. The changes are broken up into meaningful, atomic commits, and my branch should already be up-to-date with the latest target branch. If it isn't, or if you'd like me to combine something, please let me know, and I will make the necessary updates as soon as possible. Thank you!

    opened by friederbluemle 9
  • Displaying edge-to-edge, but insets not being handled leads to clipping

    Displaying edge-to-edge, but insets not being handled leads to clipping

    GardenActivity calls WindowCompat.setDecorFitsSystemWindows(window, false) to display edge-to-edge, but insets are not being taken into account resulting in items being clipped by the navigation bar.

    This is especially noticable with the opaque taskbar on Android 12L or Android 13.

    opened by alexvanyo 0
  • Correct PlantDetailViewModelTest testing by Espresso dependency

    Correct PlantDetailViewModelTest testing by Espresso dependency

    The below error is shown on the PlantDetailViewModelTest running.

    `FAILURE: Build failed with an exception.

    • What went wrong: Execution failed for task ':app:checkDebugAndroidTestDuplicateClasses'.

    A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable Duplicate class org.checkerframework.checker.compilermsgs.qual.CompilerMessageKey found in modules checker-3.1

    This is fixed by Gradle changing. Also, remove a duplicate data binding and buildFeatures.

    opened by alidoran 1
Releases(0.1.6)
  • 0.1.6(Oct 11, 2018)

    This release adds and updates databinding for various Fragments, converts the project to use AndroidX, and adds an app icon. It also includes many library updates and minor code and text fixes.

    Note: this is the last versioned release. From this point onward, issues and PRs will not be tied to a milestone or release.

    Source code(tar.gz)
    Source code(zip)
  • 0.1.5(Aug 14, 2018)

    This release adds Chinese (Traditional and Simplified) text translations. It also includes many library updates and minor code and text fixes.

    https://github.com/googlesamples/android-sunflower/milestone/5?closed=1

    Source code(tar.gz)
    Source code(zip)
  • 0.1.4(Jul 11, 2018)

    This release addresses bugs related to moving from multiple activities to a single activity (issue #9). It also adds ktlint, updates library versions, and cleans up stale code.

    For more details, please see https://github.com/googlesamples/android-sunflower/milestone/4?closed=1

    Source code(tar.gz)
    Source code(zip)
  • 0.1.3(Jun 20, 2018)

    This release adds data binding to the RecyclerViews, introduces Material Design Components, and updates Kotlin and other dependencies.

    For more details, please see https://github.com/googlesamples/android-sunflower/milestone/3?closed=1

    Source code(tar.gz)
    Source code(zip)
  • 0.1.2(Jun 12, 2018)

  • 0.1.1(May 31, 2018)

  • 0.1.0(May 29, 2018)

AudioNotes 📙 An open source simple audio note taking app built to demonstrate android development best practices.

AudioNotes ?? A simple open source audio note-taking ?? Android application built to describe the use of Modern Android development tools. ?? . Made w

Samson Achiaga 47 Dec 15, 2022
📒 NotyKT is a complete 💎Kotlin-stack (Backend + Android) 📱 application built to demonstrate the use of Modern development tools with best practices implementation🦸.

NotyKT ??️ NotyKT is the complete Kotlin-stack note taking ??️ application ?? built to demonstrate a use of Kotlin programming language in server-side

Shreyas Patil 1.4k Jan 8, 2023
The Rick And Morty - MVVM with a clean architecture approach using some of the best practices in Android Development.

Rick-and-Morty The Rick And Morty - App consuming a Rick and Morty API to display Characters it has been built with clean architecture principles, Rep

Akhilesh Patil 61 Jan 7, 2023
🚀 Sample Android Clean Architecture on Rorty App focused on the scalability, testability and maintainability written in Kotlin, following best practices using Jetpack.

Android Clean Architecture Android Clean Architecture in Rorty is a sample project that presents modern, approach to Android application development u

Mr.Sanchez 0 Dec 28, 2021
📚 Sample Android Components Architecture on a modular word focused on the scalability, testability and maintainability written in Kotlin, following best practices using Jetpack.

Android Components Architecture in a Modular Word Android Components Architecture in a Modular Word is a sample project that presents modern, 2020 app

Madalin Valceleanu 2.3k Jan 3, 2023
:movie_camera: Movie discovery app showcasing Android best practices with Google's recommended architecture: MVVM + Repository + Offline support + Android Architecture Components + Paging library & Retrofit2.

Popular Movies Stage 1 + Stage 2 Discover the most popular and top rated movies playing. Movies data fetched using themoviedb.org API. ✨ Screenshots M

Yassin AJDI 189 Nov 26, 2022
An advanced Kotlin (Android Native) application that uses SOLID architectural principles, consumes a RESTFUL Service, downloads & images using best practices

Dog-Playground Kotlin An advanced Kotlin (Android Native) application that uses SOLID architectural principles, consumes a RESTFUL Service, downloads

Amose Suwali 1 Jan 10, 2022
Samples showing best practices for MIDI on Android.

MIDI Samples This repository contains a set of individual Android Studio projects to help you write apps using MIDI APIs. Android MIDI 2.0 API samples

Android 23 Dec 19, 2022
Taskify - An app to manage your daily tasks and boost your productivity. Taskify is built using kotlin and follows all modern android Development practices and hence is a good learning resource for beginners

Taskify Taskify is an app to manage your daily tasks and boost your productivity Video Introduction ?? This is a small introduction video about Taskif

Vaibhav Jaiswal 101 Jan 4, 2023
Vaibhav Jaiswal 57 Jan 3, 2023
Acme-app - App to display the best routes for drivers based on a secret algorithm

Acme App App to display the best routes for drivers based on a "secret" algorith

Pablo Baxter 0 Jan 9, 2022
HostelMate - A Need For Hosteler (An Android App that helps students to find the best resource like hostels and tiffin centers etc.)

Android-Study-Jams-Hostel-Mate HostelMate - A Need For Hosteler (An Android App that helps students to find the best resource like hostels and tiffin

null 2 Feb 28, 2022
Added more features to app's crash dialog, fixed custom rom deleted dialog, the best experience to Android developer.

AppErrorsTracking 应用异常跟踪 Added more features to app's crash dialog, fixed custom rom deleted dialog, the best experience to Android developer. 为原生 FC

狐狸派 83 Jan 8, 2023
An app that is a one-stop destination for all the CS enthusiasts, providing resources like Information scrapping techniques, best YT channels, courses available free-of-cost, etc. & knowledge about every domain and field that exists on the Internet related to Computer Science along with News, Jobs, and Internships opportunities in these domains along with valuable tips and hacks from mentors for a particular domain.

An app that is a one-stop destination for all the CS enthusiasts, providing resources like Information scrapping techniques, best YT channels, courses available free-of-cost, etc. & knowledge about every domain and field that exists on the Internet related to Computer Science along with News, Jobs, and Internships opportunities in these domains along with valuable tips and hacks from mentors for a particular domain.

CSwala 48 Nov 26, 2022
Simple Notes app demonstrates modern Android development with Hilt, Material Motion, Coroutines, Flow, Jetpack (Room, ViewModel) based on MVVM architecture.

Simple Notes app demonstrates modern Android development with Hilt, Material Motion, Coroutines, Flow, Jetpack (Room, ViewModel) based on MVVM architecture.

Aravind Chowdary 2 Sep 3, 2022
🎥 A Simple and Minimal Movies Android Application to demonstrate the Modern Android Development and Jetpack Compose.

ComposeMovie Android ?? A Simple and Minimal Movies Android Application to demonstrate the Modern Android Development and Jetpack Compose. Built with

null 13 Oct 1, 2022
Modern Android Development with Android Jetpack libs.

GithubSquareRepos ?? In Progress ?? The GithubSquareRepos application is sample based on MVVM architecture. Fetching data from the network via reposit

Tolga Bolatcan 4 Mar 12, 2022
The JeTrivia is built on a modern Android Development tech stack with MVVM architecture. Kotlin, Coroutine, Flow, StateFlow, Jetpack Compose, Navigation, Room, Hilt, Retrofit2, OkHttp3, kotlinx.serialization, MockK, Truth

JeTrivia ?? In Progress ?? The JeTrivia application is sample based on MVVM architecture. Fetching data from the network via repository pattern and sa

Tolga Bolatcan 5 Mar 31, 2022
Water tracker app helps you with daily reminder to drink water. This app is just a trial to test and improve my android development skills.

?? About Me I am a self-thaught developer learning web and android development. This app is just a trial to test and improve my android development sk

Sinan Sonmez (Chaush) 28 Dec 17, 2022