Xtraball / Siberian

Siberian Single App Edition (SAE), free and open-source app builder.
https://www.siberiancms.com
Open Software License 3.0
167 stars 151 forks source link

Invalid application ID issue #809

Closed christopherthomson closed 3 years ago

christopherthomson commented 3 years ago

I'm trying to test an app build with SiberianCMS SAE. I download the sources and can successfully build an APK in Android Studio, and install on a device, but the app will not run. Nor can I get it to run on an emulated device in Android Studio, where I get an 'Invalid application ID' error (attached).

The only point where I departed from the documentation is that I had to use a different package name to 'package.placeholder' as Android Studio gives an error about using the reserved word 'package' and will not build an APK if this is used. Could this be the problem?

Should it be possible to test Siberian apps in this way prior to publishing to the Play Store? If I must use 'package.placeholder' and this prevents building the app in Android Studio, what alternatives for testing are there?

Thanks.

error

siberian_application_id_error.txt

SiberianCMS commented 3 years ago

package.placeholder is only for firebase, after that, when you build your app, it's replaced with the package name of app when built

christopherthomson commented 3 years ago

Ok thanks. I used 'package.placeholder' on Firebase, download it and place it in the app directory. When building I get a 'no matching client found for package name' error, so I manually change the package name in 'google-services.json' to the same as the package name set in the Siberian CMS back office (which I take from the AndroidManifest.xml file). Then the app will build.

However, when I try to run the app, I still get the error above stating my app ID is wrong. In the Backoffice my Admob ID field says '#1' and I have not modified this or any other Admob fields. Can you help? This is the error when trying to run the app in an emulator:

java.lang.RuntimeException: Unable to get provider com.google.android.gms.ads.MobileAdsInitProvider: java.lang.IllegalStateException:

******************************************************************************
* Invalid application ID. Follow instructions here:                          *
* https://googlemobileadssdk.page.link/admob-android-update-manifest         *
* to find your app ID.                                                       *
******************************************************************************

Thanks.

SiberianCMS commented 3 years ago

Try to empty the AdMob ID

And if you can't, use this blank one

ca-app-pub-0000000000000000~0000000000

And generate new sources, and recompile

christopherthomson commented 3 years ago

Thanks - I couldn't use the blank one, but creating an AdMob account and using that ID fixed it. Now the app builds, but unfortunately it will not run on an emulator or test device. I will open another issue for that.