chat21 / chat21-android-sdk

Android Chat SDK built on Firebase
http://www.chat21.org
MIT License
233 stars 98 forks source link

> Task :app:processDebugResources FAILED #55

Closed AssafGolani closed 3 years ago

AssafGolani commented 3 years ago

Hey, I'm trying to build the app but I have resources issues.

AGPBI: {"kind":"error","text":"Android resource linking failed","sources":[{"file":"Path\.gradle\wrapper\dists\gradle-6.5-bin\caches\transforms-2\files-2.1\49220441ee84dc838d94e9c655582ea6\jetified-chat21-1.0.15\res\layout\layout_custom_notification.xml","position":{"startLine":28}}],"original":"Path\.gradle\wrapper\dists\gradle-6.5-bin\caches\transforms-2\files-2.1\49220441ee84dc838d94e9c655582ea6\jetified-chat21-1.0.15\res\layout\layout_custom_notification.xml:29: AAPT: error: resource style/TextAppearance.AppCompat.Notification.Title (aka com.example.mychattest:style/TextAppearance.AppCompat.Notification.Title) not found.\n ","tool":"AAPT"} AGPBI: {"kind":"error","text":"Android resource linking failed","sources":[{"file":"Path\.gradle\wrapper\dists\gradle-6.5-bin\caches\transforms-2\files-2.1\49220441ee84dc838d94e9c655582ea6\jetified-chat21-1.0.15\res\layout\layout_custom_notification.xml","position":{"startLine":38}}],"original":"Path\.gradle\wrapper\dists\gradle-6.5-bin\caches\transforms-2\files-2.1\49220441ee84dc838d94e9c655582ea6\jetified-chat21-1.0.15\res\layout\layout_custom_notification.xml:39: AAPT: error: resource style/TextAppearance.AppCompat.Notification.Time (aka com.example.mychattest:style/TextAppearance.AppCompat.Notification.Time) not found.\n ","tool":"AAPT"} AGPBI: {"kind":"error","text":"Android resource linking failed","sources":[{"file":"Path\.gradle\wrapper\dists\gradle-6.5-bin\caches\transforms-2\files-2.1\49220441ee84dc838d94e9c655582ea6\jetified-chat21-1.0.15\res\layout\layout_custom_notification.xml","position":{"startLine":49}}],"original":"Path\.gradle\wrapper\dists\gradle-6.5-bin\caches\transforms-2\files-2.1\49220441ee84dc838d94e9c655582ea6\jetified-chat21-1.0.15\res\layout\layout_custom_notification.xml:50: AAPT: error: resource style/TextAppearance.AppCompat.Notification.Info (aka com.example.mychattest:style/TextAppearance.AppCompat.Notification.Info) not found.\n ","tool":"AAPT"}

FAILURE: Build failed with an exception.

gradle.app: `apply plugin: 'com.android.application'

android { compileSdkVersion 30 defaultConfig { applicationId "com.example.mychattest" minSdkVersion 19 targetSdkVersion 30 versionCode 6 versionName "1.0.5" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

    multiDexEnabled true
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}

}

dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) //noinspection GradleCompatible implementation 'com.android.support:appcompat-v7:28.0.0' implementation 'com.android.support.constraint:constraint-layout:2.0.4' testImplementation 'junit:junit:4.12' androidTestImplementation 'com.android.support.test:runner:1.0.2' androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'

// chat
implementation 'com.android.support:multidex:1.0.3'
//noinspection UseOfBundledGooglePlayServices
implementation "com.google.android.gms:play-services:12.0.1"
//noinspection GradleCompatible
implementation 'com.android.support:design:28.0.0'

implementation 'com.vanniktech:emoji-ios:0.5.1'
implementation 'com.daimajia.swipelayout:library:1.2.0@aar'
implementation 'com.github.bumptech.glide:glide:3.7.0'
implementation 'com.android.support:multidex:1.0.3'

implementation 'com.google.android.material:material:1.4.0-alpha01'

//CHAT 21 sdk
implementation 'org.chat21.android:chat21:1.0.15'
//implementation project(':chat')

}

// chat configurations.all { resolutionStrategy.eachDependency { /DependencyResolveDetails/ details -> def requested = details.requested if (requested.group == 'com.android.support') { if (!requested.name.startsWith("multidex")) { details.useVersion '26.1.0' } } } }

gradle.root: apply plugin: 'com.google.gms.google-services' `

`// Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { repositories { google() jcenter() } dependencies { classpath "com.android.tools.build:gradle:4.1.3" classpath 'com.google.gms:google-services:3.1.1'

    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
}

}

allprojects { repositories { google() jcenter() } }

task clean(type: Delete) { delete rootProject.buildDir }`

Looks like it might have issue in "layout_custom_notification.xml" in ?

` <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/layout" android:layout_width="fill_parent" android:layout_height="fill_parent" android:padding="10dp">

<ImageView
    android:id="@+id/image"
    android:layout_width="wrap_content"
    android:layout_height="fill_parent"
    android:layout_alignParentStart="true"
    android:layout_marginEnd="10dp"
    android:src="@drawable/ic_notification_foreground" />

<!--<TextView-->
<!--android:id="@+id/title"-->
<!--style="@style/TextAppearance.AppCompat.Notification.Title"-->
<!--android:layout_width="wrap_content"-->
<!--android:layout_height="wrap_content"-->
<!--android:layout_toRightOf="@id/image" />-->

<RelativeLayout
    android:id="@+id/box_title"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_toEndOf="@id/image">

    <TextView
        android:id="@+id/title"
        style="@style/TextAppearance.AppCompat.Notification.Title"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentStart="true"
        android:layout_toStartOf="@+id/time"
        android:maxLength="20"
        android:maxLines="1" />

    <TextView
        android:id="@+id/time"
        style="@style/TextAppearance.AppCompat.Notification.Time"
        android:layout_width="100dp"
        android:layout_marginTop="2dp"
        android:layout_height="wrap_content"
        android:layout_alignParentEnd="true"
        android:layout_alignParentTop="true"
        android:gravity="end" />
</RelativeLayout>

<TextView
    android:id="@+id/text"
    style="@style/TextAppearance.AppCompat.Notification.Info"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_below="@id/box_title"
    android:layout_toEndOf="@id/image"
    android:textSize="14sp" />

<!--<TextView-->
<!--android:id="@+id/text"-->
<!--style="@style/TextAppearance.AppCompat.Notification.Info"-->
<!--android:layout_width="wrap_content"-->
<!--android:layout_height="wrap_content"-->
<!--android:layout_below="@id/title"-->
<!--android:layout_toRightOf="@id/image" />-->

`