简体   繁体   English

将项目导入我的android项目时出现错误

[英]Getting errors when importing project to my android project

I want to use google maps clustering in my project. 我想在我的项目中使用Google Maps集群。 I am using this one: 我正在使用这个:

https://github.com/twotoasters/clusterkraf

However I am getting issues when running my project. 但是,在运行项目时遇到问题。 I was able to import it fine. 我能够将其导入。 But when I run the app, I see on the console: 但是,当我运行该应用程序时,我在控制台上看到:

[2013-08-24 18:44:42 - library] Could not find library.apk!

I think its not importing the clusterkraf project (which is called library ) into my phone... 我认为它没有将clusterkraf项目(称为library )导入到我的手机中...

And when I try to run the code from this library in the phone, it throws an exception and crashes. 当我尝试从手机中的该库运行代码时,它会引发异常并崩溃。 Here is the log: 这是日志:

08-24 18:47:49.709: W/dalvikvm(4669): threadid=1: thread exiting with uncaught exception (group=0x41780360)
08-24 18:47:49.719: E/AndroidRuntime(4669): FATAL EXCEPTION: main
08-24 18:47:49.719: E/AndroidRuntime(4669): java.lang.NoClassDefFoundError: com.twotoasters.clusterkraf.InputPoint
08-24 18:47:49.719: E/AndroidRuntime(4669):     at com.activity.idsconnect.ActivityMap.MakeMarkerArray(ActivityMap.java:159)
08-24 18:47:49.719: E/AndroidRuntime(4669):     at com.activity.idsconnect.ActivityMap.onCreate(ActivityMap.java:112)
08-24 18:47:49.719: E/AndroidRuntime(4669):     at android.app.Activity.performCreate(Activity.java:5177)
08-24 18:47:49.719: E/AndroidRuntime(4669):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1094)
08-24 18:47:49.719: E/AndroidRuntime(4669):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2074)
08-24 18:47:49.719: E/AndroidRuntime(4669):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2135)
08-24 18:47:49.719: E/AndroidRuntime(4669):     at android.app.ActivityThread.access$700(ActivityThread.java:143)
08-24 18:47:49.719: E/AndroidRuntime(4669):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1241)
08-24 18:47:49.719: E/AndroidRuntime(4669):     at android.os.Handler.dispatchMessage(Handler.java:99)
08-24 18:47:49.719: E/AndroidRuntime(4669):     at android.os.Looper.loop(Looper.java:137)
08-24 18:47:49.719: E/AndroidRuntime(4669):     at android.app.ActivityThread.main(ActivityThread.java:4950)
08-24 18:47:49.719: E/AndroidRuntime(4669):     at java.lang.reflect.Method.invokeNative(Native Method)
08-24 18:47:49.719: E/AndroidRuntime(4669):     at java.lang.reflect.Method.invoke(Method.java:511)
08-24 18:47:49.719: E/AndroidRuntime(4669):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1004)
08-24 18:47:49.719: E/AndroidRuntime(4669):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:771)
08-24 18:47:49.719: E/AndroidRuntime(4669):     at dalvik.system.NativeStart.main(Native Method)

I kept in my project properties Order and Export: 我将项目属性保存为“订购和出口”:

在此处输入图片说明

I don't know how to properly include it in the app when exporting. 我不知道导出时如何在应用程序中正确包含它。 Does anyone know how I can fix this? 有谁知道我该如何解决?

Thanks. 谢谢。

EDIT: 编辑:

My project properties 我的项目属性

在此处输入图片说明

Clusterkraf properties Clusterkraf属性

在此处输入图片说明

This is android library you need to add it in little another way. 这是android库,您需要以其他方式添加它。

First go to properties of library project and go to Android tab. 首先转到库项目的属性,然后转到Android选项卡。 Make sure that 'is library' has been checked. 确保已选中“是库”。

After that go to properties of your project and in Android tab add your library, then click apply. 之后,转到项目的属性,然后在Android选项卡中添加您的库,然后单击“应用”。

Also library have android-support library. 另外库有android-support库。 If you are going to run into problems with android support library then you will need to delete it from your project to just have 1 copy of these. 如果您要在android支持库中遇到问题,则需要将其从项目中删除,只有1个副本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM