android支持库添加问题

时间:2018-03-25 06:59:57

标签: android eclipse

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.first.densgi"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk
        android:minSdkVersion="8"
        android:targetSdkVersion="27" />

    <application
        android:allowBackup="true"
        android:icon="@drawable/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>
    </application>

</manifest>

上面是manifest.xml 以下是主要活动类的副本。

package com.first.densgi;

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

public class MainActivity extends ActionBarActivity {

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

    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.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();
        if (id == R.id.action_settings) {
            return true;
        }
        return super.onOptionsItemSelected(item);
    }
}

我还附加了1个屏幕截图和一个日志,截图是查看应用程序中的所有项目文件夹和日志,以便在尝试通过android工具添加支持库时捕获错误消息。一个回复提到将support-v4.jar添加到我的lib文件夹中。从截图中你会发现eclipse没有创建该文件夹。

Image, Android API 24, revision 19
[2018-03-26 11:45:20 - SDK Manager]     Found Google Play Intel x86 Atom System Image, Android API 25, revision 9
[2018-03-26 11:45:20 - SDK Manager]     Found Google Play Intel x86 Atom System Image, Android API 26, revision 7
[2018-03-26 11:45:20 - SDK Manager]     Found Google Play Intel x86 Atom System Image, Android API 27, revision 3
[2018-03-26 11:45:20 - SDK Manager]     Found Google Play Intel x86 Atom System Image, Android API P, revision 1
[2018-03-26 11:45:20 - SDK Manager] Done loading packages.
[2018-03-26 11:45:20 - Android Support Jar not found:] C:\Users\Uchenna\Desktop\v4\android-support-v4.jar

view of screen shot of project files

大多数建议我都有使用android studio的在线建议,但只是安装了eclipse,并希望我的所有开发,即se,ee,web和mobile都在一个环境中。

我觉得非常糟糕,我第一次在这个平台上提出问题没有人试图回答。

我仍然面临着陈述的问题,我已经将eclipse更新为oxygen3.a而且现在我还有另外一个无法安装jboss和wildfly服务器的问题。提供未处理的事件循环异常

1 个答案:

答案 0 :(得分:0)

不是错误的SDK位置。

将特定库放在android项目文件夹中的libs文件夹中。

在eclipse的android项目中打开你的app level build.gradle文件并添加库来编译它。 防爆;编译'com.ajts.androidmads.SQLite2Excel:library:1.0.2'

然后同步eclipse项目。