Unity Build and Run aab file - nothing happens - android

I am using unity addressables for on-demand packs and also using google instant play plugin to build an instant app. I am using the unity's Build Settings -> Build and Run with my device connected. I have developer debugging enabled and the device is connected via usb. The aab file is built and saved on my local machine and when the build completes, nothing happens on the device. Shouldn't the game just start on the phone? When I search the phone, the app is also not anywhere to be found.
Any solutions?

So here is more of a workaround for this problem. The real solution needs to come I believe from either Unity or Google teams.
FIX:
Go to File -> Build settings -> player settings
Change the Company Name: com.yourname.currentname (to something else). Let's say: com.yourname.currentname2. And do the same for the packagename under "Other Settings".
Build and Run (having the device connected via USB and USB debugging enabled)
It should work. If still doesn't, make sure you uninstall your game (assuming you had it installed before on the device). If not installed, install it from the google play store or from an older apk, open the app info and clear all cache and data. Then uninstall it. Try the above steps for the fix.
On my side, I already had a published google play store app and now building an instant app for the same build. I uploaded a few instant app versions on the play store and installed them on the device. At that point I am not sure how google play handles the different versions (installed and instant one) and something terribly gets messed up. Is it caching some files somewhere? So aiming at a clean state is the key.

Related

React native android apk installation error

I install my create signed apk in some other device, it gets installed once only. After I uninstall it and install again the same apk, then it shows error 'app not installed'.
Also, the user login work only on localhost but not on development server/apk.
I have tried cleaning the gradlew every time and regenerating new apk, but nothing works.
Kindly help to resolve the issue.
Installation fails if you try the same file if it is not an app added to Google Store in Android
The first option is to re-install the APK with the same code under a different name,
or
Your device is protected from harmful apps with Google Play Protection. This is why you must release the check.
Open the Google Play Store app Google Play on your Android device.
Next to Menu, Play Protect tab the following settings:
Disables the scanning feature for security threats on the device.
You should use your computer's ip address instead of using 10.0.2.2 if you are running on local device. PS: the codes are still running native in the end. There is a better explanation here. [explained][1]Android Localhost?
About the installation failing, I have not experienced. But maybe it's was already published in Google Play as hong described?

How do I install an APK file using Android Studio?

I have an APK file and my developer assistant said to use it to install the app onto my phone, question is, how can I do it? Just click run? I think I tried it and it's not working, only the workshop files were editable ones and could run.
if you have ADB (android debugger) installed and set as environment path:
1st option:
i'd use that from cmd line. First you have to setup unknown sources from Settings menu and enable developer mode, and then trust USB Debug Options from your device. Go to system and you have to tap the version number a few times, you can google this. (That's how it used to be).
From Mac/Windows/Linux:
type:
To see if it's in path it should give you help:
adb
To enumerate devices connected via USB
adb devices
To install apk on your local machine to device (force install)
adb install -r ~/Desktop/some.apk
Or in Windows you can put your full path (force install)
adb install -r c:\Users\something\Desktop\some.apk
2nd option:
You can put APK on google drive, or some website you can access, even one drive or via email, then you can save it onto your device. Using ES File Manager, or some files manipulation tool, you can install it directly from there.
3rd option:
Use Google Play Beta or Alpha delivery methods. You can do a closed or open beta, and post it up there. That way all you need is a play.google link and then you will be able to install it, and manage updates via this method. I use this as I test alpha/beta APK Android Game deployment, and am able to distribute a URL (for open beta/alpha), and users can easily test it via this method. Amazon App Store and iTunes App Connect (iOS) has similar type options, too, but I'm just assuming you would distribute this App/Game via Play.
Remember if it's unsigned apk, you need to be able to enable side-loaded apks via your settings, app sources. If it's signed by a trusted developer then this shouldn't be a problem.
If you have an APK file you don’t need android studio.
Copy the file to the device you want to run it on and open it. You’ll be promoted to either enable developer mode or trust the app as a one off occasion.
You’ll then be given the option to install the app.
First you need to turn on "download from other sources" or something(I can not remember the option exactly) from your phone's setting. You can upload the apk file to google drive. And navigate to the directory use you phone, click and download file. And then you should be able to run and install the app to your phone.
Try PdaNet+.
It will easily install android studio application to your android mobile.
Download PdaNet+ for PC.
In mobile open Debugging.For Debugging go to Settings -> About phone -> SoftwareInfo -> Build Number -> Click 7 to 8 times on Build Number.It will open Developer Option.Go back to Setting there you see Developer option.Then in Developer Option search for USB Debugging and open it.Then connect your mobile to PC with USB.
Insatll PdaNet+ it ask to connect mobile,connect it with USB it will download mobile software.
After completing your program,in Android studio click on 'Run App' (Green symbol as Play Button) then it will show your Android Mobile in Connected Device.Then it will install Android Studio application to your mobile.

Can't Install after sharing it another mobile

I made an Android app using Android studio, deployed and ran it directly by using my mobile running Oreo.
It installed successfully. But later I tired to share the APK from my mobile to other mobiles. But none of them are able to Install it.
However, if I build the APK and share the app-debug.apk to other mobiles. It Installs successfully.
I can't build APK and share app-debug.apk it everyone.
I usually deploy it in my mobile, share APK(which used to work before)
Can anyone please help
Please excuse typos, I have typed from mobile.
There might be a signing issue. Is your app signed? The default signing is the debug signing. When you just build and deploy or run it on a connected device, it is signed by default as a debug sign.
If it is not uniquely signed, then running or installing on other devices might not be possible. Look at the app signing instruction and guide by Google, here, if you wish to distribute your app on other devices.
Another problem might be in the security authorization of other devices. Your device on which you are building has the developer options turned on. To run and install unsigned apps you'll need to activate the developer options in the device you want to run it on. Look at this link about Developer Options and how to turn it on.
by default the Android Studio packages just the needed files and installs the app in your mobile. If you share to other mobiles, the app will not install in few devices due to a few reasons like OS version, files mismatch, SHA keys mismatch, etc.
However, if you build the APK and share, the APK is equipped to be installed in any device starting from the minimum SDK version to the target SDK version.

Re-installation failed (YES) Package already exists

So, I have an app which I am running on real device. When running the app the following dialog is shown.
Clicking Yes is followed by error in Console
- google-play-services_lib] Installation error! The package already exists.
- Launch failed on device:
I have tried uninstalling app from my phone but didn't work.
Any idea how to fix it?
You dont need to reinstall google-play-services. It's updating automatically by Play Market.
I had problems like yours and let me guess:
when you debuging app from eclipse - google play services doesnt sign in, but when u release it and download from play market - it works fine.
If its true, so mark your google-services as a library and delete from "java build path" in your app.
right click on project-> Properties -> Java Build Path -> Projects
Delete google-play-services from there
Now, you have to obtain debug certificate SHA1
in Eclipse go to Window->Preferences
Andoid->Build
(there you can find debug certificate SHA1 for debuging)
Go to Android Developper Console https://play.google.com/apps/publish
Select your game in Play service
Go to "linked applications"
Create a NEW linked application android and put it your debug certificate SHA1
Wait a few to changes be deployed
You will get two similar links, but with different SHA1 ( one for debugging, second for releasing)
Now, you need to clear the Android Application cache before trying to connect
Clear cache of your application
Launch your app
I solved my problem like this
That's caused by attempting to install an apk maybe from the ide with debug keystore on a device that has the production apk with the production keystore. Just go into the phones app settings and uninstall the app. I get a few of these after I test the upgrade path from the beta store and then go back to developing with the ide.
try doing it through command prompt use:
adb uninstall PACKAGE_NAME
and see if it works
also try renaming the package name just to be sure.
I feel you are trying to install google-play-services.You don't need to update google play services.From the docs:
The Google Play services APK
The Google Play services APK contains the individual Google services
and runs as a background service in the Android OS. You interact with
the background service through the client library and the service
carries out the actions on your behalf. An easy-to-use authorization
flow is also provided to gain access to the each Google service, which
provides consistency for both you and your users.
The Google Play services APK is delivered through the Google Play
Store, so updates to the services are not dependent on carrier or OEM
system image updates. In general, devices running Android 2.3
(Gingerbread) or later and have the Google Play Store app installed
receive updates within a few days. This allows you to use the newest
APIs in Google Play services and reach most of the devices in the
Android ecosystem (devices older than Android 2.3 or devices without
the Google Play Store app are not supporte

Deploying Android App To Multiple Test Devices

I exported an unsigned apk file that represents a test version of my Android application. I need to distribute this to quite a few users. Is there a simple method to distribute the apk file where it will install the app? I'm trying to avoid the test users from having to download something like Astro or the sdk. Any ideas? I tried putting it out on a global web server and the file downloads but doesn't install. Thanks for the help!
From the android documentation:
The Android system will not install or run an application that is not
signed appropriately. This applies wherever the Android system is run,
whether on an actual device or on the emulator. For this reason, you
must set up signing for your application before you can run it or
debug it on an emulator or device.
So even if your users have the "Allow installing non-market apps" checked, your application will still have to be signed with at least a test key before it can be installed on a physical device.
I just put my experimental apps on the Android market with a description that says "don't install this, it won't work for you" and then give an access key to my testers.

Categories

Resources