Code Monkey home page Code Monkey logo

aa-materials's Issues

Chapter 24 - Error: package android.database does not exist - 3rd edition

/home/[user.name]/AndroidStudioProjects/Podplay/app/build/generated/source/kapt/debug/db/PodcastDao_Impl.java:3: error: package android.database does not exist
import android.database.Cursor;
^
/home/[user.name]/AndroidStudioProjects/Podplay/app/build/generated/source/kapt/debug/db/PodPlayDatabase_Impl.java:128: error: cannot access Context
final SupportSQLiteOpenHelper.Configuration _sqliteConfig = SupportSQLiteOpenHelper.Configuration.builder(configuration.context)
^
class file for android.content.Context not found
/home/[user.name]/AndroidStudioProjects/Podplay/app/build/generated/source/kapt/debug/db/PodPlayDatabase_Impl.java:147: error: cannot access VERSION
boolean _supportsDeferForeignKeys = android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.LOLLIPOP;
^
class file for android.os.Build$VERSION not found
/home/[user.name]/AndroidStudioProjects/Podplay/app/build/generated/source/kapt/debug/db/PodcastDao_Impl.java:168: error: cannot find symbol

final Cursor _cursor = DBUtil.query(__db, _statement, false, null);
^

symbol: class Cursor
/home/[user.name]/AndroidStudioProjects/Podplay/app/build/generated/source/kapt/debug/db/PodcastDao_Impl.java:246: error: cannot find symbol
final Cursor _cursor = DBUtil.query(__db, _statement, false, null);
^
symbol: class Cursor
location: class PodcastDao_Impl

5 errors

Run projects on Apple silicon (M1)

I can't run any project from this repo on my mac mini M1. Everything works normal on my Intel machine.

I'm getting error like this:
Gradle sync failed: Sync failed: reason unknown

Please, help me to resolve this issue.
My Android Gradle Plugin version - 4.1.2
My gradle version - 6.5

BTW if I create new project on my Intel machine and open it in my M1 - everything works

Chapter 6 v4.0 - Runtime crash

There is a runtime exception in chapter 6 v4.0 of the book. Following chapter 6 the app will build and run but it will immediately crash. Looking at Logcat the reason is as follows:

java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.

This appears to be a result of the AndroidManifest.xml inheriting the theme from themes.xml

I was able to fix this by making the following changes:

In AndroidManifest.xml define the app theme to AppCompat.

<application
    android:allowBackup="true"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:roundIcon="@mipmap/ic_launcher_round"
    android:supportsRtl="true"
    android:theme="@style/Theme.AppCompat"> <!-- Set to this theme -->

And removing the theme definition from themes.xml.

<?xml version="1.0" encoding="utf-8"?>
<resources>
<!--
    <style name="Theme.YourAppName" parent="android:Theme.Material.Light.NoActionBar" />
-->
</resources>

Alternative solution.

AndroidManifest.xml:

<application
    android:allowBackup="true"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:roundIcon="@mipmap/ic_launcher_round"
    android:supportsRtl="true"
    android:theme="@style/Theme.YOURAPP">

themes.xml:

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <style name="Theme.YOURAPP" parent="@style/Theme.AppCompat" />
</resources>

More info at: https://stackoverflow.com/a/21815015/1004227

My environment:

Android Studio Flamingo | 2022.2.1 Patch 2
Build #AI-222.4459.24.2221.10121639, built on May 12, 2023
Runtime version: 17.0.6+0-17.0.6b802.4-9586694 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.

How can I improve Podplay album art quality?

Hi,

I'm following the manual for some time, I thought the album art quality would be improved over time but nothing related to issue is solved.

photo_2021-07-07_18-01-57

Both in Notification view and fragment_podcast_details TextView have bad quality.

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.