Recently I tried to add Map Fragment to my Monodroid app written with Xamarin + MvvmCross.
When I modify manifest in accordance with one of the mapping guides Google Maps in Monodroid Apps to:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="auto" android:versionName="1.3.0.0" android:versionCode="1" package="MonoDroid.drdApp">
<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="15" />
<uses-feature android:glEsVersion="0x00020000" android:required="true" />
<uses-permission android:name="android.permission.DISABLE_KEYGUARD" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="MonoDroid.drdApp.permission.MAPS_RECEIVE" />
<permission android:name="MonoDroid.drdApp.permission.MAPS_RECEIVE" android:protectionLevel="signature" />
<application android:label="Droid App" android:icon="#drawable/icon">
<meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="my_valid_key_goes_here" />
</application>
</manifest>
I got the following error (runtime error):
Deployment failed because of an internal error: Unexpected install output: pkg: /data/local/tmp/MonoDroid.drdApp-Signed.apk
Failure [INSTALL_PARSE_FAILED_MANIFEST_MALFORMED]
I discovered that the manifest line which generates the error is:
<permission android:name="MonoDroid.drdApp.permission.MAPS_RECEIVE" android:protectionLevel="signature" />
but this line is mentioned in almost every guide I found related to google maps for Android.
I'm not sure what this line does and not sure if app will work without it (currently it doesn't and this line is one of the suspects.
Could someone clarify how to deal with that manifest line?
I'm not 100% certain, but I suspect that the problem is in using a capital letter in your package name.
Try monodroid.drdapp instead - this may clear the error.
(Or better still - use the company name as part of the manifest)
Related
By refer to Xamarin.Android 12.0 Release Notes, I set TargetFramework to Android 12 and I able to deploy project without any problem.
However, I encountered following error when I set android:targetSdkVersion to API 31 in android manifest.
ADB0010: Mono.AndroidTools.InstallFailedException: Unexpected install output: Failure [INSTALL_PARSE_FAILED_MANIFEST_MALFORMED: Failed parse during installPackageLI: /data/app/vmdl204773411.tmp/base.apk (at Binary XML file line #84): com.urbanairship.accengage.PackageUpdatedReceiver: Targeting S+ (version 31 and above) requires that an explicit value for android:exported be defined when intent filters are present]
This happens only when android:targetSdkVersion set to 31 and deployed to physical device/emulator with android 12. I already added android:exported="true" to MainActivity class and classes that use intent filters. Could anyone advice me how to resolve this?
AndroidManifest.xml
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="auto" package="com.myapp.simulation" android:versionName="1.0.30" android:versionCode="110" xmlns:tools="http://schemas.android.com/tools">
<uses-sdk android:minSdkVersion="24" android:targetSdkVersion="31" />
<uses-permission android:name="android.permission.CALL_PHONE" />
<uses-permission android:name="android.permission.CALL_PRIVILEGED" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.WRITE_CONTACTS" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.UPDATE_DEVICE_STATS" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
<uses-permission android:name="android.permission.MODIFY_PHONE_STATE" />
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
<uses-permission android:name="android.permission.CHANGE_CONFIGURATION" />
<uses-permission android:name="android.permission.USE_FINGERPRINT" />
<uses-permission android:name="android.permission.USE_BIOMETRIC" />
<uses-permission android:name="com.samsung.android.providers.context.permission.WRITE_USE_APP_FEATURE_SURVEY" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.INTERNET" />
<application tools:replace="android:allowBackup" android:name="android.support.multidex.MultiDexApplication" android:icon="#drawable/launcher_icon" android:allowBackup="false" android:fullBackupOnly="false" android:label="Sample App">
<receiver android:name="com.google.firebase.iid.FirebaseInstanceIdInternalReceiver" android:exported="false" />
<receiver android:name="com.google.firebase.iid.FirebaseInstanceIdReceiver" android:enabled="true" android:exported="true" android:permission="com.google.android.c2dm.permission.SEND">
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
<category android:name="${applicationId}" />
</intent-filter>
</receiver>
</application>
</manifest>
According to the error message, the PackageUpdatedReceiver in your project doesn't set a value for the android:exported. So you can try to set a value by the two following ways.
Set it in the attribute of the BroadCastReceiver:
[BroadcastReceiver(Exported = true)]
Set it into the application label in the AndroidManifest.xml:
Edit: For android 12, all the Services, BroadCastReceivers, Activity classes need to declare the value for the android:exported. So update the three part sdk to the last version.
I have an issue with this code. Cannot fathom what is wrong
Does someone have a clue?
Adobe Animate when publishing apk. Error creating files. Namespace is invalid in the application descriptor file.
<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<application xmlns="http://ns.adobe.com/air/application/26.0">
<id>NorskRadioUtenAir</id>
<versionNumber>1.0.0</versionNumber>
<versionLabel/>
<filename>NorskRadioUtenAir</filename>
<description/>
<name>NorskRadioUtenAir</name>
<copyright/>
<initialWindow>
<content>NorskRadioUtenAir.swf</content>
<systemChrome>standard</systemChrome>
<transparent>false</transparent>
<visible>true</visible>
<fullScreen>false</fullScreen>
<aspectRatio>portrait</aspectRatio>
<renderMode>cpu</renderMode>
<autoOrients>false</autoOrients></initialWindow>
<icon/>
<customUpdateUI>false</customUpdateUI>
<allowBrowserInvocation>false</allowBrowserInvocation>
<android>
<manifestAdditions><![CDATA[<manifest>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/> <application>
<meta-data android:name="com.google.android.gms.version" android:value="4323000" />
<!-- should be android:value="#integer/google_play_services_version" -->
<activity android:name="com.google.android.gms.ads.AdActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"/>
</application>
</manifest>]]></manifestAdditions>
</android>
<extensions>
<extensionID>com.pozirk.ads.AdMob</extensionID>
</extensions>
</application>
After Automatic actualization To Android 3.0 I keep Getting Manifest Error Althought Nothing was Changed by me In It.
I had Tried to
1) Reinstall Android Studio couple time
2) Clean Cache
3) Download SDK One more Time
4)I was Searching For inconsistience in build gradle.
Nothink Helped, One of Many problems in Manifest is That
Te fatal Problem is Error:(82) error: unknown element found.
MY MANIFEST
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.lenovo.licz4"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="15"
android:targetSdkVersion="26" />
<uses-permission android:name="android.permission.STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission
android:name="android.permission.AUTHENTICATE_ACCOUNTS"
android:maxSdkVersion="22" />
<uses-permission android:name="android.permission.READ_SYNC_STATS" />
<uses-permission
android:name="android.permission.USE_CREDENTIALS"
android:maxSdkVersion="22" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.WRITE_SYNC_SETTINGS" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<meta-data
android:name="android.support.VERSION"
android:value="26.0.0-alpha1" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<permission
android:name="com.example.lenovo.licz4.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
<uses-permission android:name="com.example.lenovo.licz4.permission.C2D_MESSAGE" />
<application
android:allowBackup="true"
android:debuggable="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/Theme.AppCompat.Light.NoActionBar" >
<service
android:name="com.example.lenovo.licz4.SyncService"
android:exported="true"
android:process=":com.example.lenovo.licz4.sync" >
<intent-filter>
<action android:name="android.content.SyncAdapter" />
</intent-filter>
<meta-data
android:name="android.content.SyncAdapter"
android:resource="#xml/syncadapter" />
</service>
<service android:name="com.example.lenovo.licz4.AuthenticatorService" >
<intent-filter>
<action android:name="android.accounts.AccountAuthenticator" />
</intent-filter>
<meta-data
android:name="android.accounts.AccountAuthenticator"
android:resource="#xml/authenticator" />
</service>
<provider
android:name="com.example.lenovo.licz4.StubProvider"
android:authorities="com.example.lenovo.licz4"
android:exported="false"
android:syncable="true" />
<activity android:name="com.example.lenovo.licz4.Activities.CopyDbActivity" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<account-authenticator
xmlns:android="http://schemas.android.com/apk/res/android"
android:accountType="http://example.com/"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:smallIcon="#drawable/ic_launcher" />
<receiver
android:name="com.google.android.gms.measurement.AppMeasurementReceiver"
android:enabled="true"
android:exported="false" >
</receiver>
<receiver
android:name="com.google.android.gms.measurement.AppMeasurementInstallReferrerReceiver"
android:enabled="true"
android:permission="android.permission.INSTALL_PACKAGES" >
<intent-filter>
<action android:name="com.android.vending.INSTALL_REFERRER" />
</intent-filter>
</receiver>
<service
android:name="com.google.android.gms.measurement.AppMeasurementService"
android:enabled="true"
android:exported="false" />
<receiver
android:name="com.google.firebase.iid.FirebaseInstanceIdReceiver"
android:exported="true"
android:permission="com.google.android.c2dm.permission.SEND" >
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
<category android:name="com.example.lenovo.licz4" />
</intent-filter>
</receiver>
<!--
<receiver
android:name="com.google.firebase.iid.FirebaseInstanceIdInternalReceiver"
android:exported="false" />
<service
android:name="com.google.firebase.iid.FirebaseInstanceIdService"
android:exported="true" >
<intent-filter android:priority="-500" >
<action android:name="com.google.firebase.INSTANCE_ID_EVENT" />
</intent-filter>
</service>
<provider
android:name="com.google.firebase.provider.FirebaseInitProvider"
android:authorities="com.example.lenovo.licz4.firebaseinitprovider"
android:exported="false"
android:initOrder="100" />
<activity
android:name="com.google.android.gms.common.api.GoogleApiActivity"
android:exported="false"
android:theme="#android:style/Theme.Translucent.NoTitleBar" />
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
</application>
</manifest>
MY BUILD GRADLE
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath 'com.google.gms:google-services:3.0.0'
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion "26.0.2"
defaultConfig {
applicationId "com.example.lenovo.licz4"
minSdkVersion 15
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:26.+'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.volley:volley:1.0.0'
compile 'com.google.firebase:firebase-core:10.0.1'
compile 'com.google.firebase:firebase-storage:10.0.1'
compile 'com.google.firebase:firebase-auth:10.0.1'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'com.firebaseui:firebase-ui-storage:0.6.0'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
I too had this problem and almost tried what you have tried.
My problem was solved by adding
android.enableAapt2=false
on grable.properties of project.
I hope this will help you too.
Since I do not have Mac and iPhone, the only option for me is to use Ionic Cloud to build my native binaries. However, first I wanted to play with it and see how will it work with android builds.
My application uses https://github.com/fechanique/cordova-plugin-fcm
So I can build application with ionic cordova build android and run it on my emulator without any problems. However if I execute ionic package build android and then ionic package info I get message that my build FAILED.
Examine this failure with ionic package BUILD_ID I get this message:
Error: cordova-plugin-fcm: You have installed platform android but file 'google-services.json' was not found in your Cordova project root folder.
So, looks like that my google-services.json does not get uploaded to the cloud. So searching I find few posts of people that had same problem but none of them provided me with solution. I also found this:
https://cordova.apache.org/docs/en/latest/config_ref/index.html#resource-file
So I have tried to tell to ionic to include this google-services.json file with package like this:
<?xml version='1.0' encoding='utf-8'?>
<widget id="me.citybeep.partnerapp" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
<!-- ... -->
<platform name="android">
<!-- ... -->
<resource-file src="google-services.json" target="platforms/android/google-services.json" />
</platform>
<!-- ... -->
<engine name="android" spec="^6.2.3" />
<plugin name="cordova-plugin-device" spec="^1.1.4" />
<plugin name="cordova-plugin-fcm" spec="^2.1.2" />
<plugin name="cordova-plugin-splashscreen" spec="^4.0.3" />
<plugin name="cordova-plugin-statusbar" spec="^2.2.2" />
<plugin name="cordova-plugin-whitelist" spec="^1.3.1" />
<plugin name="cordova-sqlite-storage" spec="^2.0.4" />
<plugin name="de.appplant.cordova.plugin.local-notification" spec="^0.8.5" />
<plugin name="ionic-plugin-keyboard" spec="^2.2.1" />
</widget>
And also tried this:
<resource-file src="google-services.json" target="google-services.json" />
But we no success, however now I get another message:
Adding android project...
Creating Cordova project for the Android platform:
Path: platforms/android
Package: me.citybeep.partnerapp
Name: City_Beep_Partner
Activity: MainActivity
Android target: android-25
Subproject Path: CordovaLib
Android project created with cordova-android#6.2.3
Error: Source path does not exist: google-services.json
I think this error is just that google-services.json did not get uploaded.
I am really dependent now on this plugin and using Ionic Push notifications is not an options at the moment...
So is there any way to tell ionic to include this google-services.json file when uploading to the cloud (and also .plist file). And I repeat, it is not problem with google-services.json file or my firebase project as everything works fine while performing build on my machine.
i tried several solutions, but the only one worked for me was specifying src and target with relative path of the google-services.json.
In your case change
<resource-file src="google-services.json" target="platforms/android/google-services.json" />
to
<resource-file src="platforms/android/google-services.json" target="platforms/android/google-services.json" />
this should work.
We have a web app that is running fine on dev machines and dev servers. For some very unknown reason (that's the whole point), the app does not run on our OAT server. Our situation is:
CustomErrors=Off not working
No log files
No Event Viewer entries
By design, the application is not logging anything (sad, I know). It does have a custom error redirect, which is working, but pointing to a page and controller that does not exists, it was never implemented.
So my first try was to set up CustomErrors and check on browser itself what is wrong. No luck. I have tried to change web.config:
<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration>
Again, no luck. Our L2 support does not have access to modify machine.config and set , so customerror is not an option.
Next, I have tried trace and log4net files (worked on dev machine and servers):
<log4net debug="true">
<root>
<level value="ALL" />
<appender-ref ref="dasAppender" />
</root>
<appender name="dasAppender" type="log4net.Appender.RollingFileAppender">
<file value="${ALLUSERSPROFILE}\DAS\Das.webApp.log" />
<appendToFile value="true" />
<rollingStyle value="Size" />
<maxSizeRollBackups value="5" />
<maximumFileSize value="10MB" />
<staticLogFileName value="true" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date [%thread] %level %logger - %message%newline" />
</appender>
</log4net>
Used %ALLUSERSPROFILE%, %temp%, IIS log folder. None have worked.
I don't know what to do next. Does anyone have any Idea?
Thank you
I did not solve it, but the team did.
They have added the following on web.config
<trust level="Full" />
</system.web>
and
<modules runAllManagedModulesForAllRequests="true" />
</system.webServer>