Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Task :app:processDebugMainManifest FAILED #114

Open
mehranali12 opened this issue Dec 1, 2023 · 7 comments
Open

Task :app:processDebugMainManifest FAILED #114

mehranali12 opened this issue Dec 1, 2023 · 7 comments

Comments

@mehranali12
Copy link

when I install this package, my app does not run and gives me this error and warning.
Task :app:processDebugMainManifest FAILED
Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

"react": "18.2.0",
"react-native": "0.72.7",
"react-native-call-detection": "^1.9.0",

@mehranali12
Copy link
Author

I have found the solution to integrate this library. if anyone faces any issues leave a comment for me. thanks

@Akshat-simform
Copy link

Hi.. can you please help me out. This is not working for me.

@thepragmaticidealist
Copy link

thepragmaticidealist commented Jan 16, 2024

This happens for me as well. Would appreciate an assist @mehranali12 . I'm using Android 13 (API=33) with "react": "18.2.0", "react-native": "0.73.2", "react-native-call-detection": "^1.9.0",

I also get this error
Screenshot 2024-01-17 at 21 30 06

@PopLocker714
Copy link

AndroidManifest.xml
<application android:allowBackup="true" </application>
change "android:allowBackup" to true

@Akshat-simform
Copy link

Akshat-simform commented Jan 18, 2024

This happens for me as well. Would appreciate an assist @mehranali12 . I'm using Android 13 (API=33) with "react": "18.2.0", "react-native": "0.73.2", "react-native-call-detection": "^1.9.0",

I also get this error Screenshot 2024-01-17 at 21 30 06

This is the issue with React-Native-Call-Detection actually their is a permission for phone state which is only working in android 10 or below.. version higher its not working and giving same.. I have tried by making a emulator with android 10 and it worked for me.

@thepragmaticidealist
Copy link

thepragmaticidealist commented Jan 20, 2024

Thanks everyone, @PopLocker714, I added this tools:replace="android:allowBackup" to the manifest file android/app/src/main/AndroidManifest.xml in the application section to get rid of the allowBackup error. To get rid of the Telephony permissions error, I created this function and called it in a useEffect hook in App.js before the listener is called.

These are the permissions in my AndroidManifest file

  <uses-permission android:name="android.permission.CALL_PHONE" />
   <uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<uses-permission android:name="android.permission.READ_CALL_LOG"/>
import {
  PermissionsAndroid
} from "react-native";


useEffect(() => {
    requestForPermissions();
    startListenerTapped();
    return () => {
      stopListenerTapped();
    };
  }, []);

const requestForPermissions = async() => {
    try {
      const permissions = await PermissionsAndroid.requestMultiple(
       [
        PermissionsAndroid.PERMISSIONS.READ_CALL_LOG,
        PermissionsAndroid.PERMISSIONS.READ_PHONE_STATE
       ]);
      console.log('Permissions are: ', permissions);
     } catch (err) {
       console.warn(err);
     }
  }

I still have the Deprecated Gradle error but it doesn't prevent react-native run-android from finishing successfully.

@PopLocker714
Copy link

@thepragmaticidealist try changing the minimum sdk version, to do this in the androin/build.gradle file, change the line from minSdkVersion to version 24

buildscript {
    ext {
        buildToolsVersion = "34.0.0"
        // minSdkVersion = 21
        minSdkVersion = 24
        compileSdkVersion = 34
        targetSdkVersion = 34
        ndkVersion = "25.1.8937393"
        kotlinVersion = "1.8.0"
    }
    repositories {
        google()
        mavenCentral()
    }
    dependencies {
        classpath("com.android.tools.build:gradle")
        classpath("com.facebook.react:react-native-gradle-plugin")
        classpath("org.jetbrains.kotlin:kotlin-gradle-plugin")
    }
}

apply plugin: "com.facebook.react.rootproject"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants