Eclipse development Android project error reporting solution detailed tutorial, the latest version is enough!

This article records all kinds of possible errors reported in the new project after just contacting the Android development and construction environment, and personally experienced the long solution process (╥╯╥ ╯╥), looking for various folk prescriptions to avoid everyone's pit. I hope it can help you.

As shown in the figure, if an error similar to the import android.support cannot be resolved or android.support.v7.app.actionbaractivity is reported.

Solution: there is no relevant dependency package. Here is a valid library file for personal testing. You need to import android-support-v7-appcompat.jar.

Import steps: (1) click the project name, right-click and select properties, as shown in the following sequence:

(2) Click add external jars and select the library file android-support-v7-appcompat.jar just downloaded to import, as shown in the figure:

Click Apple apps, and then close the check box. (3) You can see that there are more extension libraries in the project files.

The above error report has also been solved.

@H_ 301_ 114@

You can see that there is no LIBS folder in my project. Many of them introduce LIBS folders when looking for materials. If you encounter them, please follow this step asterisk 3. (3 *) add android-support-v7-appcompat.jar in the project directory LIBS where the error occurs, and copy and paste it.

Here, if you solve it successfully, no error information is reported, and you can run the project, Congratulations!

(・..) however, it still makes another mistake! ԅ (¯㉨¯ ԅ)。 This is the time to start the next solution.

Then, the previous step still failed to solve the problem and reported another error.

It can be seen that there is an error rewriting the class. The error message is: the type android.support.v4.app.taskstackbuilder $supportparent cannot be resolved. It is indirectly referred from required. Class files. It doesn't load the base class correctly and can only look for other methods.

Error: error retrieving parent for item: no resource found that matches the given name 'theme. Appcompat. Light'.

As a new contact, after continuous search, I found that the original new Android project ignored the version problem. The design style of versions below Android sdk4.0 is different from that of versions above 4.0. Importing V4 and V7 still can not solve the problem. Because the jar package location of the current version has been changed, we need to correctly configure the SDK API version, with sdk4.0 or above and api14 or above. The correct specific steps are as follows: (1) create an Android project

(2) Fill in the project name and SDK version selection (important!)

(3) Then click nest default next until finish, waiting for the creation of the project. If you run the test program successfully as shown in the figure below, Congratulations!

If another error occurs: failed to load D: \ Android \ Android SDK windows \ build tools \ 29.0.3 \ lib \ dx.jar and unknow error: unable to build: the file dx.jar was not loaded from the SDK folder!

This is because the minimum SDK / API required by the project is higher than the API of the created ADT virtual machine, so an incompatibility error will be prompted. Then please continue to the next stop to solve the problem.

Check the Android version you installed. Take my installation as an example, as shown in the figure below:

Find the corresponding API 22 version of build tools:

Then find the project.properties file in the project file and add the matching build tools version downloaded and installed:

Here we are! You can see the first test application running.

Start the journey of Android learning! If you still encounter problems, you can leave comments and I will help solve them!

My blog Park: https://www.cnblogs.com/chenzhenhong/p/13456646.html My CSDN blog: detailed summary of error reporting solutions for eclipse's new Android project

-------------------------------------

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>