helloworldAndroid应用程序在Akaso平板电脑上崩溃,但在glaxyS3手机上没有



iv一直在使用Xe5编写一些Android应用程序,它们都在Galaxy S3上运行得很好。最近购买了一台运行Android 4.2.2的Akaso DTA90平板电脑?有什么想法吗?可能是解决方案问题?

我甚至试过一个基本的hello world应用程序,它也会崩溃

我的androidmanifest包含

    <?xml version="1.0" encoding="utf-8"?>
<!-- BEGIN_INCLUDE(manifest) -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
        package="com.embarcadero.tabtest2"
        android:versionCode="1"
        android:versionName="1.0.0">
    <!-- This is the platform API where NativeActivity was introduced. -->
    <uses-sdk android:minSdkVersion="9" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="android.permission.CALL_PHONE" />
    <uses-permission android:name="android.permission.CAMERA" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.READ_CALENDAR" />
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.READ_PHONE_STATE" />
    <uses-permission android:name="android.permission.WRITE_CALENDAR" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <application android:persistent="False" 
        android:restoreAnyVersion="False" 
        android:label="tabtest2" 
        android:installLocation="preferExternal" 
        android:debuggable="True" 
        android:largeHeap="False"
        android:icon="@drawable/ic_launcher"
        android:theme="@android:style/Theme.NoTitleBar">
        <!-- Our activity is a subclass of the built-in NativeActivity framework class.
             This will take care of integrating with our NDK code. -->
        <activity android:name="com.embarcadero.firemonkey.FMXNativeActivity"
                android:label="tabtest2"
                android:configChanges="orientation|keyboardHidden">
            <!-- Tell NativeActivity the name of our .so -->
            <meta-data android:name="android.app.lib_name"
                android:value="tabtest2" />
            <intent-filter>  
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter> 
        </activity>
        <receiver android:name="com.embarcadero.firemonkey.notifications.FMXNotificationAlarm" />
    </application>
</manifest>   
<!-- END_INCLUDE(manifest) -->

使用LogCat我得到以下

    I/SurfaceFlinger( 1083): GraphicBufferAlloc::createGraphicBuffer
I/ActivityManager( 1935): START u0 {act=android.intent.action.MAIN cat=[android.
intent.category.LAUNCHER] flg=0x10200000 pkg=com.embarcadero.testapp cmp=com.emb
arcadero.testapp/com.embarcadero.firemonkey.FMXNativeActivity bnds=[342,142][410
,222]} from pid 3097
D/audio_hw_primary( 1086): start_output_stream: card:0, port:0, rate:44100
V/alsa_pcm( 1086): pcm_open_req, playback card: 0, device: 0, req_rate: 44100
V/alsa_pcm( 1086): pcm_open_req try rate: 44100
V/alsa_pcm( 1086): pcm_open_req OK config->rate: 44100
I/ActivityManager( 1935): Start proc com.embarcadero.testapp for activity com.em
barcadero.testapp/com.embarcadero.firemonkey.FMXNativeActivity: pid=7014 uid=100
65 gids={50065, 1028}
I/SurfaceFlinger( 1083): GraphicBufferAlloc::createGraphicBuffer
I/SurfaceFlinger( 1083): GraphicBufferAlloc::createGraphicBuffer
I/dalvikvm( 7014): Turning on JNI app bug workarounds for target SDK version 9..
.
I/qtaguid ( 1935): Failed write_ctrl(s 1 10065) res=-1 errno=1
W/NetworkManagementSocketTagger( 1935): setKernelCountSet(10065, 1) failed with
errno -1
E/Trace   ( 7014): error opening trace file: No such file or directory (2)
W/ContextImpl( 7014): Unable to create external files directory
V/TabletStatusBar( 2453): setLightsOn(true)
I/ActivityManager( 1935): Process com.embarcadero.testapp (pid 7014) has died.
I/qtaguid ( 1935): Failed write_ctrl(s 0 10065) res=-1 errno=1
W/NetworkManagementSocketTagger( 1935): setKernelCountSet(10065, 0) failed with
errno -1
I/WindowState( 1935): WIN DEATH: Window{4140e350 u0 com.embarcadero.testapp/com.
embarcadero.firemonkey.FMXNativeActivity}
D/Zygote  ( 1084): Process 7014 exited cleanly (217)
I/SurfaceFlinger( 1083): GraphicBufferAlloc::createGraphicBuffer
W/BufferQueue( 1083): freeAllBuffersLocked called but mQueue is not empty
I/SurfaceFlinger( 1083): GraphicBufferAlloc::createGraphicBuffer
W/InputMethodManagerService( 1935): Window already focused, ignoring focus gain
of: com.android.internal.view.IInputMethodClient$Stub$Proxy@4125bce8 attribute=n
ull, token = android.os.BinderProxy@41380338
W/WindowManager( 1935): Rebuild removed 5 windows but added 4
W/WindowManager( 1935): This window was lost: Window{4140e350 u0 com.embarcadero
.testapp/com.embarcadero.firemonkey.FMXNativeActivity EXITING}
W/WindowManager( 1935): mDisplayId=0 mSession=Session{4145d470 7014:u0a10065} mC
lient=android.os.BinderProxy@40fddb98
W/WindowManager( 1935): mOwnerUid=10065 mShowToOwnerOnly=true
W/WindowManager( 1935): mAttrs=WM.LayoutParams{(0,0)(fillxfill) sim=#110 ty=1 fl
=#8010100 pfl=0x8 fmt=4 wanim=0x1030001}
W/WindowManager( 1935): Requested w=480 h=764 mLayoutSeq=4003
W/WindowManager( 1935): mBaseLayer=21000 mSubLayer=0 mAnimLayer=21000+0=21000 mL
astLayer=21025
W/WindowManager( 1935): mToken=AppWindowToken{41bc5f08 token=Token{4118b1d0 Acti
vityRecord{41087ea0 u0 com.embarcadero.testapp/com.embarcadero.firemonkey.FMXNat
iveActivity}}}
W/WindowManager( 1935): mRootToken=AppWindowToken{41bc5f08 token=Token{4118b1d0
ActivityRecord{41087ea0 u0 com.embarcadero.testapp/com.embarcadero.firemonkey.FM
XNativeActivity}}}
W/WindowManager( 1935): mAppToken=AppWindowToken{41bc5f08 token=Token{4118b1d0 A
ctivityRecord{41087ea0 u0 com.embarcadero.testapp/com.embarcadero.firemonkey.FMX
NativeActivity}}}
W/WindowManager( 1935): mViewVisibility=0x0 mHaveFrame=true mObscured=true
W/WindowManager( 1935): mSeq=0 mSystemUiVisibility=0x0
W/WindowManager( 1935): mGivenContentInsets=[0,0][0,0] mGivenVisibleInsets=[0,0]
[0,0]
W/WindowManager( 1935): mConfiguration={0.95 ?mcc?mnc en_US ldltr sw640dp w640dp
 h1018dp 120dpi lrg port finger -keyb/v/h -nav/h s.49}
W/WindowManager( 1935): mHasSurface=true mShownFrame=[0.0,0.0][480.0,764.0] isRe
adyForDisplay()=false
W/WindowManager( 1935): mFrame=[0,0][480,764] last=[0,0][480,764]
W/WindowManager( 1935): mSystemDecorRect=[0,0][480,764] last=[0,0][480,764]
W/WindowManager( 1935): Frames: containing=[0,0][480,764] parent=[0,0][480,764]
display=[0,0][480,764]
W/WindowManager( 1935):     content=[0,0][480,764] visible=[0,0][480,764]
W/WindowManager( 1935): Cur insets: content=[0,0][0,0] visible=[0,0][0,0]
W/WindowManager( 1935): Lst insets: content=[0,0][0,0] visible=[0,0][0,0]
W/WindowManager( 1935): WindowStateAnimator{4175e098 com.embarcadero.testapp/com
.embarcadero.firemonkey.FMXNativeActivity}:
W/WindowManager( 1935):   mSurface=Surface(name=com.embarcadero.testapp/com.emba
rcadero.firemonkey.FMXNativeActivity, identity=722)
W/WindowManager( 1935):   mDrawState=DRAW_PENDING mLastHidden=true
W/WindowManager( 1935):   Surface: shown=false layer=21025 alpha=1.0 rect=(0.0,0
.0) 480.0 x 764.0
W/WindowManager( 1935): mExiting=true mRemoveOnExit=true mDestroying=false mRemo
ved=false
W/WindowManager( 1935): Current app token list:
V/WindowManager( 1935):   #5: Token{4147e918 ActivityRecord{40f37df8 u0 com.andr
oid.launcher/com.android.launcher2.Launcher}}
V/WindowManager( 1935):   #4: Token{40f8ba70 ActivityRecord{40f5a6e0 u0 com.andr
oid.settings/.Settings}}
V/WindowManager( 1935):   #3: Token{41026c08 ActivityRecord{41066858 u0 com.andr
oid.vending/.AssetBrowserActivity}}
V/WindowManager( 1935):   #2: Token{40fdb350 ActivityRecord{41065178 u0 com.andr
oid.systemui/.usb.UsbStorageActivity}}
V/WindowManager( 1935):   #1: Token{412efc28 ActivityRecord{40f59780 u0 com.andr
oid.settings/.Settings$WifiSettingsActivity}}
V/WindowManager( 1935):   #0: Token{411d1618 ActivityRecord{41301c10 u0 com.goog
le.android.setupwizard/.SetupWizardActivity}}
W/WindowManager( 1935): Final window list:
V/WindowManager( 1935):   #0: Window{4118e328 u0 SearchPanel}
V/WindowManager( 1935):   #1: Window{4102e078 u0 NotificationPanel}
V/WindowManager( 1935):   #2: Window{40f5fc78 u0 SystemBar}
V/WindowManager( 1935):   #3: Window{41207b30 u0 CompatModePanel}
V/WindowManager( 1935):   #4: Window{41187228 u0 InputMethodsPanel}
V/WindowManager( 1935):   #5: Window{4124bca0 u0 Keyguard}
V/WindowManager( 1935):   #6: Window{410404a8 u0 InputMethod}
V/WindowManager( 1935):   #7: Window{4130e7f0 u0 com.android.launcher/com.androi
d.launcher2.Launcher}
V/WindowManager( 1935):   #8: Window{415a35a0 u0 com.android.settings/com.androi
d.settings.Settings}
V/WindowManager( 1935):   #9: Window{413e70d0 u0 com.android.vending/com.android
.vending.AssetBrowserActivity}
V/WindowManager( 1935):   #10: Window{41270650 u0 com.android.systemui/com.andro
id.systemui.usb.UsbStorageActivity}
V/WindowManager( 1935):   #11: Window{40f526e0 u0 com.android.systemui.ImageWall
paper}
I/SurfaceFlinger( 1083): GraphicBufferAlloc::createGraphicBuffer

从您的logcat中可以看出,尽管清单包含写入外部存储的权限,但您的设备仍然不允许写入,可能是由于缺少外部存储(或模拟外部存储):

W/ContextImpl( 7014): Unable to create external files directory

我现在不记得是什么原因导致Delphi启动想要写东西,但是如果你从项目fiule-use子句中删除StartupCopy单元,你可能会看到logcat的不同。。。。

假设您正在通过Eclipse进行Ad Hoc构建(运行方式->Android应用程序),只需打开LogCat视图(窗口->显示视图->其他,Android>LogCat),并在崩溃的平板电脑上发布错误追溯。

很可能是安卓版本错了,或者内存不足,或者你使用了一个不可用的功能,但如果没有回溯,我们就不会知道。

相关内容

  • 没有找到相关文章

最新更新