i am building zoom clone(flutter) using jitsi meet ,while runing the app on android emulator i am getting these error - flutter

1:19 Error:
android:exported needs to be explicitly specified for element <service#org.jitsi.meet.sdk.ConnectionService>. Apps targeting Android 12 and higher are required to specify an explicit value for android:exported when the corresponding component has an intent filter defined. See https://developer.android.com/guide/topics/manifest/activity-element#exported for details.
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:processDebugMainManifest'.
Manifest merger failed : android:exported needs to be explicitly specified for element <service#org.jitsi.meet.sdk.ConnectionService>. Apps targeting Android 12 and higher are required to specify an explicit value for android:exported when the corresponding component has an intent filter defined. See https://developer.android.com/guide/topics/manifest/activity-element#exported for details.
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 9s
Running Gradle task 'assembleDebug'... 11.3s
Exception: Gradle task assembleDebug failed with exit code 1
➜ untitled1

have you resolved this yet? if not, paste the below code inside the '<application></application>' of your AndroidManifest.xml
<application>
...
<service
android:name="org.jitsi.meet.sdk.ConnectionService"
android:permission="android.permission.BIND_TELECOM_CONNECTION_SERVICE"
android:exported="true">
<intent-filter>
<action android:name="android.telecom.ConnectionService" />
</intent-filter>
</service>
</application>
Let me know if it works for you.

Related

related with flutter gradle version

I changed some codes in gradle files for using external project.
but now facing with problems below, how can I work arrange these?
/AndroidManifest.xml Error:
android:exported needs to be explicitly specified for element <activity#com.example.awesome_flutter_layouts.MainActivity>. Apps targeting Android 12 and higher are required to specify an explicit value for android:exported when the corresponding component has an intent filter defined. See https://developer.android.com/guide/topics/manifest/activity-element#exported for details.
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:processDebugMainManifest'.
Manifest merger failed : android:exported needs to be explicitly specified for element <activity#com.example.awesome_flutter_layouts.MainActivity>. Apps targeting Android 12 and higher are required to specify an explicit value for android:exported when the corresponding component has an intent filter defined. See https://developer.android.com/guide/topics/manifest/activity-element#exported for details.
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 5s
Exception: Gradle task assembleDebug failed with exit code 1
<activity
android:name=".MainActivity"
android:exported="true"
android:launchMode="singleTop"
android:theme="#style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize">
<!-- Specifies an Android theme to apply to this Activity as soon as
the Android process has started. This theme is visible to the user
while the Flutter UI initializes. After that, this theme continues
to determine the Window background behind the Flutter UI. -->
<meta-data
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="#style/NormalTheme"
/>
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
try to add android:exported="true"

Exception: Gradle task assembleDebug failed with exit code 1?

my console
> Launching lib\main.dart on AOSP on IA Emulator in debug mode...
Running Gradle task 'assembleDebug'...
E:\Flutter Project\perpet1\android\app\src\debug\AndroidManifest.xml:15:9-22:20 Error:
android:exported needs to be explicitly specified for element <receiver#com.dexterous.flutterlocalnotifications.ScheduledNotificationBootReceiver>. Apps targeting Android 12 and higher are required to specify an explicit value for `android:exported` when the corresponding component has an intent filter defined. See https://developer.android.com/guide/topics/manifest/activity-element#exported for details.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugMainManifest'.
> Manifest merger failed : android:exported needs to be explicitly specified for element <receiver#com.dexterous.flutterlocalnotifications.ScheduledNotificationBootReceiver>. Apps targeting Android 12 and higher are required to specify an explicit value for `android:exported` when the corresponding component has an intent filter defined. See https://developer.android.com/guide/topics/manifest/activity-element#exported for details.
* 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 16s
Exception: Gradle task assembleDebug failed with exit code 1
my AndroidManifest.xml
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.perpet1">
<!-- The INTERNET permission is required for development. Specifically,
the Flutter tool needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
<uses-permission android:name="com.dexterous.flutterlocalnotifications.ScheduledNotificationBootReceiver"/>
</manifest>
So, I did flutter_local_notification update.
Then it appeared on the console as follows.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
There is no flutter doctor issue.
(in Android Studio)
First, I apologize that English is not my main language and it can be awkward because it is also my first time posting questions.
Above is the error on my console window.
I searched all day yesterday but couldn't find a solution. I would be truly grateful if someone helped me. TT

How can I solve Could not resolve all artifacts for configuration ':image_picker_android:debugUnitTestRuntimeClasspath problem

When I tries to run the application, It's works fine.
But when I build signed apk,
There was an error
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:lintVitalRelease'.
Could not resolve all artifacts for configuration ':image_picker_android:debugUnitTestRuntimeClasspath'.
Failed to transform bcprov-jdk15on-1.68.jar (org.bouncycastle:bcprov-jdk15on:1.68) to match attributes {artifactType=processed-jar, org.gradle.category=library, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-runtime}.
> Execution failed for JetifyTransform: /home/pappuraj/.gradle/caches/modules-2/files-2.1/org.bouncycastle/bcprov-jdk15on/1.68/46a080368d38b428d237a59458f9bc915222894d/bcprov-jdk15on-1.68.jar.
> Failed to transform '/home/pappuraj/.gradle/caches/modules-2/files-2.1/org.bouncycastle/bcprov-jdk15on/1.68/46a080368d38b428d237a59458f9bc915222894d/bcprov-jdk15on-1.68.jar' using Jetifier. Reason: IllegalArgumentException, message: Unsupported class file major version 59. (Run with --stacktrace for more details.)
Suggestions:
- Check out existing issues at https://issuetracker.google.com/issues?q=componentid:460323&s=modified_time:desc, it's possible that this issue has already been filed there.
- If this issue has not been filed, please report it at https://issuetracker.google.com/issues/new?component=460323 (run with --stacktrace and provide a stack trace if possible).
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 13s
Running Gradle task 'assembleRelease'... 14.2s
Gradle task assembleRelease failed with exit code 1
How can I solve this issue?
I solved this problem adding this section.
I added this code in the android section of app level build file.
lintOptions {
disable 'InvalidPackage'
disable "Instantiatable"
checkReleaseBuilds false
abortOnError false
}

Rtmp publisher package with null safety

I have tried many packages of rtmp publisher, but every package has null safety issues. I am new to flutter and the app I am making app which requires live streaming to rtmp url. I have rtmp url.
I have used this package and am trying to run it in vs code. https://github.com/pinkfish/flutter_rtmppublisher.
I am getting the following errors.
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':camera_with_rtmp:compileDebugAidl'.
> Could not resolve all task dependencies for configuration ':camera_with_rtmp:debugCompileClasspath'.
> Could not resolve project :rtplibrary.
Required by:
project :camera_with_rtmp
> No matching configuration of project :rtplibrary was found. The consumer was configured to find an API of a component, preferably optimized for Android, as well as attribute 'com.android.build.api.attributes.BuildTypeAttr' with value 'debug', attribute 'org.jetbrains.kotlin.platform.type' with value 'androidJvm' but:
- None of the consumable configurations have attributes.
* 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 5s
Exception: Gradle task assembleDebug failed with exit code 1
Exited (sigterm)

Android resource linking failed Flutter

I am running into this weird issue where I am getting this error.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugResources'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> Android resource linking failed
C:\Users\live\project_backup\build\file_picker\intermediates\library_manifest\debug\AndroidManifest.xml:9:5-15:15: AAPT: error: unexpected element <queries> found in <manifest>.
* 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 15s
Weird thing is this happens after I upgrade file_picker package and persists even if I downgrade in pubspec.yaml again. But when I try run the project from the backup and replace lib folder with the one where this error occurred, it works perfectly. When this error occurs, plugin downgrade, flutter clean doesn't work. Why is this issue happening? When I click on the error link I am redirected to file_picker->intermediate->library_manifest->debug->Android Manifest.xml and the code there looks as below.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.mr.flutter.plugin.filepicker" >
<uses-sdk android:minSdkVersion="16" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<queries>
<intent>
<action android:name="android.intent.action.GET_CONTENT" />
<data android:mimeType="*/*" />
</intent>
</queries>
Any suggestions on what is wrong and how to fix this?
I just found out the solution, queries is a new manifest element and require to use a new gralde android plugin.
so change to this version in build.gradle, this worked for me
classpath 'com.android.tools.build:gradle:4.1.0'
Also change gradle-wrapper version to 6.5 as it is required by 4.1.0 plugin
EDIT:
use this if and only if app does not work in release mode, otherwise use above method.
use file_picker version file_picker: 2.0.7 remember without ^ symbol. use android gradle plugin 3.5 only and don't migrate to 4.1.0.