goolge api错误{域:“ androidpublisher”,原因:“ noApks”,消息:“此应用没有APK。” }

时间:2018-11-09 18:30:21

标签: google-api apk

我点击了http://frontendcollisionblog.com/javascript/2015/12/26/using-nodejs-to-upload-app-to-google-play.html此处的链接,以使用node将apk上传到googleapi。我总是遇到这个错误

errors: 
[ { domain: 'androidpublisher', 
    reason: 'noApks', 
    message: 'This app has no APKs.' } ]

这是我的上传功能

function upload(data) {
  var edit = data.edit;
  var apk = data.apk;
  console.log("upload" + edit.data.id);
  return new Promise(function(resolve, reject) {
    play.edits.apks.upload({
      editId: edit.data.id,
      media: {
       mimeType: 'application/vnd.android.package-archive',
       body: apk
     }
   }, function(err, res) {
      if(err || !res) {
      reject(err);
   }

   resolve(_.omit(_.extend(data, { uploadResults: res }), 'apk'));
  });
 });
}

任何人都知道错误是什么以及如何解决?

0 个答案:

没有答案