Facebook Messenger SDK for Android: crash when sharing a URL - facebook

I need to use the Facebook Messenger SDK in an Android app. I want to send a URL, just as text. Since ShareToMessengerParams is too limited, I was forced to manually construct an intent as shown at https://developers.facebook.com/docs/messenger/android#integration_with_intents:
private static final String EXTRA_PROTOCOL_VERSION = "com.facebook.orca.extra.PROTOCOL_VERSION";
private static final String EXTRA_APP_ID = "com.facebook.orca.extra.APPLICATION_ID";
private static final int PROTOCOL_VERSION = 20150314;
private static final String YOUR_APP_ID = "[YOUR_FACEBOOK_APP_ID]";
private static final int SHARE_TO_MESSENGER_REQUEST_CODE = 1;
...
String mimeType = "text/plain";
Intent intent = new Intent(Intent.ACTION_SEND);
intent.setPackage("com.facebook.orca");
intent.setType(mimeType);
intent.putExtra(Intent.EXTRA_TEXT, [MY_STRING_URL]);
intent.putExtra(EXTRA_PROTOCOL_VERSION, PROTOCOL_VERSION);
intent.putExtra(EXTRA_APP_ID, YOUR_APP_ID);
activity.startActivityForResult(shareIntent, SHARE_TO_MESSENGER_REQUEST_CODE);
This crashes with:
E/AndroidRuntime( 2429): FATAL EXCEPTION: main
E/AndroidRuntime( 2429): java.lang.ClassCastException: com.facebook.messaging.sharing.f cannot be cast to com.facebook.messaging.sharing.bs
E/AndroidRuntime( 2429): at com.facebook.messaging.sharing.cz.a(ShareLauncherActivity.java:294)
E/AndroidRuntime( 2429): at com.facebook.messaging.sharing.cz.onSuccess(ShareLauncherActivity.java:286)
E/AndroidRuntime( 2429): at com.google.common.f.a.q.run(Futures.java:1231)
E/AndroidRuntime( 2429): at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:442)
E/AndroidRuntime( 2429): at com.facebook.common.executors.dv.run(WrappingExecutorService.java:77)
E/AndroidRuntime( 2429): at android.os.Handler.handleCallback(Handler.java:615)
E/AndroidRuntime( 2429): at android.os.Handler.dispatchMessage(Handler.java:92)
E/AndroidRuntime( 2429): at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime( 2429): at android.app.ActivityThread.main(ActivityThread.java:4745)
E/AndroidRuntime( 2429): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 2429): at java.lang.reflect.Method.invoke(Method.java:511)
E/AndroidRuntime( 2429): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
E/AndroidRuntime( 2429): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
E/AndroidRuntime( 2429): at dalvik.system.NativeStart.main(Native Method)
W/ActivityManager( 312): Force finishing activity com.facebook.orca/com.facebook.messaging.sharing.ShareLauncherActivity
If I add:
intent.putExtra(Intent.EXTRA_STREAM, contentUri);
it doesn't crash but since my URL is just a link and does not point to a file, I get various errors: that the content could not be found, or, if I put a fake contentUri, the real URL I want to share is not activated upon clicking. If I remove:
intent.putExtra(EXTRA_APP_ID, YOUR_APP_ID);
it doesn't crash either but then users who have not installed my app (from which the sharing is done) do not get the Facebook Messenger "Install" button.
How can I share a web link and at the same time have users get the "Install" and "Reply" buttons as needed?

Related

my app crash because OkHttpChannelBuilder?

I have some users who have my production app who crash when he interact with. I have no idea where the problem come from.
Fatal Exception: java.lang.RuntimeException: Internal error in Cloud Firestore (24.2.2).
at com.google.firebase.firestore.util.AsyncQueue.lambda$panic$3(AsyncQueue.java:1)
at com.google.firebase.firestore.util.-$$Lambda$AsyncQueue$jx84dqgUsF4ojecSMurRqFLFD1Y.run(-.java:1)
at android.os.Handler.handleCallback(Handler.java:938)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:236)
at android.app.ActivityThread.main(ActivityThread.java:8051)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:620)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1011)
Caused by g.c.a.b.h.j: java.lang.RuntimeException: java.lang.ExceptionInInitializerError
at com.google.android.gms.tasks.zzw.getResult(zzw.java:3)
at com.google.firebase.firestore.remote.FirestoreChannel.lambda$runBidiStreamingRpc$0(FirestoreChannel.java:1)
at com.google.firebase.firestore.remote.-$$Lambda$FirestoreChannel$ThFui-hvcsrVGYxlBtcTH5vVbvE.onComplete(-.java:6)
at com.google.android.gms.tasks.zzi.run(zzi.java:21)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:462)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at com.google.firebase.firestore.util.AsyncQueue$SynchronizedShutdownAwareExecutor$DelayedStartFactory.run(AsyncQueue.java:15)
at java.lang.Thread.run(Thread.java:923)
Caused by java.lang.ExceptionInInitializerError:
at io.grpc.okhttp.OkHttpChannelBuilder.forTarget(OkHttpChannelBuilder.java)
at io.grpc.okhttp.OkHttpChannelProvider.builderForTarget(OkHttpChannelProvider.java:1)
at io.grpc.ManagedChannelBuilder.forTarget(ManagedChannelBuilder.java:2)
at com.google.firebase.firestore.remote.GrpcCallProvider.initChannel(GrpcCallProvider.java:2)
at com.google.firebase.firestore.remote.-$$Lambda$GrpcCallProvider$SCD5iiibQ8l4haiO8ofSfE0wIJg.call(-.java:2)
at com.google.android.gms.tasks.zzz.run(zzz.java:4)
at com.google.firebase.firestore.util.ThrottledForwardingExecutor.lambda$execute$0(ThrottledForwardingExecutor.java:1)
at com.google.firebase.firestore.util.-$$Lambda$ThrottledForwardingExecutor$MfIJbVuxZtLwosAgPzPA-cU66Ko.run(-.java:4)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:923)
Caused by java.lang.RuntimeException: java.lang.NoSuchMethodException: j.b.I1.values []
at java.lang.Enum.enumValues(Enum.java:270)
at java.lang.Enum.access$000(Enum.java:61)
at java.lang.Enum$1.create(Enum.java:277)
at java.lang.Enum$1.create(Enum.java:275)
at libcore.util.BasicLruCache.get(BasicLruCache.java:63)
at java.lang.Enum.getSharedConstants(Enum.java:289)
at java.lang.Class.getEnumConstantsShared(Class.java:2428)
at java.util.EnumSet.getUniverse(EnumSet.java:407)
at java.util.EnumSet.noneOf(EnumSet.java:109)
at java.util.EnumSet.of(EnumSet.java:235)
at io.grpc.okhttp.OkHttpChannelBuilder.<clinit>(OkHttpChannelBuilder.java:91)
at io.grpc.okhttp.OkHttpChannelBuilder.forTarget(OkHttpChannelBuilder.java)
at io.grpc.okhttp.OkHttpChannelProvider.builderForTarget(OkHttpChannelProvider.java:1)
at io.grpc.ManagedChannelBuilder.forTarget(ManagedChannelBuilder.java:2)
at com.google.firebase.firestore.remote.GrpcCallProvider.initChannel(GrpcCallProvider.java:2)
at com.google.firebase.firestore.remote.-$$Lambda$GrpcCallProvider$SCD5iiibQ8l4haiO8ofSfE0wIJg.call(-.java:2)
at com.google.android.gms.tasks.zzz.run(zzz.java:4)
at com.google.firebase.firestore.util.ThrottledForwardingExecutor.lambda$execute$0(ThrottledForwardingExecutor.java:1)
at com.google.firebase.firestore.util.-$$Lambda$ThrottledForwardingExecutor$MfIJbVuxZtLwosAgPzPA-cU66Ko.run(-.java:4)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:923)
Caused by java.lang.NoSuchMethodException: j.b.I1.values []
at java.lang.Class.getMethod(Class.java:2072)
at java.lang.Class.getDeclaredMethod(Class.java:2050)
at java.lang.Enum.enumValues(Enum.java:267)
at java.lang.Enum.access$000(Enum.java:61)
at java.lang.Enum$1.create(Enum.java:277)
at java.lang.Enum$1.create(Enum.java:275)
at libcore.util.BasicLruCache.get(BasicLruCache.java:63)
at java.lang.Enum.getSharedConstants(Enum.java:289)
at java.lang.Class.getEnumConstantsShared(Class.java:2428)
at java.util.EnumSet.getUniverse(EnumSet.java:407)
at java.util.EnumSet.noneOf(EnumSet.java:109)
at java.util.EnumSet.of(EnumSet.java:235)
at io.grpc.okhttp.OkHttpChannelBuilder.<clinit>(OkHttpChannelBuilder.java:91)
at io.grpc.okhttp.OkHttpChannelBuilder.forTarget(OkHttpChannelBuilder.java)
at io.grpc.okhttp.OkHttpChannelProvider.builderForTarget(OkHttpChannelProvider.java:1)
at io.grpc.ManagedChannelBuilder.forTarget(ManagedChannelBuilder.java:2)
at com.google.firebase.firestore.remote.GrpcCallProvider.initChannel(GrpcCallProvider.java:2)
at com.google.firebase.firestore.remote.-$$Lambda$GrpcCallProvider$SCD5iiibQ8l4haiO8ofSfE0wIJg.call(-.java:2)
at com.google.android.gms.tasks.zzz.run(zzz.java:4)
at com.google.firebase.firestore.util.ThrottledForwardingExecutor.lambda$execute$0(ThrottledForwardingExecutor.java:1)
at com.google.firebase.firestore.util.-$$Lambda$ThrottledForwardingExecutor$MfIJbVuxZtLwosAgPzPA-cU66Ko.run(-.java:4)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
at java.lang.Thread.run(Thread.java:923)

how to solve FATAL EXCEPTION: AsyncTask #2 in flutter

I am using video_editor package in flutter. When I at debug mode it works and no error but when I release the apk, the apps clash and show the error :
D/flutter-ffmpeg(10753): Getting media information for /data/user/0/com.example.apps/cache/file_picker/Screenrecorder-2021-05-19-15-53-57-515.mp4.
E/AndroidRuntime(10753): FATAL EXCEPTION: AsyncTask #2
E/AndroidRuntime(10753): Process: com.example.apps, PID: 10753
E/AndroidRuntime(10753): java.lang.RuntimeException: An error occurred while executing doInBackground()
E/AndroidRuntime(10753): at android.os.AsyncTask$4.done(AsyncTask.java:399)
E/AndroidRuntime(10753): at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:383)
E/AndroidRuntime(10753): at java.util.concurrent.FutureTask.setException(FutureTask.java:252)
E/AndroidRuntime(10753): at java.util.concurrent.FutureTask.run(FutureTask.java:271)
E/AndroidRuntime(10753): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
E/AndroidRuntime(10753): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
E/AndroidRuntime(10753): at java.lang.Thread.run(Thread.java:919)
E/AndroidRuntime(10753): Caused by: java.lang.UnsatisfiedLinkError: Bad JNI version returned from JNI_OnLoad in "/data/app/com.example.apps-QO20kuBv0uYvExYVArrO7A==/lib/arm64/libmobileffmpeg.so": 0
E/AndroidRuntime(10753): at java.lang.Runtime.loadLibrary0(Runtime.java:1071)
E/AndroidRuntime(10753): at java.lang.Runtime.loadLibrary0(Runtime.java:1007)
E/AndroidRuntime(10753): at java.lang.System.loadLibrary(System.java:1667)
E/AndroidRuntime(10753): at com.arthenica.mobileffmpeg.Config.<clinit>(Unknown Source:148)
E/AndroidRuntime(10753): at com.arthenica.mobileffmpeg.Config.nativeFFprobeExecute(Native Method)
E/AndroidRuntime(10753): at com.arthenica.mobileffmpeg.f.a(Unknown Source:0)
E/AndroidRuntime(10753): at com.arthenica.mobileffmpeg.f.b(Unknown Source:0)
E/AndroidRuntime(10753): at com.arthenica.mobileffmpeg.f.a(Unknown Source:48)
E/AndroidRuntime(10753): at c.b.a.a.c.a(Unknown Source:21)
E/AndroidRuntime(10753): at c.b.a.a.c.doInBackground(Unknown Source:2)
E/AndroidRuntime(10753): at android.os.AsyncTask$3.call(AsyncTask.java:378)
E/AndroidRuntime(10753): at java.util.concurrent.FutureTask.run(FutureTask.java:266)
E/AndroidRuntime(10753): ... 3 more
Does anyone know how to solve this error?
Please check that all required dependencies are included within "dependencies:" in pubspec.yaml. Dependencies declared inside "dev_dependencies:" are not included in released app
Add the following entries into your proguard-rules.pro file. If you don't have this file you can create and put in app folder.
-keep class com.arthenica.mobileffmpeg.Config {
native <methods>;
void log(long, int, byte[]);
void statistics(long, int, float, float, long , int, double, double);
}
-keep class com.arthenica.mobileffmpeg.AbiDetect {
native <methods>;
}

How to save assets images in phones gallery? Using gallery_saver plugin

Hey I am using https://pub.dev/packages/gallery_saver plugin and I have assets images in my app using I am trying to save in phones gallery. I am doing something like this but failed. Anyone pls help me
void _saveNetworkImage() async {
Directory tempDir = await getTemporaryDirectory();
String tempPath = tempDir.path;
String path = tempPath + '/' + widget.imagePath; // widget.imgPath = "assets/images/my image.jpg";
print('ddd' + path);
GallerySaver.saveImage(path).then((bool success) {
setState(() {
print('Image is saved');
});
});
}
}
I am calling ablove function as :
floatingActionButton: FloatingActionButton.extended(
onPressed: _saveNetworkImage,
icon: Icon(Icons.save),
label: Text('Gallery'),
backgroundColor: Colors.white54,
foregroundColor: Colors.black,
)
Here my function is running but giving error
D/ViewRootImpl#cbdf65[MainActivity]( 3518): ViewPostIme pointer 1
I/flutter ( 3518): path/data/user/0/com.thesachin.template/cache
I/flutter ( 3518): ddd/data/user/0/com.thesachin.template/cache/assets/images/aaj nhi kal karenge.jpg
E/AndroidRuntime( 3518): FATAL EXCEPTION: DefaultDispatcher-worker-1
E/AndroidRuntime( 3518): Process: com.thesachin.template, PID: 3518
E/AndroidRuntime( 3518): java.io.FileNotFoundException: /data/user/0/com.thesachin.template/cache/assets/images/aaj nhi kal karenge.jpg (No such file or directory)
E/AndroidRuntime( 3518): at java.io.FileInputStream.open0(Native Method)
E/AndroidRuntime( 3518): at java.io.FileInputStream.open(FileInputStream.java:231)
E/AndroidRuntime( 3518): at java.io.FileInputStream.<init>(FileInputStream.java:165)
E/AndroidRuntime( 3518): at carnegietechnologies.gallery_saver.FileUtils.getBytesFromFile(FileUtils.kt:216)
E/AndroidRuntime( 3518): at carnegietechnologies.gallery_saver.FileUtils.insertImage(FileUtils.kt:47)
E/AndroidRuntime( 3518): at carnegietechnologies.gallery_saver.GallerySaver$saveMediaFile$1$success$1.invokeSuspend(GallerySaver.kt:69)
E/AndroidRuntime( 3518): at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
E/AndroidRuntime( 3518): at kotlinx.coroutines.DispatchedTask.run(Dispatched.kt:238)
E/AndroidRuntime( 3518): at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:594)
E/AndroidRuntime( 3518): at kotlinx.coroutines.scheduling.CoroutineScheduler.access$runSafely(CoroutineScheduler.kt:60)
E/AndroidRuntime( 3518): at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:742)
D/ViewRootImpl#cbdf65[MainActivity]( 3518): MSG_WINDOW_FOCUS_CHANGED 0 1
D/InputMethodManager( 3518): prepareNavigationBarInfo() DecorView#460d1a9[MainActivity]
D/InputMethodManager( 3518): getNavigationBarColor() -855310
I/Process ( 3518): Sending signal. PID: 3518 SIG: 9
Lost connection to device.
Finally got it with https://pub.dev/packages/image_gallery_saver. Here is my working code:
void _saveNetworkImage() async {
final bytes = await rootBundle.load(widget.imagePath); // imagePath like "assets/images/my_image.jpg"
Uint8List clockBytes = bytes.buffer.asUint8List();
final result = ImageGallerySaver.saveImage(clockBytes);
print(result);
}
}

Android studio is not showing any errors but my logcat shows that there are errors

this is my logcat-
03-23 21:02:12.573 22442-22442/the.falacermusicE/AndroidRuntime:FATAL EXCEPTION: main
android.app.SuperNotCalledException: Activity {the.falacermusic/the.falacermusic.ui.activities.HomeActivity} did not call through to super.onStart()
at android.app.Activity.performStart(Activity.java:5196)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2087)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2139)
at android.app.ActivityThread.access$700(ActivityThread.java:143)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1241)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4963)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1038)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805)
at dalvik.system.NativeStart.main(Native Method)
03-23 21:02:12.573 22442-22442/the.falacermusicE/AndroidRuntime:FATAL EXCEPTION: main android.app.SuperNotCalledException: Activity {the.falacermusic/the.falacermusic.ui.activities.HomeActivity} did not call through to super.onStart()
As the error states you are implementing the onStart method in your HomeActivity but you are not going throgh the super.onStart() method.

PackageInfo versionCode and versionName null on phone, but works on emulator

I am building a private app that will not go through the Marketplace. As a result, I need to pull the current version application (not platform) information and check with the server to see if there is an update. It works great on the emulator, but when I installed the signed APK on my Droid X, it returns null. Here is the code:
PackageInfo pInfo = null;
try {
pInfo = getPackageManager().getPackageInfo("com.rubiconproject.expenses",
PackageManager.GET_META_DATA);
} catch (NameNotFoundException e) {
return;
}
String postUrl = DbAdapter.REMOTE_DB +
"/application/active-version/platform/android/version/" +
pInfo.versionCode + "." + pInfo.versionName;
EDIT:
I wrote a much smaller application, below, that displays my problem (TestingActivity.java):
package com.rubiconproject.testing;
import android.app.Activity;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.content.pm.PackageManager.NameNotFoundException;
import android.os.Bundle;
import android.widget.TextView;
public class TestingActivity extends Activity {
#Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
PackageInfo pInfo = null;
try {
pInfo = getPackageManager().getPackageInfo(
"com.rubiconproject.testing", PackageManager.GET_META_DATA);
} catch (NameNotFoundException e) {
return;
}
TextView tt = (TextView)findViewById(R.id.textView1);
tt.setText(pInfo.versionCode);
TextView tt2 = (TextView)findViewById(R.id.textView2);
tt2.setText(pInfo.versionName);
}
}
And the manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.rubiconproject.testing"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk android:minSdkVersion="9" />
<application android:icon="#drawable/icon" android:label="#string/app_name">
<activity android:name=".TestingActivity"
android:label="#string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
adb logcat shows:
E/AndroidRuntime( 335): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.rubiconproject.testing/com.rubiconproject.testing.TestingActivity}: java.lang.NullPointerException
E/AndroidRuntime( 335): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1622)
E/AndroidRuntime( 335): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1638)
E/AndroidRuntime( 335): at android.app.ActivityThread.access$1500(ActivityThread.java:117)
E/AndroidRuntime( 335): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:928)
E/AndroidRuntime( 335): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 335): at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime( 335): at android.app.ActivityThread.main(ActivityThread.java:3647)
E/AndroidRuntime( 335): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 335): at java.lang.reflect.Method.invoke(Method.java:507)
E/AndroidRuntime( 335): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
E/AndroidRuntime( 335): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
E/AndroidRuntime( 335): at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime( 335): Caused by: java.lang.NullPointerException
E/AndroidRuntime( 335): at com.rubiconproject.testing.TestingActivity.onCreate(TestingActivity.java:26)
E/AndroidRuntime( 335): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
E/AndroidRuntime( 335): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1586)
E/AndroidRuntime( 335): ... 11 more
where line 26 corresponds to:
tt.setText(pInfo.versionCode);
Does anyone know why this is happening?
Does your manifest.xml contain android:versionCode and androd:versionName attributes?
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.package.name"
android:versionCode="2"
android:versionName="1.1">
<application android:icon="#drawable/icon" android:label="#string/app_name">
...
</application>
</manifest>
Figured it out. The problem was between the keyboard and the chair. I was seeing null, when it fact the string was being built improperly.