shounakmulay / Telephony

Flutter plugin for telephony features like query device sms directory, listen for incoming messages, retrieve various network parameters, etc.
https://telephony.shounakmulay.dev
MIT License
137 stars 133 forks source link

Problem during Gradle task 'assembleRelease' #92

Closed sanjay888 closed 3 years ago

sanjay888 commented 3 years ago

Hi,

I am relatively new to flutter apps, rather for mobile apps.

Thank you so much for providing the Telephony plugin, that made life easier for me. I am using all the features provided by Telephony and testing on MI A2 (Android 10) phone. While the debug version works smoothly, building APK (release mode) gradle fails with long list of information that does not give any clue. Giving below a glimpse

**Running Gradle task 'assembleRelease'...

FAILURE: Build failed with an exception.

As there was no issue before I added Telephony, so I re-checked updating pucspec.yami and AndriodManifest.xml step-by-stp and found that when following is added to AndroidManifest.xml, the issue crops up

    **<receiver android:name="com.shounakmulay.telephony.sms.IncomingSmsReceiver"
              android:permission="android.permission.BROADCAST_SMS" android:exported="true">
        <intent-filter>
            <action android:name="android.provider.Telephony.SMS_RECEIVED"/>
        </intent-filter>
    </receiver>**

Please note that adding above also necessitates to add following in pubspec.yami

plugin: platforms: android: package: com.shounakmulay.telephony pluginClass: TelephonyPlugin ios: pluginClass: TelephonyPlugin

However, once this happens even if I remove above portion, the error remains, and it leaves me baffled, can you please help?

sanjay888 commented 3 years ago

Hi, Above issue resolved, copy paste problem,

... ...

While pasting following in AndroidManifest.xml, inadvertently copied the three dots above the '...' required insertions. Though for some weird reason, debugger did not find it wrong, release did.

Thanks,