Posts

Showing posts with the label create

"Application not installed" when APK is not signed

I wanted to test a small android app which I was working on, on my phone. I had already tested this app on an emulator and even on a physical device - my phone earlier, but I had done that via ADB. However, I wanted to install it this time from the apk file. Now, when I ran gradlew assembleRelease there were 2 apk files generated in the projectname /build/apk directory. One named projectname -debug-unaligned.apk and the other named projectname -release-unsigned.apk . The release unsigned one seemed to be the right one to try out. So I tried installing it on my phone. Everything went on well until I saw a message when it had just seemed like the app was installed which actually read: "Application not installed". I was a bit confused looking at the message, I didn't quite understand what went wrong as there was no details as to what went wrong in the message. I had pretty much everything configured the way I thought would be required like checking off the box against ...

Drupal 6 db_create_table cannot handle primary/unique keys

The Drupal API provides a function called db_create_table which allows you to create a table in your database. If you need to add a table for a module, after the module is installed, then you could use this function in your update hook. The documentation of db_create_table says that it accepts three arguments, an array which will contain the query result, the name of the table and an array containing the schema definition of the table. The schema definition has to be in the structure defined by the Drupal Schema API . What I recently noticed was, that db_create_table does not seem to accept primary/unique keys in the schema definition. It seems like you need to first create a table without any constraints. For this, you'll have to provide db_create_table with an array containing the schema without any key constraints. After doing that, you can use db_add_primary_key in order to create a primary key. Similarly, there is a function to create a unique key constraint - db_add_uniq...