Google Maps API V2 (Android) authentication erro - android-studio

I'm quite new to Android (and specifically Android Studio) development.
I tried to read several discussions of people with the same problem of mine.
I have followed 2 times the whole tutorial at: https://developers.google.com/maps/documentation/android/start
(with the only exception I didn't create a empty application but with a maps view)
I even tried to generate SHA1 various times
with different keystores
both debug and release types
tried to put API key directly as string or with reference to google_maps_api.xml in "values" folder.
as well as
regenerating API key
make a new project following again the whole procedure.
But I keep getting the error:
Failed to load map. Error contacting Google servers. This is probably an authentication issue (but could be due to network errors)
both on device (Nexus 5) and emulator AVD (Nexus 5).
Thanks in advance for any clue

There could be multiple cause,
first,
try to uninstall the app from your device
Clean the project
Install the project
It worked for me once,
if it doesn't work,
check that
<uses-feature
android:glEsVersion="0x00020000"
android:required="true" >
</uses-feature>
then check that <meta-data> is set correctlly in <application> tag.
Also try by adding following Permission
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>

Related

How to publish android app to galaxy store my binary i always recieve this binary cannot be registered

My Binary file cannot be registered on galaxy store. After i uploaded the apk i get this error(This binary cannot be registered. please try again later).
Apparently after several tries and error elimination in vain as there were not any technical errors concerning the app. The only error was a glitch in my connection. Trying a different connection solved the problem. The process is straight forward as described both on amazon and Samsung portal.

Lost files for my app, but still have key. Can I still update my app?

I have an app on the google play store that's getting around 3k downloads a day. Recently I tried sharing my files through google drive and they all got screwed up and won't work in Android Studio when I open them. Is it possible for me to start from scratch and submit that update to the listing I already have? All I'd like to do is place some ads into the app
I still have the key for the file I believe.
Thanks for any help in advance!
You can still sign a new version of the app so long as you have the original key and passcode (if you used one).
Submitting successfully will also require you to have the same package name and a version number higher than your last release.
Was able to find the answer! Turns out I can create a new android studio project with the same package names and sign with the old key.

AdroidStudio 2.2.2 Empty Activity Error on phone

I just started learning about Android development, so this one is a serious issue for me: I launch Android Studio (2.2.2, but had the issue since 2.2.1) on Win10, make a New project, just keep clicking Next without changing anything (selecting Empty Activity as the template), Finish, try to Run 'app' on my phone and consistently get this error:
Error while executing: am start -n "com.example.android.myapplication/com.example.android.myapplication.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.example.android.myapplication/.MainActivity }
Error type 3
Error: Activity class {com.example.android.myapplication/com.example.android.myapplication.MainActivity} does not exist.
Error while Launching activity
Being a complete newbie who was just supposed to change some text in XML and run the app on a phone, I have no idea what to do or edit to make a pregenerated app actually work. I searched StackOverflow for a more general approach to these errors and tried:
Restarting AS/computer
Disabling InstantRun
Messing with Clean/Rebuild/Synchronize/Sync with Gradle
Deleting .gradle and .idea folders and Syncing with Gradle
Some other obscure shenanigans with build.gradle and AndroidManifest
Various combinations of the above.
... None of which worked (or affected the problem in any way, in fact).
Other observations:
The app isn't even installed (checked All apps, there isn't any com.example.android.myapplication or MyApplication app on my device)
On the development course forum, it was suggested that com.example.android.myapplication/com.example.android.myapplication.MainActivity should only read com.example.android.myapplication/MainActivity. So far I haven't been able to figure out how to change that.
Update 1 New attempted fixes (neither of which worked):
Specified activity directy in Run/Debug window.
Specified no activity whatsoever (doesn't show that error, but doesn't run anything either).
Did File/Invalidate Caches
Changed android.intent.category.MAIN to all-lowercase and back.
Added "category android:name="android.intent.category.DEFAULT"/" to Manifest
Update 2 Managed to run the app on emulator. It seems to be working there, so the error will likely be somewhere between AS and the phone (Android 5.1.1, API 22).
Developer options and USB debugging are on (confirmed the pop-up message, too)
Driver is up to date (AS can see the phone without problem)
Phone is on (and not asleep) while I'm trying to run the app
Any suggestions why the phone won't download and run the app?
In your manifest file edit
with android:name="com.example.android.myapplication.MainActivity"
Make sure that your code doesn't mean any nonsense and that it wouldn't cause the app to crash, which is sometimes the problem. Try finding a problem in code which could crash the app. Maybe in your crash log you can find what causes the crash. Good luck fixing that.
According with your error log I suppose you did not delete previously installed app. See my accepted answer on the same question for details.

why does xamarin suddenly not let me deploy to iOS devices

This just started happening today after I got a message from xcode to agree to new t&c's.
I can't put anything on the device, on any of my computers.
Doesn't work on my macbook, doesn't work on my mac mini, doens't work with existing projects that worked fine until yesterday, doesn't even work with completely new projects.
I constantly get the message:
writeDictToFile:1241 open failed for
/Users/georgecook/Desktop/test/iOS/obj/iPhone/Debug/mtouch-cache/install-shadow-directory/339bee33bc83c8e05fbd004dcc732c0b/20715d40747e047ba8a4ce4c1d2672ef90161df5/ManifestCache.plist
: No such file or directory MDMCacheDirectoryManifest:1315
writeDictToFile failed to write to
/Users/georgecook/Desktop/test/iOS/obj/iPhone/Debug/mtouch-cache/install-shadow-directory/339bee33bc83c8e05fbd004dcc732c0b/20715d40747e047ba8a4ce4c1d2672ef90161df5/ManifestCache.plist
: No such file or directory error MT1006: Could not install the
application
'/Users/georgecook/Desktop/test/iOS/bin/iPhone/Debug/test.iOS.app' on
the device Gandalf the white: Your application failed code-signing
checks. Check your certificates, provisioning profiles, and bundle
ids. Probably your device is not part of the selected provisioning
profile (error: 0xe8008015).
No idea why this is suddenly happening - this is really not good - how to resolve this?
I tripped over this one recently too.
The key is this part of the message:
Your application failed code-signing checks. Check your certificates, provisioning profiles, and bundle ids. Probably your device is not part of the selected provisioning profile
Likely, your provisioning profile has expired. The easiest way to solve this is to launch Xcode, create an empty project, and hit Run. This will go over a series of dialog boxes offering you to fix your provisioning profile until it deploys. Once this happens, you can switch back to Visual Studio/Xamarin Studio and deploy.
One reason this can happen is if you have multiple developer accounts set up in XCode. Here are the steps
Verify that your device is on Apple member center
Verify that your device is part of the relevant provisioning profile
Repeat steps 1 and 2 for each account
Create a new project in XCode and run it on the device. XCode may ask you to select the team (if you have multiple accounts)
If you have multiple developer accounts (teams) set up in XCode, the repeat step 4 each time with a new project and select a different team each time.
These steps ensure that XCode clears the way for Xamarin. The idea is that Xamarin does not allow you to decide which "team" to use, so you want to make sure that XCode has done the setup for EVERY team.
I just had this ManifestCache.plist : No such file or directory problem. I checked device logs (View -> Pads -> iOS Device Log) to see why it was happening. Logs said it was rejecting an upgrade. Upgrade, I thought to myself, that doesn't sound right...then I remembered I had an app on my iPhone with the same identifier to.dima.application from a previous version which I forgot to uninstall. Removing the old app cleared up this issue for me. Hope this helps anyone else who has the same problem! :)
It works! I have found the solution.I was facing the same problem. Somehow there was a misconfiguration in Xamarin. The entitlements.plist had a wrong manuel entry. The cert ist checking all the values in it and if you have a manuel entry there it is not working anymore. Apple is searching somehow only for own entry they are needing.
I spent sometime on developer portal to find out the problem, it occurs because of distribution APNS or development. It did not fixed, after restoring all provisioning profiles and certificates, . In my case solution was letting Xamarin choose signing profiles. I did not use info.plist auto signing which did not solve either but changing Project -> iOS Bundle Signing -> Signing identity, Provisioning Profile Auto solved all issues for development and production cases.
I had the same issue, and so I opened Xcode and updated all my profiles, but nothing happened. So I added the device UDID in the developer portal to the team I was developing for, went to Xcode and updated the profiles again, and then it worked. Don't know if the device must be registered to be able to build to device or this triggered some other update to my profiles that suddenly made it work.
Today they published a new revision of the Apple Developer Licence agreement.
The error message was essentially the same as OP's. The true reason only became apparent when creating a new project in XCode on the Mac, where more useful warnings show up in the "Deployment info" section of the "General" tab.
I had to log in to apple.developer.com, there was a red panel asking me to accept the new licence conditions, and as soon as I did that, deploying apps from Xamarin immediately worked again.

Compiling the GKRocket demo without Provisioning and Code Signing

I understand the need to provision apps when you are getting close to deployment; however, right now, I am just trying to play with some sample code. Specifically, the GKRocket demo that ships with iOS 4.2 SDK. I want to compile and run it; however, I get the following error:
Code Sign error: a valid provisioning profile matching the application's Identifier 'com.apple.GKRocket' could not be found
The readme.txt claims "Build the game simply by opening it with Xcode and clicking on Build and Go."
I just read the following thread
Code Sign Error When Building iPhone Application
and the following
http://developer.apple.com/ios/manage/bundles/index.action
Since the app is using the NSNotificationCenter, it leads me to believe that I need an AppID. But shouldn't the demo already be pointing to and AppID setup by Apple for the demo code?
The plist shows
Bundle identifier com.apple.${PRODUCT_NAME:rfc1034identifier}
any ideas on what I should do to compile and run this in the simulator?
Update:
I was able to get it running by code signing, but never could compile without it :(
It appears since the GKRocket Demo is using the NSNotification Center that in fact you need to sign your code. You can sign your code with your/or your team cert. Change the Project -> Project Settings -> Code Signing Identity to use your cert. Note: If you don't have your cert, and you paid the $99 dev license go through the steps here.
Then open the plist file and change the bundle to your domain name.
Also, to get the GKRocket Demo running, make sure you turn on Bluetooth in your network settings.
System Preferences -> Bluetooth. Turn it on and check discoverable. Then go into advanced settings
Install your app on your iPhone with a build and run. Close the debugger. Then start your app in the local iOS simulator. Now manually run your app on your phone.

Resources