首先多个 app 是互不影响的,还有既然提示 appid is invalid,那应该就是 appid 有问题,请在控制台 -> 自己的 app -> 设置 -> 基本信息 -> 应用key 下查看 appid 与 appkey,并将二者一起替换。

就是从这里复制的 我不会这个都不懂
另外新建的app id 只有之前一半长度 你确认没问题????

你的 appId 是多少(有问题的那个)?贴出来我们查一下。
说明一下:只暴露 appId,没有 appKey 的话,不会对你的应用数据带来任何安全风险。

7x4k0y3o76a85wwlrc7i39ia

你这个 appId 和 appKey 都是有效的,要不你把 调试日志打开,把 debug 信息贴出来我们看一看(注意隐藏掉 appKey 信息)?

开启调试日志的方法:
初始化时调用以下函数。注意发布应用时关闭日志,避免泄露数据。
Android SDK :
AVOSCloud.setDebugLogEnabled(true);

IM TAG: AVPushConnectionManager
HTTP TAG: ===AVOS Cloud===

08-20 22:10:03.058 2409-2409/com.caijia.staff E/===AVOS Cloud===﹕ LogUtil$avlog->e->34: { "error" : "appid is invalid" }
error:org.apache.http.client.HttpResponseException: Not Found
08-20 22:10:03.066 2409-2409/com.caijia.staff D/===AVOS Cloud===﹕ LogUtil$avlog->d->28: router failure. reconnect in1000
08-20 22:10:03.093 2409-2409/com.caijia.staff E/===AVOS Cloud===﹕ LogUtil$avlog->e->34: { "error" : "appid is invalid" }
error:org.apache.http.client.HttpResponseException: Not Found
08-20 22:10:03.094 2409-2409/com.caijia.staff D/===AVOS Cloud===﹕ LogUtil$avlog->d->28: router failure. reconnect in2000
08-20 22:10:03.094 2409-2409/com.caijia.staff V/AsyncHttpResponseHandler﹕ Progress 162 from 162 (100%)
08-20 22:10:03.102 2409-2409/com.caijia.staff D/===AVOS Cloud===﹕ LogUtil$avlog->d->28: {"e5t41eCKzxkTpGJLTvveCD0coMcBvJVI":{"updatedAt":"2015-08-21T02:10:02.612Z","createdAt":"2015-08-20T10:42:32.646Z","objectId":"mKzx9SDPUbrjKtF973MstiXe6vglYeFn"}}
08-20 22:10:03.103 2409-2409/com.caijia.staff I/Choreographer﹕ Skipped 31 frames! The application may be doing too much work on its main thread.
08-20 22:10:03.223 2409-2409/com.caijia.staff V/AsyncHttpResponseHandler﹕ Progress 32 from 32 (100%)
08-20 22:10:03.228 2409-2409/com.caijia.staff E/===AVOS Cloud===﹕ LogUtil$avlog->e->34: { "error" : "appid is invalid" }
error:org.apache.http.client.HttpResponseException: Not Found
08-20 22:10:03.229 2409-2409/com.caijia.staff D/===AVOS Cloud===﹕ LogUtil$avlog->d->28: router failure. reconnect in4000
08-20 22:10:05.108 2409-2409/com.caijia.staff V/AsyncHttpResponseHandler﹕ Progress 32 from 32 (100%)
08-20 22:10:05.110 2409-2409/com.caijia.staff E/===AVOS Cloud===﹕ LogUtil$avlog->e->34: { "error" : "appid is invalid" }
error:org.apache.http.client.HttpResponseException: Not Found
08-20 22:10:05.111 2409-2409/com.caijia.staff D/===AVOS Cloud===﹕ LogUtil$avlog->d->28: router failure. reconnect in8000
08-20 22:10:07.135 2409-2409/com.caijia.staff V/AsyncHttpResponseHandler﹕ Progress 32 from 32 (100%)
08-20 22:10:07.138 2409-2409/com.caijia.staff E/===AVOS Cloud===﹕ LogUtil$avlog->e->34: { "error" : "appid is invalid" }
error:org.apache.http.client.HttpResponseException: Not Found
08-20 22:10:07.139 2409-2409/com.caijia.staff D/===AVOS Cloud===﹕ LogUtil$avlog->d->28: router failure. reconnect in16000
08-20 22:10:11.271 2409-2409/com.caijia.staff V/AsyncHttpResponseHandler﹕ Progress 32 from 32 (100%)
08-20 22:10:11.274 2409-2409/com.caijia.staff E/===AVOS Cloud===﹕ LogUtil$avlog->e->34: { "error" : "appid is invalid" }
error:org.apache.http.client.HttpResponseException: Not Found
08-20 22:10:11.275 2409-2409/com.caijia.staff D/===AVOS Cloud===﹕ LogUtil$avlog->d->28: router failure. reconnect in32000
08-20 22:10:21.163 2409-2409/com.caijia.staff V/AsyncHttpResponseHandler﹕ Progress 32 from 32 (100%)
08-20 22:10:21.165 2409-2409/com.caijia.staff E/===AVOS Cloud===﹕ LogUtil$avlog->e->34: { "error" : "appid is invalid" }
error:org.apache.http.client.HttpResponseException: Not Found
08-20 22:10:21.166 2409-2409/com.caijia.staff D/===AVOS Cloud===﹕ LogUtil$avlog->d->28: router failure. reconnect in64000
08-20 22:10:39.194 2409-2409/com.caijia.staff V/AsyncHttpResponseHandler﹕ Progress 32 from 32 (100%)
08-20 22:10:39.196 2409-2409/com.caijia.staff E/===AVOS Cloud===﹕ LogUtil$avlog->e->34: { "error" : "appid is invalid" }
error:org.apache.http.client.HttpResponseException: Not Found
08-20 22:10:39.197 2409-2409/com.caijia.staff D/===AVOS Cloud===﹕ LogUtil$avlog->d->28: router failure. reconnect in128000

换成之前的appid 和 key 是ok的
之前的appid 长度是出问题的这个的2倍

这个请求是正常的,appId 就应该可用。能贴一下你的代码吗?看看你们做的是什么操作。

换app id 和 key 就ok了
代码是很简单的订阅频道代码

另外 ios 可以了 android 还是不行 是不是sdk有问题 ??

但是我就一个APP为什么id和key也是这样的问题,还有推送的消息,居然在我以前的一个账号上显示了,什么情况,求解答············································

因为 android 和 iOS 内部机制不一样,对于代码初始化的要求也是不一样的。你说的 android 不行,确实比较奇怪,在没有看到具体代码之前,我们也无法确定是哪个地方有问题。所以最好你把关键的代码片段贴出来,我们一起看看。

幸福的家庭都是一样的,不幸的家庭则各有各的不幸。。。

求详细说明一下状态,以及关键代码片段、日志。。。

package com.example.qicaijia;

import android.app.Application;
import android.content.Context;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager;
import android.graphics.Bitmap;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.os.Environment;
import android.text.TextUtils;
import android.util.Log;
import android.widget.Toast;

import com.avos.avoscloud.AVAnalytics;
import com.avos.avoscloud.AVOSCloud;
import com.example.qicaijia.pushtest.BuildConfig;

public class AppController extends Application {
private static AppController mInstance;
public static final String TAG = AppController.class.getSimpleName();
private String AppId = "";
private String _Key = "";

@Override
public void onCreate() {
    AVOSCloud.initialize(this, AppId, _Key);
    // 启用崩溃错误统计
    AVAnalytics.enableCrashReport(this.getApplicationContext(), true);
    if (DEBUG)
        AVOSCloud.setDebugLogEnabled(true);
    super.onCreate();
    mInstance = this;
}

public static synchronized AppController getInstance() {
    return mInstance;
}


/**
 * 判断当前版本是否兼容目标版本的方法
 *
 * @param VersionCode
 * @return
 */
public static boolean isMethodsCompat(int VersionCode) {
    int currentVersion = android.os.Build.VERSION.SDK_INT;
    return currentVersion >= VersionCode;
}

/**
 * 获取App安装包信息
 *
 * @return
 */
public PackageInfo getPackageInfo() {
    PackageInfo info = null;
    try {
        info = getPackageManager().getPackageInfo(getPackageName(), 0);
    } catch (PackageManager.NameNotFoundException e) {
        e.printStackTrace(System.err);
    }
    if (info == null)
        info = new PackageInfo();
    return info;
}


/*
//getBaseContext();
SharedPreferences prefs   = getSharedPreferences("user", Context.MODE_MULTI_PROCESS);
uid = prefs.getInt("uid",0);

SharedPreferences.Editor edit  = prefs.edit();
edit.putInt("uid", uid);
edit.commit();
*/
public static final boolean DEBUG = BuildConfig.DEBUG;

public static void log(String msg) {
    if (DEBUG)
        Log.d(TAG, "debug: " + msg);
}

}

package com.example.qicaijia.service;

import android.app.Notification;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;

import com.avos.avoscloud.AVOSCloud;
import com.avos.avospush.notification.NotificationCompat;
import com.example.qicaijia.pushtest.MainActivity;
import com.example.qicaijia.pushtest.R;

import org.json.JSONException;
import org.json.JSONObject;

import java.util.Iterator;

/**
* Created by HeiQi on 2015/5/22.
*/
public class MyCustomReceiver extends BroadcastReceiver {
private static final String TAG = "MyCustomReceiver";
public static final String Pushsend = "cn.caijia.pushsend";
// public static final String PayAction = "cn.caijia.paymentsend";
private static int notify_id = 100;
private int id = 1;

@Override
public void onReceive(Context context, Intent intent) {
    try {
        String action = intent.getAction();

// String channel = intent.getExtras().getString("com.avos.avoscloud.Channel");
// 获取消息内容
if (intent.getExtras() == null)
return;
if (intent.getExtras().getString("com.avos.avoscloud.Data") == null)
return;
JSONObject json = new JSONObject(intent.getExtras().getString("com.avos.avoscloud.Data"));
String title = json.optString("title");
String content = json.optString("alert");
JSONObject data = new JSONObject(json.optString("info"));

        // 推送
        Intent i = new Intent();
        i.setAction(Pushsend);
        context.sendBroadcast(i);

// String content = "这是内容";

        // 通知
        Intent resultIntent;
        resultIntent = new Intent(AVOSCloud.applicationContext, MainActivity.class);
        PendingIntent pendingIntent =
                PendingIntent.getActivity(AVOSCloud.applicationContext, 0, resultIntent,
                        PendingIntent.FLAG_UPDATE_CURRENT);
        NotificationCompat.Builder mBuilder =
                new NotificationCompat.Builder(AVOSCloud.applicationContext)
                        .setSmallIcon(R.mipmap.ic_launcher)
                        .setContentTitle(title)//AVOSCloud.applicationContext.getResources().getString(R.string.app_name)
                        .setContentText(content)
                        .setTicker(content);
        mBuilder.setContentIntent(pendingIntent);
        mBuilder.setAutoCancel(true);
        mBuilder.setDefaults(Notification.DEFAULT_SOUND);

        int mNotificationId = notify_id++;
        NotificationManager mNotifyMgr =
                (NotificationManager) AVOSCloud.applicationContext
                        .getSystemService(
                                Context.NOTIFICATION_SERVICE);
        mNotifyMgr.notify(mNotificationId, mBuilder.build());

// Log.d(TAG, "got action " + action + " on channel " + channel + " with:");
Iterator itr = json.keys();
while (itr.hasNext()) {
String key = (String) itr.next();
Log.d(TAG, "..." + key + " => " + json.getString(key));
}
} catch (JSONException e) {
Log.d(TAG, "JSONException: " + e.getMessage());
}
}

}

package com.example.qicaijia.pushtest;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;

import com.avos.avoscloud.AVException;
import com.avos.avoscloud.AVInstallation;
import com.avos.avoscloud.PushService;
import com.avos.avoscloud.SaveCallback;

public class MainActivity extends AppCompatActivity {

private String installationId;

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    PushService.setDefaultPushCallback(this, MainActivity.class);
    PushService.subscribe(this, "manager_1", MainActivity.class);
    AVInstallation.getCurrentInstallation().saveInBackground(new SaveCallback() {
        public void done(AVException e) {
            if (e == null) {
                installationId = AVInstallation.getCurrentInstallation().getInstallationId();
            }
        }
    });
}

@Override
public boolean onCreateOptionsMenu(Menu menu) {
    // Inflate the menu; this adds items to the action bar if it is present.
    getMenuInflater().inflate(R.menu.menu_main, menu);
    return true;
}

@Override
public boolean onOptionsItemSelected(MenuItem item) {
    // Handle action bar item clicks here. The action bar will
    // automatically handle clicks on the Home/Up button, so long
    // as you specify a parent activity in AndroidManifest.xml.
    int id = item.getItemId();

    //noinspection SimplifiableIfStatement
    if (id == R.id.action_settings) {
        return true;
    }

    return super.onOptionsItemSelected(item);
}

}

给我发封邮件 我把整个工程文件给你 quqiufeng@gmail.com

邮件已发。

问题已经重现,我们内部确认之后给你回复,谢谢反馈!

你好,确认是我们后台的问题,已经修复了,你可以试一下。