Android Question need help: is there a compatibility issue between v11 to v12 ?

Zeev Goldstein

Well-Known Member
Licensed User
Longtime User
Following Erel's suggestion – I open a new thread

Here are the facts that caused the entire story
  • I have an existing app in google play store with many users

  • As B4A v12 was released I updated my B4A to v12

  • Trying to open the project with v12 and compile it generated many errors, on another post I was recommended to add the line #multidex: true – that resolved the issue and my app was compiled and an APK was generated

  • Then to test it I tried to update the app on my phone – got an error that the APK is not compatible
    tried it with a few other devices – same result
    a new app with compiled with v12 wont update an existing v11 app

  • Tried to compile on another machine still with v11 – all is perfect (removed the multidex: true line)

  • Made another test – took another app that required multidex: true as this one (the other is a small non commercial app so I could "play" with it – compiled it with a lower version number, removed it from my device and installed the new one (made with v12 and multidex) – then opened google play which immediately updated the app with the one in the store
    so the result as I see it is that google paly store managed to handle that update from v12 with multidex to v11 no multidex
Note:
there was no change in code other than adding multidex: true
In v12 it was mandatory as it wouldn't even complile without it
Did not change even one bit other than that

My problem is that I can't ask all existing users to remove and reinstall the app

I need help in resolving that issue

Is it v12 or multidex that caused the incompatibility?

If I will upload the new version (v12 & multidex) – will it update the existing clients with older version (v11 no multidex)?

Or any other idea?

Thank you
 

Zeev Goldstein

Well-Known Member
Licensed User
Longtime User
Zeev it is quite amazing how many posts you did, all of them with wrong assumptions and ignoring my answers.

This error has nothing to do with MultiDex.
It has nothing to do with B4A v12.
It has nothing to do with the new Android SDK.

And I cannot help you anymore. Sorry.
Erel,

it is not my place, my intention nor my desire to argue.
Try to see things from my view as I see them –
I just raised questions I had, I am just an ordinary user…
Everything was ok until I updated to v12, and when I did that and just opened the project it all crashed – what a simple man should think?
so I published a call for help
it was quite fast provided to me and the project new passed compilation – great!
But new there was a new issue – it didn't update the existing app with incompatible error message – what was changed? V12 and multidex…
So what could a simple man think now?
I did as you suggested and opened a new thread
Good people tried to help
Did I missed a tip or overlooked one?
Yes – possible, so I said I will try what I was told to do
I did not say anything against anything – I presented the facts as I saw them and asked questions I did not understand

One last thing – if my manifest has an error, how does it happen that a fresh install works and update not?
If the manifest is defective it should not install in any event – isn't it so?
I will try today to do as suggested and see, I will of course come back and report

Thank you for your help as you did and many times…
 
Upvote 0

Zeev Goldstein

Well-Known Member
Licensed User
Longtime User
OK - good progress
after adding the line to the manifest compiling and installing was OK
the app runs now
the problem now is that when i try to access the NFC i get these errors and the app crashed

this is the manifest section (added line marked as bold)



AddApplicationText(
<activity
android:exported="true"
android:name="net.appbyweb.cardreader.NfcScanner"
android:label="Test Activity">
<intent-filter>
<action android:name="android.nfc.action.TECH_DISCOVERED" />
<action android:name="android.nfc.action.TAG_DISCOVERED" />
</intent-filter>
</activity>
)


these are the error i got in the IDE


** Activity (main) Pause, UserClosed = false **
java.lang.RuntimeException: Unable to start activity ComponentInfo{arkom.webeft.android/net.appbyweb.cardreader.NfcScanner}: android.content.res.Resources$NotFoundException: Resource ID #0x0
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:4166)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4312)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:101)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2571)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:226)
at android.os.Looper.loop(Looper.java:313)
at android.app.ActivityThread.main(ActivityThread.java:8741)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)
Caused by: android.content.res.Resources$NotFoundException: Resource ID #0x0
at android.content.res.ResourcesImpl.getValueForDensity(ResourcesImpl.java:251)
at android.content.res.Resources.getDrawableForDensity(Resources.java:1050)
at android.content.res.Resources.getDrawable(Resources.java:990)
at android.content.res.Resources.getDrawable(Resources.java:965)
at net.appbyweb.cardreader.NfcScanner.onCreate(NfcScanner.java:88)
at android.app.Activity.performCreate(Activity.java:8578)
at android.app.Activity.performCreate(Activity.java:8557)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1384)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:4147)
... 12 more
 
Upvote 0

Zeev Goldstein

Well-Known Member
Licensed User
Longtime User
OK - good progress
after adding the line to the manifest compiling and installing was OK
the app runs now
the problem now is that when i try to access the NFC i get these errors and the app crashed

this is the manifest section (added line marked as bold)



AddApplicationText(
<activity
android:exported="true"
android:name="net.appbyweb.cardreader.NfcScanner"
android:label="Test Activity">
<intent-filter>
<action android:name="android.nfc.action.TECH_DISCOVERED" />
<action android:name="android.nfc.action.TAG_DISCOVERED" />
</intent-filter>
</activity>
)


these are the error i got in the IDE


** Activity (main) Pause, UserClosed = false **
java.lang.RuntimeException: Unable to start activity ComponentInfo{arkom.webeft.android/net.appbyweb.cardreader.NfcScanner}: android.content.res.Resources$NotFoundException: Resource ID #0x0
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:4166)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4312)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:101)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2571)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:226)
at android.os.Looper.loop(Looper.java:313)
at android.app.ActivityThread.main(ActivityThread.java:8741)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1067)
Caused by: android.content.res.Resources$NotFoundException: Resource ID #0x0
at android.content.res.ResourcesImpl.getValueForDensity(ResourcesImpl.java:251)
at android.content.res.Resources.getDrawableForDensity(Resources.java:1050)
at android.content.res.Resources.getDrawable(Resources.java:990)
at android.content.res.Resources.getDrawable(Resources.java:965)
at net.appbyweb.cardreader.NfcScanner.onCreate(NfcScanner.java:88)
at android.app.Activity.performCreate(Activity.java:8578)
at android.app.Activity.performCreate(Activity.java:8557)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1384)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:4147)
... 12 more
update:
if i disable the call to NFC all works like charm so now i guess the problem is somewhere with this lib that i use.
is there a way to fix it?
it works perfectly on versions prior 13
 
Upvote 0

mcqueccu

Well-Known Member
Licensed User
Longtime User
update:
if i disable the call to NFC all works like charm so now i guess the problem is somewhere with this lib that i use.
is there a way to fix it?
it works perfectly on versions prior 13
Good to hear app works on version prior 13.

With the crash, I will suggest you check the latest SDK or documentation of the NFCScanner for Android 13 compatibility.

If it's a library from the forum, contact the developer for an update.

Finally, kindly create a new thread for the nfcscanner crash on Android 13 so that the responses you get will be directed to the subject
 
Upvote 0

Zeev Goldstein

Well-Known Member
Licensed User
Longtime User
Thanks
The lib is from a freelancer that wrote it for me, at this point I disabled it and all is ok

Thank you all who came to assist
This thread as far as I concern is close
 
Upvote 0
Top