木アリルートはUnityプロジェクトが踏んだ穴に接続されています


  • 私たちのUnityバージョンは5.5.5 p 2で、チャネル業者から最新のsdkバージョン3.4.9をもらいました.log:java.io.FileNotFoundException: mmyplugin_userinfo.apk java.io.FileNotFoundException: mmyplugin_pay.apk sdkにはこの2つのファイルがありませんね.
  • sdkの中のNewSDKEcDemoを解凍します.apk、見て?見えた!assetsにはこの2つのファイルがあり、何も言わずにプロジェクトにコピーします(この操作は後続のバグを引き起こし、後で詳しく話します)
  • 再パッケージテスト、正常なログインと支払いページの呼び出し、大喜び!順調ですね.穴はないでしょう.
  • はもう一回、ルートを私たちのゲームプロジェクトに接続して、resを合併して、libを統合して、発表して、resの中で現れた小さな穴を統合して詳しく言いません.パッケージング、テスト、あれ、前回パッケージングに成功したのに、今回はコードを1行変更しただけでパッケージングに失敗しました.Unityに印刷されたロゴを見てください:
    CommandInvokationFailure: Unable to convert classes into dex format.
    C:/Program Files (x86)/Java/jdk1.8.0_111\bin\java.exe -Xmx1024M -Dcom.android.sdkmanager.toolsdir="D:/Soft/android_sdk/Android_sdk9\tools" -Dfile.encoding=UTF8 -jar "C:\Program Files\Unity\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\sdktools.jar" -
    
    stderr[
    warning: Ignoring InnerClasses attribute for an anonymous inner class
    (b) that doesn't come with an
    associated EnclosingMethod attribute. This class was probably produced by a
    compiler that did not target the modern .class file format. The recommended
    solution is to recompile the class from source, using an up-to-date compiler
    and without specifying any "-target" type options. The consequence of ignoring
    this warning is that reflective operations on this class will incorrectly
    indicate that it is *not* an inner class.
    warning: Ignoring InnerClasses attribute for an anonymous inner class
    (c) that doesn't come with an
    associated EnclosingMethod attribute. This class was probably produced by a
    compiler that did not target the modern .class file format. The recommended
    solution is to recompile the class from source, using an up-to-date compiler
    and without specifying any "-target" type options. The consequence of ignoring
    this warning is that reflective operations on this class will incorrectly
    indicate that it is *not* an inner class.
    warning: Ignoring InnerClasses attribute for an anonymous inner class
    (e) that doesn't come with an
    associated EnclosingMethod attribute. This class was probably produced by a
    compiler that did not target the modern .class file format. The recommended
    solution is to recompile the class from source, using an up-to-date compiler
    and without specifying any "-target" type options. The consequence of ignoring
    this warning is that reflective operations on this class will incorrectly
    indicate that it is *not* an inner class.
    Uncaught translation error: java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: Java heap space
    1 error; aborting
    ]
    stdout[
    processing bin\classes\.\com\lkgame\sfish\mumayi\R.class...
    processing bin\classes\.\com\lkgame\sfish\mumayi\R$anim.class...
    processing bin\classes\.\com\lkgame\sfish\mumayi\R$array.class...
    processing bin\classes\.\com\lkgame\sfish\mumayi\R$attr.class...
    processing bin\classes\.\com\lkgame\sfish\mumayi\R$bool.class...
    processing bin\classes\.\com\lkgame\sfish\mumayi\R$color.class...
    processing bin\classes\.\com\lkgame\sfish\mumayi\R$dimen.class...
    processing bin\classes\.\com\lkgame\sfish\mumayi\R$drawable.class...
    processing bin\classes\.\com\lkgame\sfish\mumayi\R$id.class...
    processing bin\classes\.\com\lkgame\sfish\mumayi\R$integer.class...
    processing bin\classes\.\com\lkgame\sfish\mumayi\R$layout.class...
    processing bin\classes\.\com\lkgame\sfish\mumayi\R$menu.class...
    processing bin\classes\.\com\lkgame\sfish\mumayi\R$raw.class...
    processing bin\classes\.\com\lkgame\sfish\mumayi\R$string.class...
    processing bin\classes\.\com\lkgame\sfish\mumayi\R$style.class...
    processing bin\classes\.\com\lkgame\sfish\mumayi\R$styleable.class...
    processing bin\classes\.\com\lkgame\sfish\mumayi\R$xml.class...
    processing bin\classes\.\com\lkgame\sfish\mumayi\resources\R.class...
    processing bin\classes\.\com\lkgame\sfish\mumayi\resources\R$anim.class...
    processing bin\classes\.\com\lkgame\sfish\mumayi\resources\R$array.class...
    processing bin\classes\.\com\lkgame\sfish\mumayi\resources\R$attr.class...
    processing bin\classes\.\com\lkgame\sfish\mumayi\resources\R$bool.class...
    processing bin\classes\.\com\lkgame\sfish\mumayi\resources\R$color.class...
    processing bin\classes\.\com\lkgame\sfish\mumayi\resources\R$dimen.class...
    processing bin\classes\.\com\lkgame\sfish\mumayi\resources\R$drawable.class...
    processing bin\classes\.\com\lkgame\sfish\mumayi\resources\R$id.class...
    processing bin\classes\.\com\lkgame\sfish\mumayi\resources\R$integer.class...
    processing bin\classes\.\com\lkgame\sfish\mumayi\resources\R$layout.class...
    processing bin\classes\.\com\lkgame\sfish\mumayi\resources\R$menu.class...
    processing bin\classes\.\com\lkgame\sfish\mumayi\resources\R$raw.class...
    processing bin\classes\.\com\lkgame\sfish\mumayi\resources\R$string.class...
    processing bin\classes\.\com\lkgame\sfish\mumayi\resources\R$style.class...
    processing bin\classes\.\com\lkgame\sfish\mumayi\resources\R$styleable.class...
    processing bin\classes\.\com\lkgame\sfish\mumayi\resources\R$xml.class...
    processing archive bin\classes.jar...
    processing bitter/jnibridge/JNIBridge.class...
    processing bitter/jnibridge/JNIBridge$a.class...
    processing com/unity3d/player/NativeLoader.class...
    processing com/unity3d/player/ReflectionHelper.class...
    processing com/unity3d/player/ReflectionHelper$1.class...
    processing com/unity3d/player/ReflectionHelper$a.class...
    processing com/unity3d/player/UnityPlayer.class...
    processing com/unity3d/player/UnityPlayer$1.class...
    processing com/unity3d/player/UnityPlayer$10.class...
    processing com/unity3d/player/UnityPlayer$10$1.class...
    processing com/unity3d/player/UnityPlayer$1$1.class...
    processing com/unity3d/player/UnityPlayer$11.class...
    processing com/unity3d/player/UnityPlayer$12.class...
    processing com/unity3d/player/UnityPlayer$13.class...
    processing com/unity3d/player/UnityPlayer$14.class...
    processing com/unity3d/player/UnityPlayer$15.class...
    processing com/unity3d/player/UnityPlayer$16.class...
    processing com/unity3d/player/UnityPlayer$17.class...
    processing com/unity3d/player/UnityPlayer$18.class...
    processing com/unity3d/player/UnityPlayer$19.class...
    processing com/unity3d/player/UnityPlayer$2.class...
    processing com/unity3d/player/UnityPlayer$3.class...
    processing com/unity3d/player/UnityPlayer$4.class...
    processing com/unity3d/player/UnityPlayer$5.class...
    processing com/unity3d/player/UnityPlayer$6.class...
    processing com/unity3d/player/UnityPlayer$7.class...
    processing com/unity3d/player/UnityPlayer$8.class...
    processing com/unity3d/player/UnityPlayer$9.class...
    processing com/unity3d/player/UnityPlayer$a.class...
    processing com/unity3d/player/UnityPlayer$b.class...
    processing com/unity3d/player/UnityPlayer$c.class...
    processing com/unity3d/player/UnityPlayer$c$1.class...
    processing com/unity3d/player/UnityPlayer$d.class...
    processing com/unity3d/player/UnityPlayerActivity.class...
    processing com/unity3d/player/UnityPlayerNativeActivity.class...
    processing com/unity3d/player/UnityPlayerProxyActivity.class...
    processing com/unity3d/player/UnityWebRequest.class...
    processing com/unity3d/player/WWW.class...
    processing com/unity3d/player/a.class...
    processing com/unity3d/player/a$a.class...
    processing com/unity3d/player/b.class...
    processing com/unity3d/player/c.class...
    processing com/unity3d/player/d.class...
    processing com/unity3d/player/e.class...
    processing com/unity3d/player/f.class...
    processing com/unity3d/player/g.class...
    processing com/unity3d/player/g$1.class...
    processing com/unity3d/player/g$2.class...
    processing com/unity3d/player/g$3.class...
    processing com/unity3d/player/h.class...
    processing com/unity3d/player/i.class...
    processing com/unity3d/player/j.class...
    processing com/unity3d/player/j$a.class...
    processing org/fmod/FMODAudioDevice.class...
    processing org/fmod/a.class...
    processing archive plugins\.\AMap_Location_V3.3.0_20170118.jar...
    ignored resource META-INF/
    ignored resource META-INF/MANIFEST.MF
    ignored resource com/
    ignored resource com/amap/
    ignored resource com/amap/api/
    ignored resource com/amap/api/fence/
    processing com/amap/api/fence/DistrictItem.class...
    processing com/amap/api/fence/DistrictItem$1.class...
    processing com/amap/api/fence/GeoFence.class...
    processing com/amap/api/fence/GeoFence$1.class...
    processing com/amap/api/fence/GeoFenceClient.class...
    processing com/amap/api/fence/GeoFenceListener.class...
    processing com/amap/api/fence/GeoFenceManagerBase.class...
    processing com/amap/api/fence/PoiItem.class...
    processing com/amap/api/fence/PoiItem$1.class...
    ignored resource com/amap/api/location/
    processing com/amap/api/location/AMapLocation.class...
    processing com/amap/api/location/AMapLocationClient.class...
    processing com/amap/api/location/AMapLocationClientOption.class...
    processing com/amap/api/location/AMapLocationClientOption$AMapLocationMode.class...
    processing com/amap/api/location/AMapLocationClientOption$AMapLocationProtocol.class...
    processing com/amap/api/location/AMapLocationListener.class...
    processing com/amap/api/location/APSService.class...
    processing com/amap/api/location/APSServiceBase.class...
    processing com/amap/api/location/CoordUtil.class...
    processing com/amap/api/location/CoordinateConverter.class...
    processing com/amap/api/location/CoordinateConverter$1.class...
    processing com/amap/api/location/CoordinateConverter$CoordType.class...
    processing com/amap/api/location/DPoint.class...
    processing com/amap/api/location/DPoint$1.class...
    processing com/amap/api/location/LocationManagerBase.class...
    processing com/amap/api/location/a.class...
    ignored resource com/autonavi/
    ignored resource com/autonavi/aps/
    ignored resource com/autonavi/aps/amapapi/
    ignored resource com/autonavi/aps/amapapi/model/
    processing com/autonavi/aps/amapapi/model/AMapLocationServer.class...
    ignored resource com/loc/
    processing com/loc/a.class...
    processing com/loc/a$1.class...
    processing com/loc/a$a.class...
    processing com/loc/a$b.class...
    processing com/loc/a$c.class...
    processing com/loc/aa.class...
    processing com/loc/ab.class...
    processing com/loc/ac.class...
    processing com/loc/ad.class...
    processing com/loc/ad$a.class...
    processing com/loc/ae.class...
    processing com/loc/af.class...
    processing com/loc/ag.class...
    processing com/loc/ah.class...
    processing com/loc/ai.class...
    processing com/loc/aj.class...
    processing com/loc/ak.class...
    processing com/loc/ak$a.class...
    processing com/loc/al.class...
    processing com/loc/am.class...
    processing com/loc/an.class...
    processing com/loc/ao.class...
    processing com/loc/ap.class...
    processing com/loc/aq.class...
    processing com/loc/ar.class...
    processing com/loc/as.class...
    processing com/loc/at.class...
    processing com/loc/au.class...
    processing com/loc/au$1.class...
    processing com/loc/av.class...
    processing com/loc/aw.class...
    processing com/loc/ax.class...
    processing com/loc/ay.class...
    processing com/loc/ay$1.class...
    processing com/loc/ay$a.class...
    processing com/loc/az.class...
    processing com/loc/az$1.class...
    processing com/loc/b.class...
    processing com/loc/ba.class...
    processing com/loc/bb.class...
    processing com/loc/bc.class...
    processing com/loc/bc$a.class...
    processing com/loc/bd.class...
    processing com/loc/be.class...
    processing com/loc/be$1.class...
    processing com/loc/be$2.class...
    processing com/loc/be$3.class...
    processing com/loc/be$a.class...
    processing com/loc/be$a$a.class...
    processing com/loc/be$b.class...
    processing com/loc/be$c.class...
    processing com/loc/bf.class...
    processing com/loc/bg.class...
    processing com/loc/bg$1.class...
    processing com/loc/bh.class...
    processing com/loc/bi.class...
    processing com/loc/bi$a.class...
    processing com/loc/bj.class...
    processing com/loc/bk.class...
    processing com/loc/bk$a.class...
    processing com/loc/bl.class...
    processing com/loc/bl$1.class...
    processing com/loc/bm.class...
    processing com/loc/bn.class...
    processing com/loc/bo.class...
    processing com/loc/bp.class...
    processing com/loc/bq.class...
    processing com/loc/bq$1.class...
    processing com/loc/br.class...
    processing com/loc/bs.class...
    processing com/loc/bs$1.class...
    processing com/loc/bs$2.class...
    processing com/loc/bt.class...
    processing com/loc/bu.class...
    processing com/loc/bu$1.class...
    processing com/loc/bu$a.class...
    processing com/loc/bu$b.class...
    processing com/loc/bu$c.class...
    processing com/loc/bv.class...
    processing com/loc/bv$1.class...
    processing com/loc/bv$2.class...
    processing com/loc/bv$3.class...
    processing com/loc/bw.class...
    processing com/loc/bx.class...
    processing com/loc/by.class...
    processing com/loc/bz.class...
    processing com/loc/c.class...
    processing com/loc/ca.class...
    processing com/loc/cb.class...
    processing com/loc/cc.class...
    processing com/loc/cd.class...
    processing com/loc/ce.class...
    processing com/loc/cf.class...
    processing com/loc/cf$a.class...
    processing com/loc/cg.class...
    processing com/loc/ch.class...
    processing com/loc/ci.class...
    processing com/loc/cj.class...
    processing com/loc/ck.class...
    processing com/loc/cl.class...
    processing com/loc/cm.class...
    processing com/loc/cm$a.class...
    processing com/loc/cn.class...
    processing com/loc/co.class...
    processing com/loc/cp.class...
    processing com/loc/cq.class...
    processing com/loc/cq$a.class...
    processing com/loc/cr.class...
    processing com/loc/cs.class...
    processing com/loc/ct.class...
    processing com/loc/cu.class...
    processing com/loc/cu$1.class...
    processing com/loc/cv.class...
    processing com/loc/cw.class...
    processing com/loc/cw$1.class...
    processing com/loc/cx.class...
    processing com/loc/cy.class...
    processing com/loc/d.class...
    processing com/loc/d$1.class...
    processing com/loc/d$2.class...
    processing com/loc/d$3.class...
    processing com/loc/d$4.class...
    processing com/loc/d$a.class...
    processing com/loc/d$b.class...
    processing com/loc/d$c.class...
    processing com/loc/d$d.class...
    processing com/loc/e.class...
    processing com/loc/e$a.class...
    processing com/loc/e$b.class...
    processing com/loc/f.class...
    processing com/loc/g.class...
    processing com/loc/g$1.class...
    processing com/loc/g$2.class...
    processing com/loc/h.class...
    processing com/loc/h$1.class...
    processing com/loc/i.class...
    processing com/loc/i$a.class...
    processing com/loc/i$a$a.class...
    processing com/loc/j.class...
    processing com/loc/k.class...
    processing com/loc/l.class...
    processing com/loc/l$a.class...
    processing com/loc/l$a$a.class...
    processing com/loc/l$a$b.class...
    processing com/loc/l$a$c.class...
    processing com/loc/l$a$d.class...
    processing com/loc/l$b.class...
    processing com/loc/m.class...
    processing com/loc/m$a.class...
    processing com/loc/n.class...
    processing com/loc/n$a.class...
    processing com/loc/o.class...
    processing com/loc/p.class...
    processing com/loc/q.class...
    processing com/loc/r.class...
    processing com/loc/r$a.class...
    processing com/loc/s.class...
    processing com/loc/s$a.class...
    processing com/loc/t.class...
    processing com/loc/u.class...
    processing com/loc/v.class...
    processing com/loc/w.class...
    processing com/loc/x.class...
    processing com/loc/x$1.class...
    processing com/loc/x$2.class...
    processing com/loc/x$3.class...
    processing com/loc/y.class...
    processing com/loc/z.class...
    processing com/loc/z$1.class...
    processing com/loc/z$2.class...
    processing com/loc/z$a.class...
    processing archive plugins\.\AMap_Search_V4.0.0_20170111.jar...
    ignored resource META-INF/
    ignored resource META-INF/MANIFEST.MF
    ignored resource assets/
    ignored resource assets/amap_bus.png
    ignored resource assets/amap_car.png
    ignored resource assets/amap_end.png
    ignored resource assets/amap_man.png
    ignored resource assets/amap_start.png
    ignored resource com/
    ignored resource com/amap/
    ignored resource com/amap/api/
    ignored resource com/amap/api/services/
    ignored resource com/amap/api/services/a/
    processing com/amap/api/services/a/a.class...
    processing com/amap/api/services/a/aa.class...
    processing com/amap/api/services/a/ab.class...
    processing com/amap/api/services/a/ac.class...
    processing com/amap/api/services/a/ac$1.class...
    processing com/amap/api/services/a/ad.class...
    processing com/amap/api/services/a/ae.class...
    processing com/amap/api/services/a/af.class...
    processing com/amap/api/services/a/ag.class...
    processing com/amap/api/services/a/ah.class...
    processing com/amap/api/services/a/ai.class...
    processing com/amap/api/services/a/aj.class...
    processing com/amap/api/services/a/aj$1.class...
    processing com/amap/api/services/a/ak.class...
    processing com/amap/api/services/a/ak$1.class...
    processing com/amap/api/services/a/al.class...
    processing com/amap/api/services/a/al$1.class...
    processing com/amap/api/services/a/al$2.class...
    processing com/amap/api/services/a/am.class...
    processing com/amap/api/services/a/am$1.class...
    processing com/amap/api/services/a/an.class...
    processing com/amap/api/services/a/an$1.class...
    processing com/amap/api/services/a/an$2.class...
    processing com/amap/api/services/a/ao.class...
    processing com/amap/api/services/a
  • WTF,java.lang.OutOfMemoryError:Java heap spaceこれは何の鬼ですか.Unityを閉めて再開します.再パッケージするときにインターネットで調べましたが、この問題をどのように解決するかは見つかりませんでした.大体JVMのメモリを増やすと言っていますが、どこで増やすか分かりません.今回は梱包に成功したので、とりあえず試してみよう
  • 登録は正常で、支払いの時、支払いは成功して、しかし賞品は出していないで、logを打って、支払いの成功のコールバックが実行していないことを発見します:
    
        /**
         * @param tradeType
         * @param tradeCode
         * @param intent
         */
        @Override
        public void onTradeSuccess(String tradeType, int tradeCode, Intent intent) {
            //  
            Bundle bundle = intent.getExtras();
            String orderId = bundle.getString("orderId");
            String productName = bundle.getString("productName");
            String productPrice = bundle.getString("productPrice");
            String productDesc = bundle.getString("productDesc");
    
            Log.e("mumayi1", " orderid-->" + orderId);
            Log.e("mumayi1", " productName-->" + productName);
            Log.e("mumayi1", " productPrice-->" + productPrice);
            Log.e("mumayi1", " productDesc-->" + productDesc);
            Log.e("mumayi1", " tradeType-->" + tradeType);
    
            if (tradeCode == MMYInstance.PAY_RESULT_SUCCESS) {
                //  , 
                mUserCenter.checkUserState(MainActivity.this);
                Toast.makeText(this, productName + "   :" + productPrice, Toast.LENGTH_SHORT).show();
            } else if (tradeCode == MMYInstance.PAY_RESULT_FAILED) {
                Toast.makeText(this, productName + "   :" + productPrice, Toast.LENGTH_SHORT).show();
            }
        }
    
  • はサーバーにフィードバックして、サーバーはいくつかの問題を修正して、正常に賞を授与しました!しかしlogは支払いに成功したコールバックが実行されていないことを示しています!支払いページを呼び出してみたら、支払いをキャンセルし、支払いに失敗したコールバックが実行されたかどうか、MMP、失敗したコールバックが正常にトリガーされ、What The Hell! 
  • 木蟻の方とコミュニケーションして、apkを送ってあちらに測定して、結論は私のsdkが古くて、古くて、古いです!
  • 彼のところはmmy-core-3.4.9を再発した.jarは私にあげて、私はこれを見た時、心の中でこつこつとして、名前は同じです!Demoで解凍されたmmypluginではないでしょうか.userinfo.apkとmmyplugin_pay.apkは古くて、このjarの中で実はこの2つのファイルがあって、接尾辞を直して解凍して、本当にこの2つのファイルがあります!
  • この时私はほとんどこの2つのファイルdemoの中の古いことを肯定して、大きさを見て、違います、更にmmy-core-3.4.9.jarを工事中に入れると、svnマークはため息にならず、やはり.思わず深くため息をついた
  • ファイルを交換して再パッケージし、その間にもう一度パッケージに失敗し、Unityを再起動できなくなった.上機テストのコールバックがありました!

  • まとめ:
  • まだ解決されていない問題:java.lang.OutOfMemoryError:Java heap space,どのネットユーザーがこの文章を見て、また解決方法があるのか、ぜひ伝言を残してください
  • sdkのdemoを迷信しないでください.jarは彼らが全然一致しない可能性があります.迷信しないで、覚えて、覚えて、覚えて!
  • プロジェクトの现在の开発バージョンは端午の节句の前に急いで封版したため、私の実现は半分しかできなくて、できなくて、ただコードを新しいバージョンに移して、开発が完成した后に、市场は急いで上がって、私达の新しい更新は7月末までやっとオンラインになることができて、ほかにはなくて、すべてお金を稼ぐことを上にして、コードを古い上に移して、互換性をして、再测します.終わったら控訴しましょう