|
0 / 0 / 0
Регистрация: 20.01.2016
Сообщений: 5
|
||||||
Android Studio не хочет видеть некоторые файлы в SDK08.06.2017, 17:21. Показов 2803. Ответов 6
Метки нет (Все метки)
Всем привет!
Понадобилось мне работать с web services в AndroidStudio (далее AS). Нашел исходники нужной библиотеки javax.xml.ws Положил эти исходники в скачанный android-sdk (25 версия) И вот что получается:
а javax.xml.ws.Service AS упорно не хочет видеть... Как заставить AS увидеть добавленные в SDK мной файлы? И ещё вопрос. Если я добавлю jar библиотеку в %JAVA_HOME%\lib - она будет доступна для AS? Спасибо! Юрий
0
|
||||||
| 08.06.2017, 17:21 | |
|
Ответы с готовыми решениями:
6
Sdk в настойках Android Studio и sdk в Project Structure Не предлагается установка Android SDK при установке Android Studio |
|
2884 / 2296 / 769
Регистрация: 12.05.2014
Сообщений: 7,978
|
||||||
| 08.06.2017, 17:26 | ||||||
|
в build.gradle надо добавить
0
|
||||||
|
0 / 0 / 0
Регистрация: 20.01.2016
Сообщений: 5
|
|
| 08.06.2017, 17:37 [ТС] | |
|
2 Pablito
я складывал нужные библиотеки в папку libs проекта. build проходил успешно. Но при сборке apk - вываливалось куча ошибок на добавленные библиотеки. Поэтому я решил попробовать вариант с исходниками, которые добавил в SDK, в надежде что AS их обнаружит и подцепит...
0
|
|
|
2884 / 2296 / 769
Регистрация: 12.05.2014
Сообщений: 7,978
|
|
| 08.06.2017, 17:43 | |
|
к чему этот весь текст?
я написал как подключить библиотеку, так проще, а главное - это работает
0
|
|
|
0 / 0 / 0
Регистрация: 20.01.2016
Сообщений: 5
|
|
| 09.06.2017, 09:23 [ТС] | |
|
Build получается
Кликните здесь для просмотра всего текста
Executing tasks: [clean, :app:generateDebugSources, :app:mockableAndroidJar, :app repareDebugUnitTestDependencies, :app:generateDebugAndroidTestSources, :app:compileDebugSources, :app:compileDebugUnitTestSources, :app:compileDebugAndroidTestSources]Configuration on demand is an incubating feature. ****** :app reDebugAndroidTestBuild UP-TO-DATE:app repareComAndroidSupportTestEspress oEspressoCore222Library:app repareComAndroidSupportTestEspress oEspressoIdlingResource222Library:app repareComAndroidSupportTestExposed InstrumentationApiPublish05Library:app repareComAndroidSupportTestRules05 Library:app repareComAndroidSupportTestRunner0 5Library:app repareDebugAndroidTestDependencies:app:compileDebugAndroidTestAidl :app rocessDebugAndroidTestManifest:app:compileDebugAndroidTestRenderscript :app:generateDebugAndroidTestBuildConfig :app:generateDebugAndroidTestResValues :app:generateDebugAndroidTestResources :app:mergeDebugAndroidTestResources :app rocessDebugAndroidTestResources:app:generateDebugAndroidTestSources :app:incrementalDebugJavaCompilationSafe guard :app:javaPreCompileDebug :app:compileDebugJavaWithJavac :app:compileDebugJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.). :app:compileDebugNdk UP-TO-DATE :app:compileDebugSources :app:incrementalDebugUnitTestJavaCompila tionSafeguard UP-TO-DATE :app:javaPreCompileDebugUnitTest :app:compileDebugUnitTestJavaWithJavac :app rocessDebugJavaRes UP-TO-DATE:app rocessDebugUnitTestJavaRes UP-TO-DATE:app:compileDebugUnitTestSources :app:incrementalDebugAndroidTestJavaComp ilationSafeguard :app:javaPreCompileDebugAndroidTest :app:compileDebugAndroidTestJavaWithJava c :app:compileDebugAndroidTestNdk UP-TO-DATE :app:compileDebugAndroidTestSources BUILD SUCCESSFUL Total time: 5.109 secs А вот build apk - не проходит... Кликните здесь для просмотра всего текста
Executing tasks: [:app:assembleDebug] Configuration on demand is an incubating feature. NDK is missing a "platforms" directory. If you are using NDK, verify the ndk.dir is set to a valid NDK directory. It is currently set to ******** If you are not using NDK, unset the NDK variable from ANDROID_NDK_HOME or local.properties to remove this warning. ***** :app:transformClassesWithDexForDebug AGPBI: {"kind":"error","text":"trouble processing "javax/xml/bind/Binder.class":","sources":[{}]} AGPBI: {"kind":"error","text":"Ill-advised or mistaken usage of a core class (java.* or javax.*)","sources":[{}]} AGPBI: {"kind":"error","text":"when not building a core library.","sources":[{}]} AGPBI: {"kind":"error","text":"This is often due to inadvertently including a core library file","sources":[{}]} AGPBI: {"kind":"error","text":"in your application\u0027s project, when using an IDE (such as","sources":[{}]} AGPBI: {"kind":"error","text":"Eclipse). If you are sure you\u0027re not intentionally defining a","sources":[{}]} AGPBI: {"kind":"error","text":"core class, then this is the most likely explanation of what\u0027s","sources":[{}]} AGPBI: {"kind":"error","text":"going on.","sources":[{}]} AGPBI: {"kind":"error","text":"However, you might actually be trying to define a class in a core","sources":[{}]} AGPBI: {"kind":"error","text":"namespace, the source of which you may have taken, for example,","sources":[{}]} AGPBI: {"kind":"error","text":"from a non-Android virtual machine project. This will most","sources":[{}]} AGPBI: {"kind":"error","text":"assuredly not work. At a minimum, it jeopardizes the","sources":[{}]} AGPBI: {"kind":"error","text":"compatibility of your app with future versions of the platform.","sources":[{}]} AGPBI: {"kind":"error","text":"It is also often of questionable legality.","sources":[{}]} AGPBI: {"kind":"error","text":"If you really intend to build a core library -- which is only","sources":[{}]} AGPBI: {"kind":"error","text":"appropriate as part of creating a full virtual machine","sources":[{}]} AGPBI: {"kind":"error","text":"distribution, as opposed to compiling an application -- then use","sources":[{}]} AGPBI: {"kind":"error","text":"the "--core-library" option to suppress this error message.","sources":[{}]} AGPBI: {"kind":"error","text":"If you go ahead and use "--core-library" but are in fact","sources":[{}]} AGPBI: {"kind":"error","text":"building an application, then be forewarned that your application","sources":[{}]} AGPBI: {"kind":"error","text":"will still fail to build or run, at some point. Please be","sources":[{}]} AGPBI: {"kind":"error","text":"prepared for angry customers who find, for example, that your","sources":[{}]} AGPBI: {"kind":"error","text":"application ceases to function once they upgrade their operating","sources":[{}]} AGPBI: {"kind":"error","text":"system. You will be to blame for this problem.","sources":[{}]} AGPBI: {"kind":"error","text":"If you are legitimately using some code that happens to be in a","sources":[{}]} AGPBI: {"kind":"error","text":"core package, then the easiest safe alternative you have is to","sources":[{}]} AGPBI: {"kind":"error","text":"repackage that code. That is, move the classes in question into","sources":[{}]} AGPBI: {"kind":"error","text":"your own package namespace. This means that they will never be in","sources":[{}]} AGPBI: {"kind":"error","text":"conflict with core system classes. JarJar is a tool that may help","sources":[{}]} AGPBI: {"kind":"error","text":"you in this endeavor. If you find that you cannot do this, then","sources":[{}]} AGPBI: {"kind":"error","text":"that is an indication that the path you are on will ultimately","sources":[{}]} AGPBI: {"kind":"error","text":"lead to pain, suffering, grief, and lamentation.","sources":[{}]} AGPBI: {"kind":"error","text":"1 error; aborting","sources":[{}]} FAILED AGPBI: {"kind":"error","text":"trouble processing "javax/xml/ws/Action.class":","sources":[{}]} AGPBI: {"kind":"error","text":"Ill-advised or mistaken usage of a core class (java.* or javax.*)","sources":[{}]} AGPBI: {"kind":"error","text":"when not building a core library.","sources":[{}]} AGPBI: {"kind":"error","text":"This is often due to inadvertently including a core library file","sources":[{}]} AGPBI: {"kind":"error","text":"in your application\u0027s project, when using an IDE (such as","sources":[{}]} AGPBI: {"kind":"error","text":"Eclipse). If you are sure you\u0027re not intentionally defining a","sources":[{}]} AGPBI: {"kind":"error","text":"core class, then this is the most likely explanation of what\u0027s","sources":[{}]} AGPBI: {"kind":"error","text":"going on.","sources":[{}]} AGPBI: {"kind":"error","text":"However, you might actually be trying to define a class in a core","sources":[{}]} AGPBI: {"kind":"error","text":"namespace, the source of which you may have taken, for example,","sources":[{}]} AGPBI: {"kind":"error","text":"from a non-Android virtual machine project. This will most","sources":[{}]} AGPBI: {"kind":"error","text":"assuredly not work. At a minimum, it jeopardizes the","sources":[{}]} AGPBI: {"kind":"error","text":"compatibility of your app with future versions of the platform.","sources":[{}]} AGPBI: {"kind":"error","text":"It is also often of questionable legality.","sources":[{}]} AGPBI: {"kind":"error","text":"If you really intend to build a core library -- which is only","sources":[{}]} AGPBI: {"kind":"error","text":"appropriate as part of creating a full virtual machine","sources":[{}]} AGPBI: {"kind":"error","text":"distribution, as opposed to compiling an application -- then use","sources":[{}]} AGPBI: {"kind":"error","text":"the "--core-library" option to suppress this error message.","sources":[{}]} AGPBI: {"kind":"error","text":"If you go ahead and use "--core-library" but are in fact","sources":[{}]} AGPBI: {"kind":"error","text":"building an application, then be forewarned that your application","sources":[{}]} AGPBI: {"kind":"error","text":"will still fail to build or run, at some point. Please be","sources":[{}]} AGPBI: {"kind":"error","text":"prepared for angry customers who find, for example, that your","sources":[{}]} AGPBI: {"kind":"error","text":"application ceases to function once they upgrade their operating","sources":[{}]} AGPBI: {"kind":"error","text":"system. You will be to blame for this problem.","sources":[{}]} AGPBI: {"kind":"error","text":"If you are legitimately using some code that happens to be in a","sources":[{}]} AGPBI: {"kind":"error","text":"core package, then the easiest safe alternative you have is to","sources":[{}]} AGPBI: {"kind":"error","text":"repackage that code. That is, move the classes in question into","sources":[{}]} AGPBI: {"kind":"error","text":"your own package namespace. This means that they will never be in","sources":[{}]} AGPBI: {"kind":"error","text":"conflict with core system classes. JarJar is a tool that may help","sources":[{}]} AGPBI: {"kind":"error","text":"you in this endeavor. If you find that you cannot do this, then","sources":[{}]} AGPBI: {"kind":"error","text":"that is an indication that the path you are on will ultimately","sources":[{}]} AGPBI: {"kind":"error","text":"lead to pain, suffering, grief, and lamentation.","sources":[{}]} AGPBI: {"kind":"error","text":"1 error; aborting","sources":[{}]} FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':app:transformClassesWithDexForDebug'. > com.android.build.api.transform.Transfor mException: java.lang.RuntimeException: com.android.ide.common.process.ProcessEx ception: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessEx ception: Return code 1 for dex process * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. BUILD FAILED Total time: 1.316 secs Кликните здесь для просмотра всего текста
Information:Gradle tasks [:app:assembleDebug] Error:trouble processing "javax/xml/bind/Binder.class": Error:Ill-advised or mistaken usage of a core class (java.* or javax.*) Error:when not building a core library. Error:This is often due to inadvertently including a core library file Error:in your application's project, when using an IDE (such as Error:Eclipse). If you are sure you're not intentionally defining a Error:core class, then this is the most likely explanation of what's Error:going on. Error:However, you might actually be trying to define a class in a core Error:namespace, the source of which you may have taken, for example, Error:from a non-Android virtual machine project. This will most Error:assuredly not work. At a minimum, it jeopardizes the Error:compatibility of your app with future versions of the platform. Error:It is also often of questionable legality. Error:If you really intend to build a core library -- which is only Error:appropriate as part of creating a full virtual machine Error:distribution, as opposed to compiling an application -- then use Error:the "--core-library" option to suppress this error message. Error:If you go ahead and use "--core-library" but are in fact Error:building an application, then be forewarned that your application Error:will still fail to build or run, at some point. Please be Error repared for angry customers who find, for example, that yourError:application ceases to function once they upgrade their operating Error:system. You will be to blame for this problem. Error:If you are legitimately using some code that happens to be in a Error:core package, then the easiest safe alternative you have is to Error:repackage that code. That is, move the classes in question into Error:your own package namespace. This means that they will never be in Error:conflict with core system classes. JarJar is a tool that may help Error:you in this endeavor. If you find that you cannot do this, then Error:that is an indication that the path you are on will ultimately Error:lead to pain, suffering, grief, and lamentation. Error:1 error; aborting Error:trouble processing "javax/xml/ws/Action.class": Error:Ill-advised or mistaken usage of a core class (java.* or javax.*) Error:when not building a core library. Error:This is often due to inadvertently including a core library file Error:in your application's project, when using an IDE (such as Error:Eclipse). If you are sure you're not intentionally defining a Error:core class, then this is the most likely explanation of what's Error:going on. Error:However, you might actually be trying to define a class in a core Error:namespace, the source of which you may have taken, for example, Error:from a non-Android virtual machine project. This will most Error:assuredly not work. At a minimum, it jeopardizes the Error:compatibility of your app with future versions of the platform. Error:It is also often of questionable legality. Error:If you really intend to build a core library -- which is only Error:appropriate as part of creating a full virtual machine Error:distribution, as opposed to compiling an application -- then use Error:the "--core-library" option to suppress this error message. Error:If you go ahead and use "--core-library" but are in fact Error:building an application, then be forewarned that your application Error:will still fail to build or run, at some point. Please be Error repared for angry customers who find, for example, that yourError:application ceases to function once they upgrade their operating Error:system. You will be to blame for this problem. Error:If you are legitimately using some code that happens to be in a Error:core package, then the easiest safe alternative you have is to Error:repackage that code. That is, move the classes in question into Error:your own package namespace. This means that they will never be in Error:conflict with core system classes. JarJar is a tool that may help Error:you in this endeavor. If you find that you cannot do this, then Error:that is an indication that the path you are on will ultimately Error:lead to pain, suffering, grief, and lamentation. Error:1 error; aborting Error:Execution failed for task ':app:transformClassesWithDexForDebug'. > com.android.build.api.transform.Transfor mException: java.lang.RuntimeException: com.android.ide.common.process.ProcessEx ception: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessEx ception: Return code 1 for dex process Information:BUILD FAILED Information:Total time: 1.316 secs Information:67 errors Information:0 warnings Information:See complete output in console
0
|
|
|
2884 / 2296 / 769
Регистрация: 12.05.2014
Сообщений: 7,978
|
|
| 09.06.2017, 19:10 | |
|
какой минимальный код надо написать что бы перестало билдиться?
и что там в build.gradle понаписано? вдруг там остались попытки импорта библиотеки
0
|
|
|
0 / 0 / 0
Регистрация: 20.01.2016
Сообщений: 5
|
||||||
| 09.06.2017, 23:32 [ТС] | ||||||
|
вот build.gradle
Кликните здесь для просмотра всего текста
apply plugin: 'com.android.application' android { compileSdkVersion 25 buildToolsVersion "25.0.3" defaultConfig { applicationId "com.example.yzolotykh.myapplication " minSdkVersion 15 targetSdkVersion 25 versionCode 1 versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUni tRunner" } buildTypes { release { minifyEnabled true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } } dependencies { compile fileTree(include: '*.jar', dir: 'libs') androidTestCompile('com.android.support. test.espresso:espresso-core:2.2.2', { exclude group: 'com.android.support', module: 'support-annotations' }) compile 'com.android.support.constraint:constrai nt-layout:1.0.2' testCompile 'junit:junit:4.12' compile files('libs/jaxws-api-2.2.1.jar') } вот код, по которому делается APK. При этом строчку compile files('libs/jaxws-api-2.2.1.jar') и саму библиотеку пришлось удалить из проекта... Кликните здесь для просмотра всего текста
0
|
||||||
| 09.06.2017, 23:32 | |
|
Помогаю со студенческими работами здесь
7
Android studio перестал видеть телефон Версия SDK в Android Studio Комп не хочет копировать некоторые файлы Android Studio не может найти SDK
Искать еще темы с ответами Или воспользуйтесь поиском по форуму: |
|
Новые блоги и статьи
|
|||
|
Подключение Box2D v3 к SDL3 для Android: физика и отрисовка коллайдеров
8Observer8 29.01.2026
Содержание блога
Box2D - это библиотека для 2D физики для анимаций и игр. С её помощью можно определять были ли коллизии между конкретными объектами. Версия v3 была полностью переписана на Си, в. . .
|
Инструменты COM: Сохранение данный из VARIANT в файл и загрузка из файла в VARIANT
bedvit 28.01.2026
Сохранение базовых типов COM и массивов (одномерных или двухмерных) любой вложенности (деревья) в файл, с возможностью выбора алгоритмов сжатия и шифрования.
Часть библиотеки BedvitCOM
Использованы. . .
|
Загрузка PNG с альфа-каналом на SDL3 для Android: с помощью SDL_LoadPNG (без SDL3_image)
8Observer8 28.01.2026
Содержание блога
SDL3 имеет собственные средства для загрузки и отображения PNG-файлов с альфа-каналом и базовой работы с ними. В этой инструкции используется функция SDL_LoadPNG(), которая. . .
|
Загрузка PNG с альфа-каналом на SDL3 для Android: с помощью SDL3_image
8Observer8 27.01.2026
Содержание блога
SDL3_image - это библиотека для загрузки и работы с изображениями. Эта пошаговая инструкция покажет, как загрузить и вывести на экран смартфона картинку с альфа-каналом, то есть с. . .
|
|
Влияние грибов на сукцессию
anaschu 26.01.2026
Бифуркационные изменения массы гриба происходят тогда, когда мы уменьшаем массу компоста в 10 раз, а скорость прироста биомассы уменьшаем в три раза. Скорость прироста биомассы может уменьшаться за. . .
|
Воспроизведение звукового файла с помощью SDL3_mixer при касании экрана Android
8Observer8 26.01.2026
Содержание блога
SDL3_mixer - это библиотека я для воспроизведения аудио. В отличие от инструкции по добавлению текста код по проигрыванию звука уже содержится в шаблоне примера. Нужно только. . .
|
Установка Android SDK, NDK, JDK, CMake и т.д.
8Observer8 25.01.2026
Содержание блога
Перейдите по ссылке: https:/ / developer. android. com/ studio и в самом низу страницы кликните по архиву "commandlinetools-win-xxxxxx_latest. zip"
Извлеките архив и вы увидите. . .
|
Вывод текста со шрифтом TTF на Android с помощью библиотеки SDL3_ttf
8Observer8 25.01.2026
Содержание блога
Если у вас не установлены Android SDK, NDK, JDK, и т. д. то сделайте это по следующей инструкции: Установка Android SDK, NDK, JDK, CMake и т. д.
Сборка примера
Скачайте. . .
|