I'm using base64-to-gallery to save images for android devices in my ionic app.
Previously it was working fine but now after added <preference name="android-targetSdkVersion" value="29" />to config.xml file, under android platform, it's not working.
Please kindly help me with it.
Finally solved the issue. To anyone who is struggling, I will explain as below.
As mentioned in the git, https://github.com/Nexxa/cordova-base64-to-gallery , ionic Cordova base64togallery plugin has been discontinued.
And also when trying to submit the ionic mobile app for Android production, it's saying that the target SDK version should be more than 29.
But as usual, if we add <preference name="android-targetSdkVersion" value="29" /> to the config.xml file under the Android platform, it will not work the base64togallery plugin (not saving images to your device)
So you have to do like below,
In your ionic project, go to build.gradle file (platforms\android\build.gradle) and change defaultTargetSdkVersion and defaultCompileSdkVersion to 29. (as below)
defaultTargetSdkVersion=29
defaultCompileSdkVersion=29
And then go to AndroidManifest.xml file
(platforms\android\app\src\main\AndroidManifest.xml) and add android:requestLegacyExternalStorage="true" to the application tag, as showing below.
<application android:hardwareAccelerated="true" android:icon="#mipmap/ic_launcher" android:label="#string/app_name" android:networkSecurityConfig="#xml/network_security_config" android:requestLegacyExternalStorage="true" android:supportsRtl="true">
Then try to build your app for debug or release versions.
Related
I am using the google_maps_flutter package and whenever I click the button to launch the google map I encounter this error:
google maps is not installed or is disabled
But such a thing was not true :(((
This error is happened to me in Android 11.
please help me to solve this.
To fix this, you will need to add the Google Maps package "com.google.android.apps.maps" as an entry in your AndroidManifest.xml entry:
<manifest package="com.your.package">
<queries>
<package android:name="com.google.android.apps.maps" />
</queries>
...
</manifest>
I have an app that user google navigation but as I am trying to use it it says:
"google maps is not installed or disabled". I have read in the internet that this is an Android 11 issue. Any thoughts how to fix this?
To fix this, you will need to add the Google Maps package "com.google.android.apps.maps" as an entry in your AndroidManifest.xml entry:
<manifest package="com.your.package">
<queries>
<package android:name="com.google.android.apps.maps" />
</queries>
...
</manifest>
I am getting the error "Class referenced in the manifest, com.yalantis.ucrop.UCropActivity, was not found in the project or the libraries " when I add an activity to my Android Manifest file. Here is the code which is causing the error:
<activity
android:name="com.yalantis.ucrop.UCropActivity"
android:screenOrientation="portrait"
android:theme="#style/Theme.AppCompat.Light.NoActionBar"/>
I am trying to install the image_cropper package, and in the installation guide it requires that I add this activity statement to the Android Manifest file. I am using MacOS
What I have tried:
I have followed the note in the installation guide "From v1.2.0, you need to migrate your android project to v2 embedding (detail)"
I ran pub get when I added to my pubspec.yaml
I ran flutter doctor and I have no warnings
Cleaned my flutter project and restarted Android Studio
you have to add the two activities in the android manifest that will help you edit the loaded image, the path is android android/app/src/main and add.
<activity android:name="com.android.camera.CropImage"/>
<activity android:name="com.yalantis.ucrop.UCropActivity"/>
I had the same problem and realized I made the silliest mistake. I merged an old project into a new one, and my manifest file was in the wrong place.
Make sure it's in android/app/src/main
I added these lines to /android/app/build.gradle file
android{
//...
lintOptions {
abortOnError false
}
}
and it worked for me.
ref: AndroidManifest class referenced applicationName was not found
I'm using Ionic2 and I just installed Push plugin into the App, and now its createing a duplicate of #string/google_app_id
Even if i delete one of them, when i run the project, ionic creates another one and I can't compile the app due to this error.
So this is what i get in the strings.xml
<string name="google_app_id">#string/google_app_id</string>
<string name="google_app_id" translatable="false">XXXXXXXXXX</string>
I tried removing the platform and the plugin and add it again to the proyect, but the error keeps showing.
Thank you all!!
You can see here that the firebase plugin does not handle the app id and api key.
In your case you can do this after installing the firebase plugin. Go to plugins folder and open cordova-plugin-firebase\plugin.xml and remove these lines,
<config-file parent="/resources" target="res/values/strings.xml">
<string name="google_app_id">#string/google_app_id</string>
</config-file>
Then add the android platform. Now you can build/run your android app.
This seems to be an issue introduced with version 0.1.24
replaced:
<plugin name="cordova-plugin-firebase" spec="^0.1.24" />
for:
<plugin name="cordova-plugin-firebase" spec="0.1.22" />
removed and readded the platform and is working fine!
No need to touch the plugin code
I used this command bellow:
$ cordova clean android
I am developing an app with phonegap 3.0.0. I need to show the confirm dialog so I added the Notification plugin from phonegap CLI with the following command (as described in CLI Documentation):
$ phonegap local plugin add https://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs.git
But now I can't build the project. When I try to build it fails with following error:
** BUILD FAILED **
The following build commands failed:
CompileC build/CamTest.build/Debug-iphonesimulator/CamTest.build/Objects-normal/i386/CDVNotification.o CamTest/Plugins/org.apache.cordova.dialogs/CDVNotification.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
When I remove the Notification plugin everything works fine. I've also tried to add the following in my config.xml (CamTest/www/config.xml) to no effect:
<feature name="Notification">
<param name="ios-package" value="CDVNotification" />
</feature>
Please someone tell me how to work with plugins in Phonegap 3.0.0. I am trying it on iphone simulator. Thanks.
We were facing the same problem, but before we added the required lines in config.xml. So, the following two step process also mentioned in this and this link solved the problem.
On the command line
$ cordova plugin add
https://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs.git
In project's config.xml
<feature name="Notification">
<param name="ios-package" value="CDVNotification" />
</feature>