Android Question AppUpdating 2.0 crash with appcompat b4xdrawer

techknight

Well-Known Member
Licensed User
Longtime User
I forget the name of the Hamburger menu thing that uses appcompat, B4XDrawer I think?

anyways, If I add this to the manifest, my app crashes instantly:

B4X:
' Starting from Android 7 (API 24) we pass a file uri using a FileProvider
AddApplicationText(
  <provider
  android:name="android.support.v4.content.FileProvider"
  android:authorities="$PACKAGE$.provider"
  android:exported="false"
  android:grantUriPermissions="true">
  <meta-data
  android:name="android.support.FILE_PROVIDER_PATHS"
  android:resource="@xml/provider_paths"/>
  </provider>
)
CreateResource(xml, provider_paths,
   <files-path name="name" path="shared" />
)

AddManifestText(<uses-permission
   android:name="android.permission.WRITE_EXTERNAL_STORAGE"
   android:maxSdkVersion="19" />
)

AddPermission(android.permission.REQUEST_INSTALL_PACKAGES)

With:
B4X:
java.lang.RuntimeException: Unable to start activity ComponentInfo{md.smbk2at1/md.smbk2at1.main}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.view.View.setId(int)' on a null object reference

On Android 10, I get alot of appcompat.v7 errors with the same thing. null reference.

However, if I leave that stuff out of the manifest, it works fine.

thoughts?
 
Last edited:

techknight

Well-Known Member
Licensed User
Longtime User
No. B4XDrawer has nothing to do with AppCompat.

You should post the full error message.

Generally speaking there are less and less reasons to use AppCompat now.

Here is why I assumed so. the B4XDrawer sample has this:

B4X:
#Extends: android.support.v7.app.AppCompatActivity

Is this not AppCompat?
 
Upvote 0

techknight

Well-Known Member
Licensed User
Longtime User
Thats weird. Get back into work today, fresh boot of the machine and install of the App in debug mode so I could get the full error? Now it works. WHAT.

The things that just make you go insane right here. Joys of programming XD
 
Upvote 0
Top