编译时出现Android错误

时间:2015-04-10 10:29:19

标签: android

当我运行MainActivity时,它完全正常工作,并且错误显示当我启动Intent时,我将不会共享代码,因为它是私有的,但我希望这个错误消息就足够了。

我在使用Android时遇到了问题,这是我收到的错误:

04-11 00:23:42.136 9030-9030/vox.office D/libEGL﹕ loaded /system/lib/egl/libEGL_mali.so 04-11 00:23:42.171 9030-9030/vox.office D/libEGL﹕ loaded /system/lib/egl/libGLESv1_CM_mali.so 04-11 00:23:42.171 9030-9030/vox.office D/libEGL﹕ loaded /system/lib/egl/libGLESv2_mali.so 04-11 00:23:42.186 9030-9030/vox.office D/﹕ Device driver API match Device driver API version: 10 User space API version: 10 04-11 00:23:42.186 9030-9030/vox.office D/﹕ mali: REVISION=Linux-r2p4-02rel0 BUILD_DATE=Tue Oct 16 15:37:13 KST 2012 04-11 00:23:42.251 9030-9030/vox.office D/OpenGLRenderer﹕ Enabling debug mode 0 04-11 00:23:45.036 9030-9030/vox.office E/SensorManager﹕ thread start 04-11 00:23:45.041 9030-9030/vox.office D/SensorManager﹕ registerListener :: handle = 0 name= LSM330DLC 3-axis Accelerometer delay= 200000 Listener= android.view.OrientationEventListener$SensorEventListenerImpl@42d8d708 04-11 00:23:45.366 9030-9030/vox.office E/SpannableStringBuilder﹕ SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length 04-11 00:23:45.366 9030-9030/vox.office E/SpannableStringBuilder﹕ SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length 04-11 00:23:45.411 9030-9033/vox.office D/dalvikvm﹕ GC_CONCURRENT freed 114K, 9% free 12434K/13639K, paused 18ms+3ms, total 44ms 04-11 00:23:49.526 9030-9030/vox.office D/SensorManager﹕ unregisterListener:: Listener= android.view.OrientationEventListener$SensorEventListenerImpl@42d8d708 04-11 00:23:49.526 9030-9030/vox.office D/Sensors﹕ Remain listener = Sending .. normal delay 200ms 04-11 00:23:49.526 9030-9030/vox.office I/Sensors﹕ sendDelay --- 200000000 04-11 00:23:49.526 9030-9030/vox.office D/SensorManager﹕ JNI - sendDelay 04-11 00:23:49.526 9030-9030/vox.office I/SensorManager﹕ Set normal delay = true 04-11 00:23:49.946 9030-9033/vox.office D/dalvikvm﹕ GC_CONCURRENT freed 270K, 11% free 12609K/14023K, paused 13ms+2ms, total 31ms 04-11 00:23:49.956 9030-9030/vox.office D/AbsListView﹕ Get MotionRecognitionManager 04-11 00:23:50.216 9030-9033/vox.office D/dalvikvm﹕ GC_CONCURRENT freed 223K, 10% free 12805K/14151K, paused 13ms+14ms, total 42ms 04-11 00:23:50.366 9030-9033/vox.office D/dalvikvm﹕ GC_CONCURRENT freed 414K, 11% free 12821K/14343K, paused 2ms+5ms, total 26ms 04-11 00:23:50.586 9030-9033/vox.office D/dalvikvm﹕ GC_CONCURRENT freed 457K, 11% free 12845K/14407K, paused 12ms+17ms, total 59ms 04-11 00:23:50.766 9030-9033/vox.office D/dalvikvm﹕ GC_CONCURRENT freed 476K, 11% free 12851K/14407K, paused 5ms+8ms, total 45ms

the error

我得到了类似Error Moving Data From One Activity to Another

的内容

这是我的问题,我得到了同样的错误,但我的清单还可以:

 <?xml version="1.0" encoding="utf-8"?>
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
 package="vox.office" >


 <uses-sdk android:minSdkVersion="14"
    android:targetSdkVersion="16" />

 <application
    android:allowBackup="true"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >
    <activity
        android:name=".MainActivity"
        android:label="@string/app_name" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    <activity
        android:name=".Text"
        android:label="@string/title_activity_text" >
        <intent-filter>
            <action android:name="vox.office.Text" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    <activity
        android:name=".showText"
        android:label="@string/title_activity_show_text" >
        <intent-filter>
            <action android:name="vox.office.showText" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
   </application>

  </manifest>

意图:

         Intent intent = new Intent(MainActivity.this,Text.class );
         intent.putExtra("nameFile", name);
         startActivity(intent);

感谢您的帮助:)

1 个答案:

答案 0 :(得分:0)

发现类似问题试试这个

What do these Android logcat warnings mean?

正如@ArthurT所说,将您的构建gradle更改为旧版本并尝试一次

compile&#39; com.android.support:appcompat-v7:20.0.0&#39;