在Android Studio中使用"导入项目"来创建用于更改项目结构和生成Gradle文件的Eclipse项目,但是现在(我使用的是AS 0.5.3)它只生成IDEA文件(.iml,.idea)但不是Gradle,它也没有触及文件结构.
如何将Eclipse项目导入Android Studio?
更新:尝试在Eclipse中导出gradle文件不会为应用程序导出它们,它也不会在Android Studio中显示为模块.
我尝试使用APK Expansion libs zip_file和downloader_library(需要play_licensing).zip_file工作正常,因为它没有依赖项,但是当我尝试Gradle同步时,play_licensing会引发错误.
Android Studio吐出此错误日志:
Information:Gradle tasks [:app:generateGoogleDebugSources, :app:libs:downloader_library:generateDebugSources, :app:libs:play_licensing:generateDebugSources, :app:libs:zip_file:generateDebugSources]
Information:/Users/faiz/Projects/Android/TogetherTime/app/libs/play_licensing/aidl/ILicenseResultListener.aidl:21 interface ILicenseResultListener should be declared in a file called com/android/vending/licensing/ILicenseResultListener.aidl.
Information:2 errors
Information:0 warnings
Information:See complete output in console
/Users/faiz/Projects/Android/TogetherTime/app/libs/play_licensing/aidl/ILicensingService.aidl
Error:(19) couldn't find import for class com.android.vending.licensing.ILicenseResultListener
Error:(19) Execution failed for task ':app:libs:play_licensing:compileReleaseAidl'.
> com.android.ide.common.internal.LoggedErrorException: Failed to run command:
/Users/faiz/Projects/Android/android-sdk-macosx/build-tools/19.0.3/aidl -p/Users/faiz/Projects/Android/android-sdk-macosx/platforms/android-19/framework.aidl -o/Users/faiz/Projects/Android/TogetherTime/app/libs/play_licensing/build/source/aidl/release -I/Users/faiz/Projects/Android/TogetherTime/app/libs/play_licensing/aidl -I/Users/faiz/Projects/Android/TogetherTime/app/libs/play_licensing/src/release/aidl -d/var/folders/y6/g0d5m3f94rxdvq5myp53d9k80000gn/T/aidl662748145109587430.d /Users/faiz/Projects/Android/TogetherTime/app/libs/play_licensing/aidl/ILicensingService.aidl
Error Code:
1
Output:
/Users/faiz/Projects/Android/TogetherTime/app/libs/play_licensing/aidl/ILicensingService.aidl:19: couldn't find import for class com.android.vending.licensing.ILicenseResultListener
Run Code Online (Sandbox Code Playgroud)
我没有修改任何库,但由于它们不是为Gradle构建的,我从另一个项目复制了build.gradle并相应地修改它们.
downloader_library /的build.gradle
buildscript {
repositories {
mavenCentral()
}
dependencies …Run Code Online (Sandbox Code Playgroud)