zoukankan      html  css  js  c++  java
  • Android打包遇到的问题

    问题一

    运行环境

    引擎:Unity 4.3.4f1

    安卓:Android 6

    打包机的环境

    image

    image

    出错堆栈

    Unity version     : 4.3.4f1
    Caused by: java.lang.UnsatisfiedLinkError: dlopen failed: /data/app/com.ooo.game-1/lib/arm/libmain.so: has text relocations
        at java.lang.Runtime.loadLibrary(Runtime.java:372)
        at java.lang.System.loadLibrary(System.java:1076)
        at com.unity3d.player.UnityPlayer.<clinit>(Unknown Source)
        at com.ooo.game.UnityPlayerNativeActivity.onCreate(UnityPlayerNativeActivity.java:30)
        at android.app.Activity.performCreate(Activity.java:6369)
        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1124)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2618)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2736)
        at android.app.ActivityThread.-wrap11(ActivityThread.java)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1561)
        at android.os.Handler.dispatchMessage(Handler.java:111)
        at android.os.Looper.loop(Looper.java:207)
        at android.app.ActivityThread.main(ActivityThread.java:5882)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:918)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:779)

    解决办法

     更新安卓sdk里的build tools和sdk tools

    问题二

    引擎:unity5.3.6

    Everyplay: Version: 2121-1540 (Sep 13, 2016)

    Error信息:

    Failed to compile resources with the following parameters:
    -bootclasspath "D:/Android/android-sdkplatformsandroid-24android.jar" -d "E:CodeUGUIDemoTempStagingAreainclasses" -source 1.6 -target 1.6 -encoding UTF-8 "comeveryplayEveryplayR.java" "org	estuguiR.java"
    ����: D:Androidandroid-sdkplatformsandroid-24android.jar(java/lang/Object.class): ���汾 52 �� 51 ��, �˱�����֧�����µ����汾��
      ���������˱�������
    ����: D:Androidandroid-sdkplatformsandroid-24android.jar(java/lang/AutoCloseable.class): ���汾 52 �� 51 ��, �˱�����֧�����µ����汾��
      ���������˱�������
    2 ������

    解决办法:

    删除android24的SDK,使用android 23的SDK来打包

    1、选中SDK Platform中的24(Android 7),点击Delect packages,可以看到android-sdkplatformsandroid-24 目录已被删除

    2、重新打包,即可

    打包安卓需要的package

    Install package

    • Tools
      • Android SDK Tools
      • Android SDK Platform-tools
      • Android SDK Build-tools(最新的版本)
    • Android 6.0 (API 23)
      • SDK Platform
      • Google APIs
      • Google APIs Intel x86 Atom_64 System Image
    • Extras
      • Android Support Repository
      • Android Support Library
      • Google Play services
      • Google Repository
      • Intel x86 Emulator Accelerator (HAXM installer)

    参考:http://www.codedata.com.tw/mobile/android-6-tutorial-1-2/

  • 相关阅读:
    linux date使用
    SHELL输出带颜色字体
    vimrc配置
    你所不知道的C++
    temp
    说什么好呢3
    Extjs3 Combo实现百度搜索查询
    Extjs3笔记 fbar
    Extjs combo赋值与刷新的先后顺序
    sql中nvarchar(max)长度测试
  • 原文地址:https://www.cnblogs.com/zhaoqingqing/p/5651271.html
Copyright © 2011-2022 走看看